react-google-maps
react-google-maps copied to clipboard
How do I remove point of interest from the map component?
Is it possible to remove all point of interest from the map?
Yea, I had the same issue, i did this: (The options -> styles part)
<GoogleMap ref={(map) => map && map.fitBounds(bounds)} defaultZoom={defaultZoom} defaultCenter={new google.maps.LatLng( props.mapCenter.lat, props.mapCenter.lng, )} options={{ styles: [{ elementType: "labels", featureType: "poi.business", stylers: [{ visibility: "off", }], }], }} ><Markers etc /></GoogleMap>
Hmm, for some reason this doesn't work for me. I tried various options:
{
featureType: 'poi',
stylers: [{ visibility: 'off' }],
},
{
featureType: 'poi.business',
stylers: [{ visibility: 'off' }],
}, {
featureType: 'poi',
elementType: 'labels',
stylers: [{ visibility: 'off' }],
},
{
featureType: 'poi.business',
elementType: 'labels',
stylers: [{ visibility: 'off' }],
},
but none seems to work.
@gaelicgod Thanks a lot.