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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support map ids for vector maps #1443

Merged
merged 1 commit into from Sep 28, 2020

Conversation

Kjagd
Copy link
Contributor

@Kjagd Kjagd commented Sep 28, 2020

Google now supports using vector maps instead of raster (in beta), see https://developers.google.com/maps/documentation/javascript/vector-map 馃帀

In order to support this, the load script url needs to include the available map ids.

Additionally, the MapOptions should include the specific mapId, however the official types are not yet updated, as evident from their own examples here.

However, since all the option props from the GoogleMap component are applied, we can just use

<GoogleMap
  onLoad={onMapMount}
  options={{ mapId: '...' } as google.maps.MapOptions }
/>

and wait for the official types to get updated.

I've tested it, and it works pretty well.

image

@JustFly1984 JustFly1984 merged commit ca6ef34 into JustFly1984:develop Sep 28, 2020
@JustFly1984
Copy link
Owner

released 1.11.0

@Kjagd Kjagd mentioned this pull request Oct 27, 2020
@Kjagd Kjagd mentioned this pull request Aug 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants