-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
executable file
·70 lines (68 loc) · 2.05 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>Zoom to a State or County</title>
<!-- required ArcGIS API for JavaScript CSS -->
<link rel="stylesheet" href="http://serverapi.arcgisonline.com/jsapi/arcgis/3.4/js/esri/css/esri.css">
<!-- widget uses some dijits, bring in their CSS -->
<link rel="stylesheet" href="http://serverapi.arcgisonline.com/jsapi/arcgis/3.4/js/dojo/dijit/themes/tundra/tundra.css">
<!-- widget specific CSS -->
<link rel="stylesheet" href="extras/css/ZoomTo.css">
<style>
html, body, #map {
height:100%;
width:100%;
margin:0;
padding:0;
}
body {
background-color:#777;
overflow:hidden;
font-family:"Trebuchet MS";
}
#wrapper {
position: absolute;
right: 10px;
top: 10px;
z-index: 100
}
.tundra .dijitTextBox { margin: 0 } /* put labels and filtering selects on the same line */
</style>
<script>
var dojoConfig = {
parseOnLoad: true,
packages: [{
"name": "extras",
"location": location.pathname.replace(/\/[^/]+$/, "") + "/extras"
}]
}
</script>
<script src="http://serverapi.arcgisonline.com/jsapi/arcgis/3.4/"></script>
<script>
var map, zoomer;
require([
"extras/ZoomTo", "dojo/ready", "esri/map"
], function(ZoomTo, ready) {
// use ready (as opposed to dojo/domReady!) so that all modules
// are loaded before trying to create the zoom to widget
ready(function() {
map = new esri.Map("map", {
basemap: "topo",
center: [-94.219, 38.273],
zoom: 4
});
zoomer = new ZoomTo({ map: map }, dojo.byId("zoomer"));
zoomer.startup();
});
});
</script>
</head>
<body class="tundra">
<div id="map">
<div id="wrapper">
<div id="zoomer"></div>
</div>
</div>
</body>
</html>