I am using AGM Google map for my angular applications and trying to remove pegman and fullscreen options from the code. here is my code.
<agm-map [latitude]="lat" [longitude]="lng" [styles]="styles" [zoom]="zoom" [disableFullscreen]="true" [disablePegman]="true">
<agm-marker [latitude]="lat" [longitude]="lng"></agm-marker>
</agm-map>
Any idea? what i am doing wrong here?
CodePudding user response:
For disabling full screen
You can use CSS if nothing works,
for example:
.gm-fullscreen-control {
display: none;
}
for disabling street view you can add one function like this :
First, try this
[streetViewControl]="false"
If doesn't work second approach for both options :
HTML
<agm-map (mapReady)="onMapReady($event)"
TS
onMapReady(map?: google.maps.Map ){
if(map)
map.setOptions({
streetViewControl: false,
fullscreenControl: false
});
}