I know I can render any React component as pins with this library. However, I would like to use this library to render the default markers. How can I use the default markers in the way below?
<GoogleMapReact
defaultCenter={defaultCenter}
defaultZoom={12} // You can adjust the initial zoom level
>
{markers.map((marker, index) => (
<Marker
key={index}
lat={marker.lat}
lng={marker.lng}
/>
))}
</GoogleMapReact>
I know I can do something like this, and it will render the markers on Api load:
<GoogleMapReact
bootstrapURLKeys={{
key: "the_key_goes_here",
}}
center={defaultCenter}
defaultZoom={5}
yesIWantToUseGoogleMapApiInternals
options={(map) => {
return {
mapTypeId: map.MapTypeId.HYBRID,
};
}}
onGoogleApiLoaded={({ map, maps }) => {
renderMarkers(map, maps, sites);
}}
></GoogleMapReact>
I want to be able to update and refresh those default markers using THIS react component. Seems like a bug to not be able to do this easily. How can this be done?
How can I use, refresh, and update the default google maps markers?
I know I can render any React component as pins with this library. However, I would like to use this library to render the default markers. How can I use the default markers in the way below?
I know I can do something like this, and it will render the markers on Api load:
I want to be able to update and refresh those default markers using THIS react component. Seems like a bug to not be able to do this easily. How can this be done?
How can I use, refresh, and update the default google maps markers?