-
Notifications
You must be signed in to change notification settings - Fork 0
/
config-readme.txt
474 lines (394 loc) · 15.5 KB
/
config-readme.txt
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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
//This file describes the format of the config.json.
{
//Required
"theme": {
"name": "FoldableTheme",
//This property stores all of the theme's styles. The app displays the first style by default.
"styles": [],
"customStyles": {
"mainBackgroundColor": ""
},
//Optional. It is the theme version.
"version": "1.1",
//from portal self
"sharedTheme": {
//whether portal support shared theme, set when create app.
isPortalSupport: true,
//optional, default is false
"useHeader": true,
//optional, default is false
"useLogo": true
}
},
//Optional. If not set, do not use proxy.
"httpProxy": {
//Optional. Default to false. If false all requests will not use proxy.
//If true, if the request match proxy rule, use proxy;
// if the request doesn't match proxy rule but need proxy(cross domain, i.e.), use proxy url;
// if the request neither match proxy rule nor the request doesn't need proxy, framework will check "alwaysUseProxy";
// if alwaysUseProxy=true, the request uses proxy url, or the request doesn't use proxy.
"useProxy": true,
//Optional. Default to false. If true, all requests use proxy.
"alwaysUseProxy": false,
//Optional. If not empty, the url will be set to esriConfig.defaults.io.proxyUrl property.
"url": "",
//Optional. If not empty, these rules will be added to urlUtils proxyRule.
"rules": [{
"urlPrefix": "",
"proxyUrl": ""
}]
},
//Optional. The portal URL. If empty, use the URL that app is hosted.
"portalUrl": "http://mypc.com/arcgis/",
//Optional. Whether the portal uses webtier authentication. Default to false.
"isWebTier": false,
//Optional. If the portal URL is arcgis.com, the appid is required for OAuth2 signin.
"appId": "",
//Optional, valid in online/portal only. Save app item id here because after app is downloaded, the app item id is lost, but we still need the item id in some cases.
"appItemId": "",
//Optional. Mostly, authorizedCrossOriginDomains stores portals and arcgis servers which use web-tier authentication, such as IWA/PKI/LDAP. If your app uses web-tier portal or arcgis server resources, please put its host(maybe with port) into authorizedCrossOriginDomains.
"authorizedCrossOriginDomains": [],
//Optional. The URL of the geometry service used by widgets and the webmap. If not set, it reads from the portal.
"geometryService": "",
//Provide Bing key if Bing Maps for maps or geocoding are used.
bingMapsKey: "",
//Optional. The logo/title/subtitle of app. Default value is default logo/"HTML5 app"/"A configurable web application".
"logo": "",
"title": "ArcGIS Web Application",
"subtitle": "A configurable web application",
//Optional. If true, the current map extent and the layer visibility will be kept before you leave the app so you can see the same map extent and layer visibility when open the app next time.
"keepAppState": true,
//Optional. App can contain some links.
"links":[
{
"url": "http://www.arcgis.com",
"label": "ArcGIS Online"
}
],
//define the layout of onscreen widget and map. if this property does not exist, use the jimu.js/layoutManagers/AbsolutePositionManager, this is the layout manager that WAB app has been using.
"layoutDefinition": {
//the layout manager can define how to manage the layout of onscreen widgets/groups.
//widgets in pool are still managed by controller widget
"manager": "",
//the layout structure depends on the manager
"layout": {
}
},
//define the data source of the app. there are two kinds of data sources: widget data source and extra data source.
"dataSource": {
//this array will store external data sources
"dataSources": {
'data source id': {
//the data source id
//if it's from map, it's: (these are created from map layer, the lay itself is not data source)
// map~<layerId>~<filterId>:
//if it's generated by a widget, it's widget id;
// widget~<widgetId>~<dataSourceId>
//if it's added through extra data source, it's:
// external~<id>
id: "",
//the filter expression applied to layer or extra datasource
filter: "",
filterByExtent: true,
//the item id that the data source comes from.
itemId: "",
//the portal that the item is hosted.
portalUrl: "",
label: "",
isDynamic: ture,
//minutes
refreshInterval: 0,
//Features, FeatureStatistics
type: "",
url: "",
//for Features
dataSchema: {
geometryType: "",
// Field[]: http://jscore.esri.com/javascript/3/jsapi/field-amd.html
// includes the selected fields only
fields: [],
orderByFields: [], // ['Field1 DESC', 'Field2 ASC']
displayFieldName: "",
objectIdFieldName: "",
typeIdFieldName: ""
},
resultRecordType: "", //all, serviceLimitation, custom
resultRecordCount: 10,
//for FeatureStatistics
dataSchema: {
groupByFields: [], // field name array
//array of StatisticDefinition: https://developers.arcgis.com/javascript/3/jsapi/statisticdefinition-amd.html
statistics: [],
// Field[]: http://jscore.esri.com/javascript/3/jsapi/field-amd.html
// includes the used fields only
fields: [],
geometryType: "",
displayFieldName: "",
objectIdFieldName: "",
typeIdFieldName: ""
}
}
},
settings: {
//If the value of this property is not zero, all dynamic data sources will be refreshed on this interval.
//the unit is minute.
unifiedRefreshInterval: 0
}
},
"widgetOnScreen": {
//Widgets(not in group) are opened in this panel.
"panel": {
"uri": "jimu/PanelType1"
},
"widgets": [{
//Required. It is widget main class.
"uri": "widgets/Header/Widget",
//Optional. If not set, use the icon in widget folder.
"icon": "",
//optional. If not set, use widget name.
"label": "",
//Optional. If not set, default value is left=0, top=0.
//If panel is set, this means panel's position or widget position.
//If widget is closeable, this means widget icon's position or widget position.
//The framework uses 6 properties to position widget: left, top, bottom, right, width and height.
//Four properties should be enough to position the widget. This position method is the same as the HTML.
"position": {
"left": 0,
"top": 0,
"right": 0,
"bottom": 30,
"width": 100,
"height": 100,
//Optional.Value can be either map or browser. If not set, default value is "map".
"relativeTo": "map",
//these four properties will be applied to widget's domNode if provided.
"paddingRight": 10,
"paddingLeft": 10,
"paddingTop": 10,
"paddingBottom": 10,
//Optional. If not set, widget's z-index is auto. Please use values between 0 and 100.
"zIndex": 0
},
//Optional. Whether the widget will open at app start. The default value is false.
//Only valid for in-panel widget.
//If more than one widget in widgetOnScreen are set to true, the first one opens.
//If more than one widget in widget pool are set to true, it's the controller's responsibility to define how to open.
"openAtStart": true,
//Optional. Object or url. If object, it means widget's config object;
//If url, it means the location of the config file.
//if not set, the framework will check "hasConfig" property to decide the widget config.
"config": {},
//Optional. If not set, the value is true.
"visible": false,
//Optional. This property is valid for on-screen off-panel widget only.
//false means widget will be loaded and be put on the defined position, you can't close the widget;
//true means app will create an icon for this widget and user can open/close this widget by click the
//icon.
"closeable": false,
//Required. If the following version is older than the lastest widget's version, the framework will run widget's version manager to upgrade the widget's configuration.
"version": "1.1"
}],
//The group has position properties.
"groups": [{
//Optional. If set, all widgets in this group display in this panel.
//If not set, all widgets in this group display in the default panel.
"panel": {
"uri": "jimu/PanelType1",
"position": {
"left": 0,
"top": 0,
"right": 0,
"bottom": 30,
"width": 100,
"height": 100,
"relativeTo": "map",
}
},
//Widgets in the group have no position properties.
"widgets": [{
"uri": "widgets/Header/Widget",
"icon": "",
"label": ""
}],
//Optional. If not set, the value is true.
"visible": false,
//Optional. If not set, there is no limitaion of widget count.
"maxWidgets": 0
}]
},
"map": {
//Optional. If both 2D and 3D are not set, a 2D map is created by default.
//If 3D is true and 2D is false, it's a 3D app.
//If 3D is false and 2D is true, it's a 2D app.
//If both 3D and 2D are true, it's an app with ability of switching between 2D and 3D.
//The default map is 2D.
"3D": true,
"2D": true,
//Optional. The url where webmap is hosted. If not set, use app's portalUrl property.
"portalUrl": "",
//Optional. Webmap id or webscene id.
//If set, framework will use this property and ignore basemaps.
"itemId": "",
//The same as widget's fix position.
"position": {
"left": 0,
"top": 0,
"right": 0,
"bottom": 30,
"width": 100,
"height": 100
},
"mapOptions": {
//These properties are the same as the map API.
"extent": {
"xmin": 20, "xmax": 30, "ymin": 40, "ymax": 50, "spatialReference" { "wkid": 4326}
},
"center": "",
"level": 3
},
//Optional. It indicates how map refresh. If property 'useWebMapRefreshInterval' is true, means honor the individual interval of each layer and property 'minutes' will be ignored. If property 'useWebMapRefreshInterval' is false, means use a single interval specified by 'minutes' for all layers. The default value of property 'useWebMapRefreshInterval' is true.
"mapRefreshInterval": {
"useWebMapRefreshInterval": false,
"minutes": 0.5
},
// Config proxies to replace the premium layer in the map.
"appProxy": {
// Webmap id
"mapItemId": "",
"proxyItems": [{
"sourceUrl": "",
"proxyUrl": "",
"proxyId": "",
"useProxy": true
}]
}
},
//Widgets in this section are not loaded by the app, but are controlled by the widget(controller widget).
"widgetPool": {
//Optional. If set, widgets in the container display in this panel. Otherwise they display in the default panel.
"panel": {
"uri": "jimu/PanelType1",
"position": {
"left": 0,
"top": 0,
"right": 0,
"bottom": 30,
"width": 100,
"height": 100,
"relativeTo": "map"
}
},
"groups": [{
//Can be one or more widgets.
"widgets": [{
"uri": "widgets/Bookmark/Widget",
"icon": "",
"label": ""
}],
//Optional.If only one widget, this property is ignored.
"label": "",
//Optional. The sequence of the group/widget.
"index": 1,
//Optional. If not set, use widget container's panel;
//If set, it overrides the container's panel.
"panel": {
"uri": "jimu/PanelType1",
"position": {
"left": 0,
"top": 0,
"right": 0,
"bottom": 30,
"width": 100,
"height": 100
}
}
}],
"widgets": [{
"index": 2,
"uri": "widgets/Header/Widget",
"icon": "",
"label": ""
}]
},
/****************************************
This section define the app layout in mobile device. For now, app will switch to mobile mode if browser's
width/height is less than 600px.
The content of this property is the same as the whole app config, except that it can contain
on-screen widget/group position only.
You have two ways to define widget/group's position: array, or object.
If use array, you need to define widget/group's position one by one.
If use object, you can use widget's uri as a key, and use position as a value to define.
For placeholder, because it has no uri, so plese use "ph_<i>" as the key, the <i> is the index of the placeholder.
For group, so plese use "g_<i>" as the key, the <i> is the index of the group.
*****************************************/
"mobileLayout": {
"widgetOnScreen": {
"widgets": {
"themes/FoldableTheme/widgets/HeaderController/Widget":{
"position": {
"left": 0,
"top": 0,
"right": 0,
"height": 40,
"paddingRight": 0,
"relativeTo": "browser"
}
},
"widgets/Search/Widget":{
"position": {
"right": 2,
"top": 50,
"relativeTo": "browser",
"zIndex": 4
}
}
}
}
},
/****************************************
This section defines the loading page of your application. The background image and loading
gif are center-aligned.
*****************************************/
"loadingPage": {
//The backgroud color of the loading page.
"backgroundColor": "#508dca",
"backgroundImage":{
//Controls whether the backgroud image is visible. If it is false, the other options under "backgroudImage" will be ignored.
"visible":false,
//The uri of the backgroud image whose path is relative to the root of your application.
"uri": "configs/loading/images/background.png",
//The width of the image.
"width": 812,
//The height of the image.
"height": 972
},
"loadingGif":{
//Controls whether the gif image is visible. If it is false, the other options under "loadingGif" will be ignored.
"visible": true,
//The uri of the gif image whose path is relative to the root of your application.
"uri": "configs/loading/images/predefined_loading_1.gif",
//The width of the image.
"width": 58,
//The height of the image.
"height": 58
}
},
// Config proxies to replace the premium urls used in the app.
"appProxies": [{
"sourceUrl": "",
"proxyUrl": "",
"proxyId": "",
"useProxy": true
}],
/***********************************
if app is a tempalte or an app create from a template, they will have 'templateConfig' property.
for themplate: this property is used to define the mapping between the tempalte configuration and the original app.
for app create from a tempalte: this property is used to define the template based configuration.
The content of this property is the same with 'configurable parameters for templates' of ArcGIS online.
Please go here for details: http://server.arcgis.com/en/portal/latest/use/configurable-templates.htm
***********************************/
"templateConfig": {},
//if this property is true, means this app is created from a template
"isTemplateApp": true,
"wabVersion": "1.0"
}