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

Provide a way to set map id. #1070

Open
TikYengibaryan opened this issue Oct 30, 2021 · 2 comments · May be fixed by #1086
Open

Provide a way to set map id. #1070

TikYengibaryan opened this issue Oct 30, 2021 · 2 comments · May be fixed by #1086

Comments

@TikYengibaryan
Copy link

Is your feature request related to a problem? Please describe 🙏
I've some default styling in my GCP and want to access it with mapId. I can do it with pure js and GCP API, but can't realize it with google-map-react, google-map-react doesn't provide a way to do so.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like 🤔
I would like to give mapId in options property.
A clear and concise description of what you want to happen.

Describe alternatives you've considered ✨

A clear and concise description of any alternative solutions or features you've considered.

Additional context

Add any other context or screenshots about the feature request here.

@benjamincurrie
Copy link

Also looking at adding themes to maps, would definitely appreciate the ability to set mapId in order to do this.

@jakeFeldman
Copy link

jakeFeldman commented Jan 9, 2022

You can add mapId to the options prop. If using typescript it's not defined in the types package and there is a warning in the console since mapId should not be used in conjunction with styles, but the map renders correctly. I've added a PR in this repo to remove the styles object and another PR in the typed repo to support the key on the MapOptions type

Hope that helps.

GoogleMapReact: #1086
TypeDefs: DefinitelyTyped/DefinitelyTyped#58072

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 a pull request may close this issue.

3 participants