Angular-google-maps: Remove Street View Control

Created on 11 Jun 2016  路  7Comments  路  Source: SebastianM/angular-google-maps

Add somehow the option to remove the little streetViewControl 'Man'.
In my case, application is based on markers and since markers cannot be added in street view then it's an unnecessary feature.

important AgmMap

Most helpful comment

For anyone else looking for this..
Use [streetViewControl]="false" on <agm-map> element

All 7 comments

For anyone else looking for this..
Use [streetViewControl]="false" on <agm-map> element

This does not work, there is no streetViewControl property mentioned in the official docs either

correct, it changed. You must now disable defaultUI to remove defaults, and then add as necessary

correct, it changed. You must now disable defaultUI to remove defaults, and then add as necessary

How to add as necessary? For example I would like the +- buttons but not the street view one

Ok I found how to do it:

Put on agm-map tag:

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

And then:
```
onMapReady(map?: google.maps.Map ){
if(map)
map.setOptions({
streetViewControl: false
});
}

```

@ilprima no, that's not the right way even though it works.

The correct way is to disable defaultUi, and then add <agm-zoom-control>

@ilprima no, that's not the right way even though it works.

The correct way is to disable defaultUi, and then add <agm-zoom-control>

Thank you. I think this library needs a better documentation, with more examples

Was this page helpful?
0 / 5 - 0 ratings

Related issues

DeveloperAdd007 picture DeveloperAdd007  路  3Comments

matishw picture matishw  路  3Comments

dineshkumar20 picture dineshkumar20  路  3Comments

Subhojit1992 picture Subhojit1992  路  3Comments

stot3 picture stot3  路  3Comments