-
-
Notifications
You must be signed in to change notification settings - Fork 12
/
app.js
94 lines (81 loc) · 2.91 KB
/
app.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
(function () {
var path = location.pathname.replace(/[^/]+$/, '');
window.dojoConfig = {
locale: 'en-us',
async: true,
packages: [{
name: 'viewer',
location: 'https://cdn.jsdelivr.net/gh/cmv/cmv-app@develop/viewer/js/viewer'
}, {
name: 'gis',
location: 'https://cdn.jsdelivr.net/gh/cmv/cmv-app@develop/viewer/js/gis'
}, {
name: 'cmvConfig',
location: 'https://cdn.jsdelivr.net/gh/cmv/cmv-app@develop/viewer/js/config'
}, {
name: 'proj4js',
location: '//cdnjs.cloudflare.com/ajax/libs/proj4js/2.3.15'
}, {
name: 'flag-icon-css',
location: '//cdnjs.cloudflare.com/ajax/libs/flag-icon-css/2.8.0'
/* calcite maps */
}, {
name: 'bootstrap',
location: 'https://cdn.jsdelivr.net/gh/esri/[email protected]/dist/vendor/dojo-bootstrap'
}, {
name: 'calcite-maps',
location: 'https://cdn.jsdelivr.net/gh/esri/[email protected]/dist/js/dojo'
/* end calcite maps */
}, {
name: 'config',
location: path + 'config'
}, {
name: 'widgets',
location: path + 'widgets'
}]
};
require(window.dojoConfig, [
'dojo/_base/declare',
// minimal Base Controller
'viewer/_ControllerBase',
// *** Controller Mixins
// Use the core mixins, add custom mixins
// or replace core mixins with your own
'viewer/_ConfigMixin', // manage the Configuration
'viewer/_LayoutMixin', // build and manage the Page Layout and User Interface
'viewer/_MapMixin', // build and manage the Map
'viewer/_WidgetsMixin',
'config/_CalciteMixin'
], function (
declare,
_ControllerBase,
_ConfigMixin,
_LayoutMixin,
_MapMixin,
_WidgetsMixin,
_CalciteMixin
) {
var App = declare([
// add custom mixins here...note order may be important and
// overriding certain methods incorrectly may break the app
// First on the list are last called last, for instance the startup
// method on _ControllerBase is called FIRST, and _LayoutMixin is called LAST
// for the most part they are interchangeable, except _ConfigMixin
// and _ControllerBase
//
_LayoutMixin,
_WidgetsMixin,
// _WebMapMixin,
_MapMixin,
// Custom Mixin for Calcite Maps
_CalciteMixin,
// configMixin should be right before _ControllerBase so it is
// called first to initialize the config object
_ConfigMixin,
// controller base needs to be last
_ControllerBase
]);
var app = new App();
app.startup();
});
})();