-
-
Notifications
You must be signed in to change notification settings - Fork 278
/
Copy pathapp.js
89 lines (73 loc) · 2.54 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
(function () {
/* eslint no-useless-escape: off */
var path = location.pathname.replace(/[^\/]+$/, '');
window.dojoConfig = {
async: true,
packages: [
{
name: 'viewer',
location: path + 'js/viewer'
}, {
name: 'gis',
location: path + 'js/gis'
}, {
name: 'config',
location: path + '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'
}
]
};
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', // build and manage the Widgets
// 'viewer/_WebMapMixin' // for WebMaps
'viewer/_SidebarMixin' // for mobile sidebar
//'config/_customMixin'
], function (
declare,
_ControllerBase,
_ConfigMixin,
_LayoutMixin,
_MapMixin,
_WidgetsMixin,
// _WebMapMixin
_SidebarMixin
//_MyCustomMixin
) {
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
//
// Mixin for Mobile Sidebar
_SidebarMixin,
_LayoutMixin,
_WidgetsMixin,
// _WebMapMixin,
_MapMixin,
// 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();
});
})();