Answer the question
In order to leave comments, you need to log in
How to work with 2GIS, Google and Yandex maps in Leaflet without their API?
Leaflet has plugins for working with 2GIS, Google and Yandex maps using their API. Unfortunately, the speed of their work, the download speed leave much to be desired...
And in general, it is very stupid to use such a wonderful library as a "container" for absolutely unnecessary "fucks".
Are there any solutions that allow you to use 2GIS, Google, Yandex on a "pure" Leaflet, without downloading unnecessary APIs of these services?
Answer the question
In order to leave comments, you need to log in
2gis:
L.tileLayer(' http://tile2.maps.2gis.com/tiles?x={x}&y={y}&z={z} ').addTo(map);
Google Map Streets:
L.tileLayer(' http://{s}.google.com/vt/lyrs=m&x={x}&y={y}&z={z} ', {subdomains:['mt0', 'mt1','mt2','mt3']}).addTo(map);
Google Map Terrain:
L.tileLayer(' http://{s}.google.com/vt/lyrs=p&x={x}&y={y}&z={z} ', {subdomains:['mt0', 'mt1','mt2','mt3']}).addTo(map);
Google Map Hybrid:
L.tileLayer(' http://{s}.google.com/vt/lyrs=s,h&x={x}&y={y}&z={z} ', {subdomains:['mt0 ','mt1','mt2','mt3']}).addTo(map);
', {subdomains:['mt0','mt1','mt2','mt3']}).addTo(map);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question