How to disable pegman and fullscreen options in agm angular?

852 views Asked by At

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?

1

There are 1 answers

2
Manish Patidar On BEST ANSWER

HTML

<agm-map (mapReady)="onMapReady($event)"

TS

onMapReady(map?: google.maps.Map ){
   if(map)
     map.setOptions({
       streetViewControl: false,
       fullscreenControl: false
     });
 }