Angular-google-maps: disableDefaultUI & disableDoubleClickZoom do not work

Created on 14 Mar 2017  ·  11Comments  ·  Source: SebastianM/angular-google-maps

Issue description

I am trying to disable disableDefaultUI & disableDoubleClickZoom but on both iOS simulator and ionic serve, both functions still work.

Steps to reproduce and a minimal demo of the problem

Code as per tutorial but with the disableDefaultUI & disableDoubleClickZoom variables added:
title: string = 'My first angular2-google-maps project'; zoom: number = 16; lat:number = 13.0476421; lng: number = 11.6865258; disDoubleClickZoom: boolean = true; disDefaultUI: boolean =true;

HTML:
<sebm-google-map [latitude]="lat" [longitude]="lng" [styles]="map_features" [zoom]="zoom" [disableDoubleClickZoom]="disDoubleClickZoom" [disableDefaultUI]="disDefaultUI"> <sebm-google-map-marker [latitude]="lat" [longitude]="lng"></sebm-google-map-marker> </sebm-google-map>

Current behavior

Booleans were not passed maps in HTML.

Expected/desired behavior

Booleans should pass to the map and Default UI and double click disabled.

angular2 & angular-google-maps version

Latest version.

important AgmMap bug

Most helpful comment

[disableDefaultUI]="true" Apparently not working.

I solved my problem by disabling the controls one by one with:
[zoomControl]="false"
[streetViewControl]="false"

All 11 comments

Please create a Plunkr to show the bug. The code/bindings looks right.

Toggling from [disableDefaultUI]="false" to [disableDefaultUI]="true" seems to have no effect for me either.
On the other hand, [streetViewControl]="false" works fine and hides the street view button as expected.

Folks reported this problem in https://gitter.im/SebastianM/angular2-google-maps as well on March 31.

@vkniazeu It's not possible to enable the default UI if it has been disabled without destroying and recreating the map (that's a Google restriction). Whether or not AGM should account for this and automatically destroy/recreate is up to the maintainers, however I'm gonna guess from this comment that they're not interested in changing this.

However, I can reproduce your issue with disableDefaultUI, it does not work even if initially set to true.

@0x62 Thank you for confirming this.
I didn't mean to say toggling after the map has already been created. I just meant setting the value to "true" initially didn't have any effect.
And indeed, for dynamic changes of these values, just like language of the map, for example, you'd have to recreate the AGM container, which is by design and understandable.

I also had issues with draggable, however looking through the source I discovered that the actual property is mapDraggable but doesn't appear to be documented anywhere.

Same problem here. [disableDefaultUI]="true" doesn't work.

Same here for [disableDefaultUI]="true" , any news on that ?

Not working for me either. Did you guys find any solution?

[disableDefaultUI]="true" Apparently not working.

I solved my problem by disabling the controls one by one with:
[zoomControl]="false"
[streetViewControl]="false"

Toggling from [disableDefaultUI]="false" to [disableDefaultUI]="true" seems to have no effect for me either.
To remove zoom options(plus and minus buttons), use [zoomControl] option and set it to "false"
and for remove street view use [streetViewControl] option and set it to "false"

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Was this page helpful?
0 / 5 - 0 ratings