1

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?

Atif Azad
  • 697
  • 2
  • 9
  • 21

1 Answers1

3

HTML

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

TS

onMapReady(map?: google.maps.Map ){
   if(map)
     map.setOptions({
       streetViewControl: false,
       fullscreenControl: false
     });
 }
MrUpsidown
  • 21,592
  • 15
  • 77
  • 131
Manish Patidar
  • 526
  • 4
  • 14
  • Thanks Manish second option works for me. – Atif Azad Apr 22 '22 at 04:25
  • I have edited your answer to remove the CSS approach. Do **not** use undocumented properties. CSS classnames are subject to change, are undocumented, and your code could stop working at any moment in case you use them. This is exactly why you have (documented) map options to turn this kind of features on and off. – MrUpsidown Apr 22 '22 at 07:08