-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathstartup.js
129 lines (114 loc) · 3.85 KB
/
startup.js
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
/* global $ */
(function(){
require([
"esri/Map",
"esri/views/SceneView",
"esri/layers/SceneLayer",
"esri/views/MapView",
"esri/layers/GraphicsLayer",
"esri/widgets/Locate",
"esri/widgets/Locate/LocateViewModel",
"esri/widgets/BasemapToggle",
"esri/widgets/BasemapToggle/BasemapToggleViewModel",
"esri/widgets/Home",
"esri/widgets/Home/HomeViewModel",
"esri/layers/ArcGISTiledLayer",
"esri/PopupTemplate",
"esri/layers/FeatureLayer",
"esri/geometry/Point",
"esri/Graphic",
"esri/symbols/SimpleMarkerSymbol",
"esri/symbols/SimpleLineSymbol",
"esri/symbols/SimpleFillSymbol",
"esri/widgets/Search",
"esri/widgets/Search/SearchViewModel",
"esri/tasks/Locator",
"esri/Camera",
"esri/tasks/Geoprocessor",
"esri/tasks/support/LinearUnit",
"esri/tasks/support/FeatureSet",
"dojo/dom",
"dojo/on",
"dojo/domReady!"
], function(
Map, SceneView, SceneLayer, MapView, GraphicsLayer, Locate, LocateVM,
Toggle, ToggleVM, Home, HomeVM, ArcGISTiledLayer,
PopupTemplate, FeatureLayer, Point, Graphic,
SimpleMarkerSymbol, SimpleLineSymbol, SimpleFillSymbol,
Search, SearchVM, Locator, Camera,
Geoprocessor, LinearUnit, FeatureSet, dom, on
) {
Site.esriMap = Map;
Site.graphicsLayer = GraphicsLayer;
Site.dom = dom;
Site.on = on;
MapHelper.initalizeMap();
Site.esriMapView = MapView;
Site.esriSceneView = SceneView;
Site.sceneLayer = SceneLayer;
Site.locate = Locate;
Site.locateVM = LocateVM;
Site.toggle = Toggle;
Site.toggleVM = ToggleVM;
Site.home = Home;
Site.homeVM = HomeVM;
Site.tiledLayer = ArcGISTiledLayer;
Site.featureLayer = FeatureLayer;
Site.popupTemplate = PopupTemplate;
Site.point = Point;
Site.simpleMarkerSymbol = SimpleMarkerSymbol;
Site.simpleLineSymbol = SimpleLineSymbol;
Site.simpleFillSymbol = SimpleFillSymbol;
Site.graphic = Graphic;
Site.search = Search;
Site.searchVM = SearchVM;
Site.locator = Locator;
Site.camera = Camera;
Site.geoprocessor = Geoprocessor;
Site.linearUnit = LinearUnit;
Site.featureSet = FeatureSet;
MapHelper.loadMapView();
})
//Hookup UI Events
$('#mapType').change(function() {
MapHelper.initalizeMap();
$('#rotationButtons').hide();
$('#environmentDiv').hide();
switch ($(this).val()) {
case '1':
MapHelper.loadMapView();
break;
case '2':
MapHelper.loadSceneView();
break;
case '3':
MapHelper.loadSceneElevationView();
break;
case '4':
let transOptions = {transportationLayer: true};
MapHelper.loadSceneView(transOptions);
break;
case '5':
MapHelper.loadSceneCameraView();
$('#rotationButtons').show();
break;
case '6':
MapHelper.loadViewshed();
break;
case '7':
$('#environmentDiv').show();
MapHelper.loadShadowScene();
break;
case '8':
let popupOptions = {popupExample: true};
MapHelper.loadMapView(popupOptions);
break;
}
});
$('#basemaps').change(function() {
Site.map.basemap = $(this).val();
});
$('#trackCP').change(function() {
MapHelper.trackCenterPoint = $(this).is(':checked');
});
})()