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.



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
| improve this answer | |

I did it with:

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

For anyone trying to accomplish this using the 4.x versions of the API, try the following when using the MapView (or SceneView) constructor:

var view = new MapView ({
    container: "viewDiv",
    map: map,
    ui: {
        components: [ "attribution" ]

Source: https://developers.arcgis.com/javascript/latest/sample-code/view-disable-zoom/index.html

| improve this answer | |

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.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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