You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Reacted by Daniel Giraldo, Benjamin Currie, TigranYengiba04, Alberto A., 2patryk, Jacob Feldman, cvolant and Paul Noble
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
Activity
benjamincurrie commentedon Nov 4, 2021
Also looking at adding themes to maps, would definitely appreciate the ability to set mapId in order to do this.
jakeFeldman commentedon Jan 9, 2022
You can add
mapIdto the options prop. If using typescript it's not defined in the types package and there is a warning in the console sincemapIdshould not be used in conjunction withstyles, 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 typeHope that helps.
GoogleMapReact: #1086
TypeDefs: DefinitelyTyped/DefinitelyTyped#58072