Hide Table of Contents
View Add slider with no ticks sample in sandbox
Add slider with no ticks

Description

This sample demonstrates how to remove the tick marks from the zoom level slider. You do this by setting the sliderLabel to null in esriConfig:

esriConfig.defaults.map.sliderLabel = null;

Code

<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    
    <meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no">
    <title>Map Slider No Labels</title>
    <link rel="stylesheet" href="https://js.arcgis.com/3.22/dijit/themes/claro/claro.css">
    <link rel="stylesheet" href="https://js.arcgis.com/3.22/esri/css/esri.css">

    <style>
      .esriLargeSliderTicks { 
        display: none; 
      }
    </style>
    
    <script src="https://js.arcgis.com/3.22/"></script>
    <script>
      dojo.require("esri.map");

      function init() {
        var map = new esri.Map("map", {
          center: [-68.906, 28.922],
          zoom: 3,
          sliderStyle: "large"
        });
        map.addLayer(new esri.layers.ArcGISTiledMapServiceLayer("https://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer"));
      }

      dojo.ready(init);
    </script>
  </head>
  <body class="claro">
    <div id="map" style="width:1024px; height:512px; border:1px solid #000;"></div>
  </body>
</html>