ArcGIS API for javascript--map configuration-Custom panning animations

Source: Internet
Author: User

Describe

This example shows how to customize the animation of a map when the user taps the pan button. Panduration and Panrate are Dojo animation properties that determine the animation's duration and frame refresh rate, respectively. The units of these properties are milliseconds, and panduration defaults to a value of 250,panrate that is 25.

In this example, you can adjust these properties to get a better look for data and apps. For example, if the map takes a long time to load, you can increase the value of panduration to wait for the flat map to load with fewer empty screen times. Conversely, if the map loads quickly, you can reduce the panduration to the map faster.

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>Custom panning Animations</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 Dojo.require ("Esri.map"); One         functioninit () { A             //Custom Panning Animations - esriConfig.defaults.map.panDuration=  +;//The unit is milliseconds, and the default value is - esriConfig.defaults.map.panRate=  -;//unit is milliseconds, the default value is the              -              -             varmyextent= NewEsri.geometry.Extent (- the, -,- +, $,NewESRI. Spatialreference ({wkid:4326})); -             varMap= NewESRI. Map ("Mapdiv", {nav:true, extent:myextent}); + Map.addlayer (NewEsri.layers.ArcGISTiledMapServiceLayer ( -             "Http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_Imagery_World_2D/MapServer" +              A             )); at          -         } - dojo.addonload (init); -     </Script> -   </Head> -    <Bodyclass= "Tundra"> in Configure Map Zoom pan animation -     <DivID= "Mapdiv"style= "width:1024px; height:512px; border:1px solid #000;"></Div> to   </Body> + </HTML>

ArcGIS API for javascript--map configuration-Custom panning animations

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.