Leaflet in google maps

后端 未结 3 1374
滥情空心
滥情空心 2020-12-18 04:12

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

3条回答
  •  悲&欢浪女
    2020-12-18 04:55

    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

提交回复
热议问题