V
V
Viktor Salomeev2015-08-28 20:13:37
Google Maps
Viktor Salomeev, 2015-08-28 20:13:37

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

2 answer(s)
S
smatDnepr, 2019-12-26
@smatDnepr

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);

E
Edward, 2015-11-11
@ED98

Are you aware of these plugins?
https://github.com/shramov/leaflet-plugins/tree/ma...
True, there seems to be no 2GIS there.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question