Closed robcsi closed 6 months ago
I don't have any real experience with the Google Maps API so I wouldn't know how much work it would be. I would assume you would need an API key for it to work.
I don't really have any interest in adding support for Google Maps, but I'd be willing to accept a PR that adds it as an option (as long as it complies with the Google Maps TOS).
According to this post, it can be used like this, the same way you are using OSM:
"For the static purpose you can freely add the google map tiles inside your leaflet. You doesn't need to add the third party plugin and google API. For the static tiles, you can add following code [...]"
googleSat = L.tileLayer('http://{s}.google.com/vt/lyrs=s&x={x}&y={y}&z={z}',{
maxZoom: 20,
subdomains:['mt0','mt1','mt2','mt3']
});
I've forked your repo and tried it, and it works.
I did some more digging regarding legal issues/TOS and the following link only mentions this about tiles:
(a) No Scraping. Customer will not export, extract, or otherwise scrape Google Maps Content for use outside the Services. For
example, Customer will not: (i) pre-fetch, index, store, reshare, or rehost Google Maps Content outside the services; (ii) bulk
download Google Maps tiles, Street View images, geocodes, directions, distance matrix results, roads information, places
information, elevation values, and time zone details; (iii) copy and save business names, addresses, or user reviews; or (iv) use
Google Maps Content with text-to-speech services.
What do you think?
This can be added using the new options in 8c5e1877c0cb31483bd708f0a9b7ab776fe21481
Hello,
How much effort would it need to integrate Google Maps as well? If it's possible, are there any (legal) limitations?
Thanks, Robert