myTiledMapServiceLayer = new esri.layers.ArcGISTiledMapServiceLayer
myTiledMapServiceLayer = new esri.layers.ArcGISDynamicMapServiceLayer
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html id="Html1" runat="server" xmlns="http://www.w3.org/1999/xhtml" dir="ltr"> <head id="Head1" runat="server"> <title>Web Mapping Application using Javascript API</title> <link href='https://community.esri.com/ArcGIS1/rest/ESRI.ArcGIS.Rest.css' rel='stylesheet' type='text/css' /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <link rel="stylesheet" type="text/css" href="http://serverapi.arcgisonline.com/jsapi/arcgis/1.6/js/dojo/dijit/themes/tundra/tundra.css" /> <script type="text/javascript" src="http://serverapi.arcgisonline.com/jsapi/arcgis/?v=1.6"></script> <script type="text/javascript"> dojo.require("esri.map"); ///The script references the location of the ArcGIS Server JavaScript API files and the "map" package is referenced ///Note that the version number needs to be updated to the current version of the JavaScript API. var myMap; var myTiledMapServiceLayer; function init() { myMap = new esri.Map("mapDiv"); myTiledMapServiceLayer = new esri.layers.ArcGISTiledMapServiceLayer("http://din201009/ArcGIS1/rest/services/BaseMapping/MapServer"); myMap.addLayer(myTiledMapServiceLayer); ///layer is added to a map } dojo.addOnLoad(init); ///Onload event </script> <%-- For LTR. . . use these styles if dir="ltr" in html tag --%> <style type="text/css"> .appFloat1 {float: left;} .appFloat2 {float: right;} .appAlign1 {text-align: left;} .appAlign2 {text-align: right;} .combined1 {float: left; text-align: left;} .combined2 {float: right; text-align: right;} .mapPosition {left: 260px; visibility: visible;} .dockPosition {left: 0px; visibility: visible;} .dockToggleClass {visibility: visible;} .offview {top: 1600px;} </style> </head> <body style="margin: 0px 0px 0px 0px; background-color: white; width: 100%; font-family: Verdana; font-size:8pt; " > <div id="mapDiv" class="tundra" style="width:900px; height:600px; border:1px solid #000;"></div> <h4>Work flow:</h4> <ul> <li>Create a map.</li> <li>Add an ArcGISTiledMapServiceLayer.</li> </ul> <form id="form1" runat="server"> </form> <%-- <script language="javascript" type="text/javascript"> Sys.Application.add_init(startUp); </script> --%> </body> </html>
var sample = 'nicely formatted code';
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.