AnsweredAssumed Answered

How do I get the current extent in AMD and then how do I set the current extent; I use a WKID of 3435.

Question asked by csergent08 Champion on Nov 7, 2014
Latest reply on Nov 7, 2014 by timw1984

Here is my code:

<!DOCTYPE html>

<html>

    <head>

        <title>Create a Map</title>

        <meta http-equiv="content-type" content="text/html; charset=utf-8">

        <meta name="viewport" content="initial-scale=1,maximum-scale=1, user-scalable=no">

        <link rel="stylesheet" href="http://js.arcgis.com/3.11/dijit/themes/claro/claro.css">

        <link rel="stylesheet" href="http://js.arcgis.com/3.11/esri/css/esri.css">

        <style>

            html, body, #mapDiv

            {

                padding:0;

                margin:0;

                height:100%;

            }

        </style>

        <script src="http://js.arcgis.com/3.11/"></script>

        <script>

            var map;

           

            require(["esri/map", "esri/layers/ArcGISTiledMapServiceLayer", "esri/layers/ArcGISDynamicMapServiceLayer", "dojo/domReady!"], function (Map, Tiled, ArcGISDynamicMapServiceLayer

            ) {

                map = new Map("mapDiv", {

                    showAttribution: false,

                    sliderStyle: "large"

                   

                });

 

 

                var tiled = new Tiled("http://maps.decaturil.gov/arcgis/rest/services/Aerial_2014_Tiled/MapServer");

                map.addLayer(tiled);

                var baseLayer = new ArcGISDynamicMapServiceLayer("http://maps.decaturil.gov/arcgis/rest/services/Base/MapServer");

                var operationalLayer = new ArcGISDynamicMapServiceLayer("http://maps.decaturil.gov/arcgis/rest/services/Public/InternetVector/MapServer", { "opacity": 0.5 });

                map.addLayer(baseLayer);

                map.addLayer(operationalLayer);

            }

 

 

                );

 

 

        </script>

    </head>

    <body class="soria">

        <div id="mapDiv">

            <div id="extentDiv">

            <textarea>Test</textarea>

        </div>

        </div>

       

    </body>

</html>

Outcomes