ArcGIS API for javascript--map configuration-slider tick, direction, size change

Source: Internet
Author: User

Describe

This example shows if you delete the tick marks of the zoom level slider. This is done by setting the Sliderlabel in esriconfig to null:

EsriConfig.defaults.map.sliderLabel = null;

By default, the zoom level slider is vertically oriented. You can change the slider to a horizontal direction by setting the Height property of the slider to null.

EsriConfig.defaults.map.slider = {right: "10px", Bottom: "10px", Width: "200px", height:null};

As shown in this example, you can change the size of the zoom level slider by setting the properties on the Esriconfig. This height is set to 100 pixels. A width of NULL indicates that the slider will be vertically oriented.

EsriConfig.defaults.map.slider = {right: "10px", Top: "10px", Width:null, Height: "100px"};

1 <!DOCTYPE HTML PUBLIC "-//w3c//dtd HTML 4.01//en" "HTTP://WWW.W3.ORG/TR/HTML4/STRICT.DTD">2 <HTML>3   <Head>4     <Metahttp-equiv= "Content-type"content= "text/html; charset=utf-8"/>5     <Metahttp-equiv= "X-ua-compatible"content= "Ie=7" />6     <title>Add a slider with no scale</title>7     <Linkrel= "stylesheet"type= "Text/css"href= "Http://serverapi.arcgisonline.com/jsapi/arcgis/1.5/js/dojo/dijit/themes/tundra/tundra.css">8     <Scripttype= "Text/javascript"src= "http://serverapi.arcgisonline.com/jsapi/arcgis/?v=1.5"></Script>9     <Scripttype= "Text/javascript"> Ten     One Dojo.require ("Esri.map"); A         functioninit () { -              -             //Add a slider with no scale the EsriConfig.defaults.map.sliderLabel= NULL;  -             //set the slider to the horizontal direction -             //EsriConfig.defaults.map.slider = {right: "10px", Bottom: "10px", Width: "200px", height:null}; -             //set the slider to the vertical direction +               //EsriConfig.defaults.map.slider = {right: "10px", Top: "10px", Width:null, Height: "100px"};  -             varMap= NewESRI. Map ("Map");  +             varLayer= NewEsri.layers.ArcGISTiledMapServiceLayer ("Http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_StreetMap_World_2D/MapServer");  A map.addlayer (layer); at          -         } - dojo.addonload (init);  -          -     </Script> -   </Head> in    <Bodyclass= "Tundra"> -     <DivID= "Map"style= "width:1024px; height:512px; border:1px solid #000;"></Div> to   </Body> + </HTML> -   the  

ArcGIS API for javascript--map configuration-slider tick, direction, size change

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.