Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] [pydeck] Incorrect default map style for Google basemap #9371

Open
1 of 7 tasks
bijanvakili opened this issue Jan 21, 2025 · 0 comments
Open
1 of 7 tasks

[Bug] [pydeck] Incorrect default map style for Google basemap #9371

bijanvakili opened this issue Jan 21, 2025 · 0 comments
Labels

Comments

@bijanvakili
Copy link

Description

By default, pydeck.Deck sets the base map to Carto’s Dark Matter map. As per the documentation, users can set the base map provider to Google setting the map_provider and api_keys parameters as per the documentation:

However, it will still fail to use a Google base map if the map_style parameter is not set explicitly to a value supported by Google. This is not clear from the documentation. This is because the map_style parameter still defaults here to dark which is not supported by Google maps.

Flavors

  • Script tag
  • React
  • Python/Jupyter notebook
  • MapboxOverlay
  • GoogleMapsOverlay
  • CartoLayer
  • ArcGIS

Expected Behavior

If map_provider='google_maps', map_style should properly default to "roadmap".

This relation is instead as already specified here in the styles map. It may make sense to simply make a default style per supported provider.

Steps to Reproduce

Instantiate a Deck by following documentation instructions which only specify map_provider and api_keys.

r = pydeck.Deck(
    layers=[...],
    initial_view_state=...,
    map_provider='google_maps',
    api_keys={'google_maps': '...'},
)
r.show()

This causes the call from here to get_from_map_identifier to not find any Google style for dark listed here. The end result is a blank/white basemap.

Environment

  • Framework version: pydeck 0.9.1
  • Browser: Google Chrome Version 132.0.6834.84 (Official Build) (arm64)
  • OS: Mac OS/X

Logs

None

@bijanvakili bijanvakili changed the title [Bug] Incorrect default map style for Google basemap [Bug] [pydeck] Incorrect default map style for Google basemap Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant