Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Google Maps API sample #1122

Closed
jaakla opened this issue Nov 7, 2017 · 10 comments
Closed

Google Maps API sample #1122

jaakla opened this issue Nov 7, 2017 · 10 comments
Milestone

Comments

@jaakla
Copy link

jaakla commented Nov 7, 2017

Can you add a sample how to add deck.gl layers to Google Maps API? I would not be probably the only one interested on this.

@thatVaddiguy
Copy link

Hey did you figure out a way to integrate deck and google maps by any chance?

@MeTaNoV
Copy link

MeTaNoV commented Aug 7, 2018

I would also be VERY interested since we plan to use https://github.com/apache/incubator-superset which is integrating deck.gl in their dashboards!

@Pessimistress
Copy link
Collaborator

For Google Maps users: if you check this file:
https://github.com/uber/deck.gl/blob/master/examples/get-started/pure-js/app.js
The interface with Mapbox is fairly minimal. I imagine it wouldn't be that difficult to modify this example to replace mapbox-gl with Google Maps API. We'd be happy to add it to the get-started templates if you open a PR.

@MeTaNoV
Copy link

MeTaNoV commented Aug 8, 2018

@Pessimistress , thanks for the pointer, I did a quick experiment and of course there are issues...
Mainly:

  • zoom levels are not strictly equivalent, and the one you use is the one of Mapbox
  • it is currently impossible to rotate a Map with Google Maps
  • tilt value range are also a bit different, and the one you use is the one of Mapbox
    The result is sadly pretty unusable with G maps...

@Pessimistress
Copy link
Collaborator

@MeTaNoV
You can disable rotation in deck.gl by setting:

controller: {dragRotate: false}

See documentation.

Mapbox uses OpenStreetMap's tile index system. Google Maps is not open-sourced, and I have not researched its documentation. I do believe Google Maps also uses Web Mercator projection, so if there is a offset between the two zoom levels, it should be constant.

@ibgreen
Copy link
Collaborator

ibgreen commented Aug 8, 2018

is a offset between the two zoom levels, it should be constant.

Yes.

FWIW, I did a test integration a long time ago (don't have the code). I seem to remember that there is a 2x difference in zoom so adding or removing one to the zoom level fixed the (non-tilted) alignment.

I did not try changing pitch.

I recall there was an issue with one of Google Map's overlay types, there was tearing when panning the map, that I didn't have time to dig in to.

@MeTaNoV
Copy link

MeTaNoV commented Aug 9, 2018

@Pessimistress and @ibgreen , thanks for the additional information, I will tinker a bit more with it and eventually raise a PR with the result.

@vnugent
Copy link

vnugent commented Apr 3, 2019

I'd also be VERY interested in this. I'm using Mapbox geocoding service but their data is really lacking. Per Google API ToS if I use their Geocoding API I have to switch to their maps as well.

@Pessimistress
Copy link
Collaborator

We are adding official support for Google Maps in v7.0 (currently in beta). See example.

@tgorkin tgorkin closed this as completed Apr 16, 2019
@tgorkin tgorkin modified the milestones: Backlog, 7.0.0 Apr 16, 2019
@benderlidze
Copy link

any example on how to update layer visibility on google maps?
for example I want to update this layer id: 'airports'
How should it be with overlay.setProps({layers: []}) ?
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants