forked from Esri/geodev-hackerlabs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
step_1.html
57 lines (53 loc) · 1.27 KB
/
step_1.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
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no">
<title>Locate Button</title>
<link rel="stylesheet" href="https://js.arcgis.com/3.16/esri/css/esri.css">
<style>
html, body, #map {
padding:0;
margin:0;
height:100%;
}
#LocateButton {
position: absolute;
top: 95px;
left: 20px;
z-index: 50;
}
</style>
<script src="https://js.arcgis.com/3.16/"></script>
<script>
var map;
require([
"esri/map",
"esri/dijit/LocateButton",
"dojo/domReady!"
], function(
Map, LocateButton
) {
map = new Map("map", {
center: [-56.049, 38.485],
zoom: 3,
basemap: "streets"
});
geoLocate = new LocateButton({
map: map
}, "LocateButton");
geoLocate.startup();
/* these are the samples i ripped off
https://developers.arcgis.com/javascript/jssamples/widget_locate.html
https://developers.arcgis.com/javascript/jssamples/fl_selection.html
https://developers.arcgis.com/javascript/jssamples/query_nomap.html
*/
});
</script>
</head>
<body>
<div id="map" class="map">
<div id="LocateButton"></div>
</div>
</body>
</html>