-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
73 lines (64 loc) · 1.38 KB
/
index.html
File metadata and controls
73 lines (64 loc) · 1.38 KB
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
71
72
73
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no">
<link rel="stylesheet" href="https://js.arcgis.com/4.8/esri/css/main.css">
<link rel="stylesheet" href="app/widget/css/Widget.css">
<script>
var href = location.href;
var demoLocation = href.slice(0, href.lastIndexOf("/"));
var dojoConfig = {
//locale: "es",
packages: [{
name: "app",
location: demoLocation + "/app"
}]
};
</script>
<script src="https://js.arcgis.com/4.8/"></script>
<style>
html,
body,
#viewDiv {
height: 100%;
width: 100%;
margin: 0;
padding: 0;
overflow: hidden;
}
</style>
<script>
require([
"esri/Map",
"esri/views/MapView",
"app/widget/Widget",
"dojo/domReady!"
], function (
Map,
MapView,
MyWidget
) {
var map = new Map({
basemap: 'osm'
});
var view = new MapView({
container: "viewDiv",
ui: {
components: ["zoom"]
},
map: map,
center: [104, 33],
zoom: 4,
});
var attribution = new MyWidget({
view: view
});
view.ui.add(attribution, "bottom-right");
});
</script>
</head>
<body>
<div id="viewDiv"></div>
</body>
</html>