I'm using the react-google-maps package to render a Google Map in my react application. I would like to disable street view.
From the documentation, I see there are props for:
defaultStreetView
streetView
I have tried using both with false - but neither works. Does anyone know how to disable street view functionality via this package?
Code snippet here:
import React, { Component } from 'react';
import { withScriptjs, withGoogleMap, GoogleMap, Marker } from "react-google-maps";
import PropTypes from 'prop-types';
const Map = withScriptjs(withGoogleMap((props) => {
return(
<GoogleMap
defaultZoom={17}
defaultCenter={{ lat: props.lat, lng: props.lng }}
// defaultStreetView={false}
// streetView={false}
>
{props.isMarkerShown && <Marker position={{ lat: props.lat, lng: props.lng }} />}
</GoogleMap>
)
}))
Map.propTypes = {
lat: PropTypes.number.isRequired,
lng: PropTypes.number.isRequired,
isMarkerShown: PropTypes.bool.isRequired
}
export default Map;