React Google Maps
A place to ask questions and discuss the @react-google-maps/api library
How do I add a new layer style on a map
So I am trying to add lines (from an underground station data) using geojson - I have these working so that one line can be selected as so using the useGoogleMap hook. But then if I want to use a different color for the line I am struggling. As they are all given the new color.…
[SOLVED] TypeError: Cannot read property 'maps' of undefined
Turns out that all you need to do for the browser to properly read the google variable, is to declare the map as an independent component. Meaning that you should not declare <GoogleMap> nor load the script within the declaration of another component. Create a Map.js file and…
What's the easiest way of displaying an InfoWindow after a Marker click?
I can see there are a few approaches regarding how to display an InfoWindow attached to a Marker. I've decided to adopt the approach of passing an InfoWindow component as a child of a Marker one, so that the former gets attached automatically. However, whenever I open my map,…