geopandas / xyzservices

Source of XYZ tiles providers
https://xyzservices.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
169 stars 32 forks source link

Add Google basemaps #63

Closed giswqs closed 3 years ago

giswqs commented 3 years ago

It would be great to add Google basemaps to providers.json.

martinfleis commented 3 years ago

That would be a welcome contribution! Would you like to make a PR? I would add them as a single Bunch.

New providers should be added to https://github.com/geopandas/xyzservices/blob/main/provider_sources/xyzservices-providers.json. See the contributing docs https://xyzservices.readthedocs.io/en/latest/contributing.html#providers

giswqs commented 3 years ago

I will work on it and submit a PR later today.

martinfleis commented 3 years ago

Actually, can you ensure we can legally use those? I am not entirely sure about that based on https://developers.google.com/maps/faq#tos_tiles.

giswqs commented 3 years ago

This is interesting to know. I didn't realize that. I have been using these map tiles for years through the QGIS QuickMapServices Plugin. I am not sure how this plugin handles the legal issues.

martinfleis commented 3 years ago

It seems that they just don't care.

I was wondering such an obvious source is not already included. See https://github.com/leaflet-extras/leaflet-providers/issues/236, https://github.com/leaflet-extras/leaflet-providers/issues/288, and https://github.com/leaflet-extras/leaflet-providers/issues/22 as a reference.

Strictly speaking, we are not using those tiles, just providing their metadata so we wouldn't violate TOS if we included them. But anyone who would use them from xyzservices would if I understand correctly. A bit of a grey zone here (but I think that leafmap does violate it).

giswqs commented 3 years ago

Thanks for linking these references. I agree it is a grey area. I will change leafmap's default basemap to other free tiles rather than Google Maps.

So, do we still want to include their metadata in xyzservices? I can submit a PR if you want. If not, we can close this issue.

giswqs commented 3 years ago

I have changed leafmap's default basemap from Google Maps to OpenStreetMap, but I keep the metadata of Google map tiles for users who want to use them at their own risk. If Google comes after me, I will then remove them. https://github.com/giswqs/leafmap/issues/91

image

martinfleis commented 3 years ago

So, do we still want to include their metadata in xyzservices?

I am really not sure. If we do so, we should add a notice to the docs that users should always check the TOS of the provider (which we maybe should do anyway).

@darribas @jorisvandenbossche any thoughts on this?

martinfleis commented 3 years ago

@giswqs With #65 there is a convenient way of getting Google's base maps as a TileProvider, so I suggest closing this issue and not including them directly in our JSON. Would it be okay with you? With your https://github.com/giswqs/leafmap/issues/92 you can pass Google Hybrid to leafmap as

basemap = xyzservices.TileProvider.from_qms("Google Satellite Hybrid")
m = leafmap.Map()
m.add_basemap(basemap)
giswqs commented 3 years ago

Yes, this is a much better solution. Thank you.