Open fschroiff opened 1 month ago
This is available: when using the Maps JavaScript API beta-version, you can set headerDisabled={true}
on the InfoWindow component and provide your own content including a close button. (see https://visgl.github.io/react-google-maps/docs/api-reference/components/info-window#headerdisabled-boolean)
I'm not sure what kind of ramifications using a "beta" version of the API in a production environment has...
Understood. But without those API features there's very little we can do. You could probably add some styles to hide the default close-button and add your own in the content, but that's not officially supported (however, I think the gm-style-iw
classes on the DOM-elements created by the maps API haven't changed in years).
Another alternative would be to use the AdvancedMarker component to create a custom info window.
I would expect these features to be promoted to generally available in a month or two, I can try to get a more definitive answer on that.
Target Use Case
I'd like to be able to translate and style the close button.
Proposal
Maybe a prop on the InfoWindow component where I could add a new component for the button?