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

Hide/show zoom control and scale bar (using vanilla JavaScript) #7

Open
bittner opened this issue Sep 15, 2016 · 0 comments
Open

Hide/show zoom control and scale bar (using vanilla JavaScript) #7

bittner opened this issue Sep 15, 2016 · 0 comments

Comments

@bittner
Copy link
Member

bittner commented Sep 15, 2016

ViaMichelin doesn't support hiding only the zoom control and the scale bar via their JavaScript API.

ViaMichelin support suggests to simply set the display style attribute of the related elements to none andblock, respectively.

Possible Solution

control.find(".ui-map-navigation").style.display = data.zoom_control ? "block" : "none";
control.find(".ui-map-scale").style.display = data.scale_bar ? "block" : "none";

In addition the ui-navigation-mode-selector (hand/lens icon above the zoom control) should generally be hidden, because it's not available with other map providers:

control.find(".ui-navigation-mode-selector").style.display = "none";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant