Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

disableDefaultUI & disableDoubleClickZoom do not work #933

Closed
afeezaziz opened this issue Mar 14, 2017 · 11 comments · Fixed by #1709
Closed

disableDefaultUI & disableDoubleClickZoom do not work #933

afeezaziz opened this issue Mar 14, 2017 · 11 comments · Fixed by #1709

Comments

@afeezaziz
Copy link

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.

@sebholstein
Copy link
Owner

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

@vkniazeu
Copy link

vkniazeu commented Apr 7, 2017

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.

@0x62
Copy link

0x62 commented Apr 27, 2017

@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.

@vkniazeu
Copy link

@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.

@0x62
Copy link

0x62 commented May 2, 2017

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.

@rafaelgoulart
Copy link

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

@Jaze23
Copy link

Jaze23 commented Jun 15, 2017

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

@theRealAbdurrahman
Copy link

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

@diegoheusser
Copy link

[disableDefaultUI]="true" Apparently not working.

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

@imvikaskohli
Copy link

imvikaskohli commented Apr 2, 2018

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"

@stale
Copy link

stale bot commented Nov 13, 2018

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.

@ghost ghost self-assigned this Aug 23, 2019
msenosiain pushed a commit that referenced this issue Aug 23, 2019
correctly disables streetViewControl and zoomControl when
disableDefaultUi is set to true

fixes: #933
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants