Skip to content

Commit

Permalink
Add name variations
Browse files Browse the repository at this point in the history
  • Loading branch information
giswqs committed Apr 10, 2024
1 parent b5a2f13 commit 9c5e909
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions geemap/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -16182,10 +16182,10 @@ def google_map_tiles(
ValueError: If the map_type is not one of the allowed types.

Example:
>>> import geemap
>>> m = geemap.Map()
>>> basemap = google_map_tiles(map_type='roadmap', language="en-Us", region="US", scale="scaleFactor2x", highDpi=True)
>>> m.add_basemap(basemap)
import geemap
m = geemap.Map()
basemap = geemap.google_map_tiles(map_type='roadmap', language="en-Us", region="US", scale="scaleFactor2x", highDpi=True)
m.add_basemap(basemap)

Returns:
TileProvider: A TileProvider object with the generated map, or None if the map could not be generated.
Expand All @@ -16207,7 +16207,8 @@ def google_map_tiles(
"API key is required to access Google Maps API. To get an API key and enable Map Tiles API, visit https://developers.google.com/maps/get-started#create-project"
)

map_type = map_type.lower()
map_type = map_type.lower().replace("google.", "").replace("google", "").strip()

if map_type not in [
"roadmap",
"satellite",
Expand Down

0 comments on commit 9c5e909

Please sign in to comment.