<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no"/> <title>Simple Map</title> <link rel="stylesheet" href="http://js.arcgis.com/3.7/js/dojo/dijit/themes/claro/claro.css"> <link rel="stylesheet" href="http://js.arcgis.com/3.7/js/esri/css/esri.css"> <style> html, body, #map { height: 100%; margin: 0; } #measurementDiv { position: absolute; right: 10px; top: 10px; background-color: #fff; } </style> <script src="http://js.arcgis.com/3.7/"></script> <script> require(["esri/map", "esri/dijit/Measurement", "esri/units", "dojo/domReady!"], function(Map, Measurement, Units) { var map = new Map("map", { basemap: "topo", center: [-122.45,37.75], zoom: 13 }); var measurement = new Measurement({ map: map, defaultAreaUnit: Units.ACRES, defaultLengthUnit: Units.FEET }, dojo.byId('measurementDiv')); measurement.startup(); }); </script> </head> <body class="claro"> <div id="map"></div> <div id="measurementDiv"></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.