I am using the package react-google-maps/api
and want to change the heading of the maps. Any suggestions as to how it would be possible to do so?
I have tried to add the heading in the <GoogleMap/>
Component and I’ve also tried passing the values in the options
section of the Component but it still won't work.
<GoogleMap
mapContainerStyle={containerStyle}
center={center}
gestureHandling="greedy"
onLoad={onLoad}
onUnmount={onUnmount}
options={{
scrollwheel: true,
disableDefaultUI: true,
auto: true,
noClear: true,
backgroundColor: 'white',
enableHighAccuracy: true,
isFractionalZoomEnabled: true,
scaleControlOptions: true,
zoomControl: false,
streetViewControl: false,
mapTypeControl: false,
fullscreenControl: false,
zoom: 15,
gestureHandling: 'greedy',
}}
>
Heading and tilting are only supported by vector map. In order to use a vector map, there are two steps:
Javascript
, chooseVector
as the rendering type, and checkrotation
)options
prop, and mapID needs to be in theoptions
prop as well according to the PR.