Can we use leaflet in google maps? Searching and reading articles about it, we found that there are some leaflet plugins available. Using that we can build application using google map + leaflet.
相关问题
- How do you change the color of the dotted line on
- draw polylines with different colors on v2 maps
- Leaflet popups for specific base maps
- Add HTML class/ID to Google Maps Marker (API V3)
- leafletjs adding scrollable pop up?
相关文章
- Avoiding “Sorry, we have no imagery here” with Goo
- Custom Marker performance iOS, crash with result “
- Google Map Gradient Polylines for Android?
- Angular 6 - @types/googlemaps/index.d.ts' is n
- Google Maps - Get Polygon border of zones/neighbor
- Google Map Marker Clickable Area
- getSupportFragmentManager().findFragmentById retur
- change leaflet marker icon
You can use leaflet JS API kit and use google maps imagery in it.
Edit:
Check this example in which google tiles/imagery is used along leaflet kit.
Source: https://gist.github.com/crofty/2197701
Just to be clear: Leaflet is just a viewing library, whereas Google Maps provides both the base maps (tiles) and an API (like Leaflet).
Google Maps requires that you use exclusively its API when using its base maps.
However, there is indeed a plugin for Leaflet that claims to act as a proxy for the Google Maps API, hence respecting its Terms of Use, so YES it sounds do-able.
Then you are left with the decision of using Leaflet with that plugin or directly using Google Maps API. At this point this sounds more like a question of which one provides you with the features you are looking for.
Update
The originally mentioned plugin is no longer maintained.
Here is a more recent one: Leaflet.GridLayer.GoogleMutant