This repository has been archived by the owner on Jul 7, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
example-placement-over-esri-map.html
139 lines (125 loc) · 3.81 KB
/
example-placement-over-esri-map.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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
<!DOCTYPE html>
<html>
<head>
<title>layer-selector Tests</title>
<!-- META TAGS -->
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<!-- CSS -->
<link rel="stylesheet" href="../resources/LayerSelector.css">
<link rel="stylesheet" href="../node_modules/arcgis-js-api/css/main.css">
<style type="text/css">
body, html, #map {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
overflow: hidden;
}
</style>
<!-- JAVASCRIPT -->
<script type="text/javascript" src="dojoConfig.js"></script>
<script type="text/javascript" src="../node_modules/dojo/dojo.js"></script>
<script type="text/javascript">
var widgetUnderTest;
require([
'layer-selector',
'esri/Map',
'esri/views/MapView',
'esri/geometry/Extent',
'dojo/domReady!'
], function (Module, Map, MapView, Extent) {
var mapView = new MapView({
map: new Map(),
container: 'map'
});
mapView.extent = new Extent({
xmax: -12010849.397533866,
xmin: -12898741.918094235,
ymax: 5224652.298632992,
ymin: 4422369.249751998,
spatialReference: {
wkid: 3857
}
});
const noop = function () {};
widgetUnderTest = new Module({
mapView: mapView,
right: false,
baseLayers: [{
id: 'Layer1',
Factory: noop
}],
overlays: [{
id: 'Overlay1',
Factory: noop
}]
});
widgetUnderTest.startup();
var widgetUnderTest2 = new Module({
mapView: mapView,
baseLayers: [{
id: 'Layer1',
Factory: noop
}, {
id: 'Layer2',
Factory: noop
}],
overlays: [{
id: 'Overlay1',
Factory: noop
}, {
id: 'Overlay2',
Factory: noop
}]
});
widgetUnderTest2.startup();
var widgetUnderTest3 = new Module({
mapView: mapView,
top: false,
baseLayers: [{
id: 'Layer1',
Factory: noop
}, {
id: 'Layer2',
Factory: noop
}],
overlays: [{
id: 'Overlay1',
Factory: noop
}, {
id: 'Overlay2',
Factory: noop
}]
});
widgetUnderTest3.startup();
var widgetUnderTest4 = new Module({
mapView: mapView,
top: false,
right: false,
baseLayers: [{
id: 'Long layer name here',
Factory: noop
}, {
id: 'Another long layer name',
Factory: noop
}],
overlays: [{
id: 'Overlay1',
Factory: noop
}, {
id: 'Overlay2',
Factory: noop
}]
});
widgetUnderTest4.startup();
});
</script>
</head>
<body>
<div id="map"></div>
<div class="node" id="node"></div>
<div class="node" id="node2"></div>
<div class="node" id="node3"></div>
<div class="node" id="node4"></div>
</body>
</html>