<!DOCTYPE html><html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=7,IE=9"> <!--The viewport meta tag is used to improve the presentation and behavior of the samples on iOS devices--> <meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no"> <title>Create Map</title> <link rel="stylesheet" href="http://serverapi.arcgisonline.com/jsapi/arcgis/3.3/js/dojo/dijit/themes/claro/claro.css"> <link rel="stylesheet" href="http://serverapi.arcgisonline.com/jsapi/arcgis/3.3/js/esri/css/esri.css"> <script src="http://serverapi.arcgisonline.com/jsapi/arcgis/3.3/"></script> <script> dojo.require("esri.map"); var map; var dynamicMapServiceLayer function init() { map = new esri.Map("map", { sliderOrientation: "horizontal" }); dojo.connect(map, "onLoad", initToolbar); //Takes a URL to a non cached map service. dynamicMapServiceLayer = new esri.layers.ArcGISDynamicMapServiceLayer("http://usaid-2k8:6080/arcgis/rest/services/MiriTestTable/MapServer"); map.addLayer(dynamicMapServiceLayer); } dojo.addOnLoad(init);function initToolbar(map) { alert(dynamicMapServiceLayer.layerInfos.length); for (var i=0, il=dynamicMapServiceLayer.layerInfos.length; i<il; i++) { alert(dynamicMapServiceLayer.layerInfos.id); }} </script> </head> <body class="claro"> <div id="map" style="width:900px; height:600px; border:1px solid #000;"></div> </body></html>
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.