Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Is there a way to hide the zoom-in/zoom-out buttons in ArcGIS javascript API? I have external zoom buttons elsewhere on the page, so these are no longer needed.

screenshot

share|improve this question

3 Answers 3

up vote 3 down vote accepted

Pass in slider: false as an option when creating the map. Here is the Map Options API Reference.

map = new Map("map", {
    basemap: "streets",                 
    slider: false
}
share|improve this answer

I did it with:

on(map, "load", function () {
        map.hideZoomSlider();
    });
share|improve this answer
    
Of course assuming you're sticking with the standard variable names from the samples... ie. on and map. –  Branco Jul 18 at 16:03

I believe you need to use method's showZoomSlider() / hideZoomSlider() property isZoomSlider. This should show or hide the zoom slider on the map.

Help link here. Examples of disabling here.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.