forked from ramp4-pcar4/story-ramp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
MapSchema.json
707 lines (706 loc) · 27.3 KB
/
MapSchema.json
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
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Map Config Schema",
"type": "object",
"additionalProperties": false,
"$defs": {
"spatialReferenceNode": {
"type": "object",
"properties": {
"wkid": {
"type": "number",
"description": "an ESRI well known id denoting a projection"
},
"latestWkid": {
"type": "number",
"description": "an ESRI well known id denoting a projection"
}
},
"anyOf": [
{
"required": ["wkid"]
},
{
"required": ["latestWkid"]
}
],
"additionalProperties": false
},
"extentNode": {
"type": "object",
"properties": {
"xmin": {
"type": "number"
},
"ymin": {
"type": "number"
},
"xmax": {
"type": "number"
},
"ymax": {
"type": "number"
}
},
"required": ["xmin", "ymin", "xmax", "ymax"],
"additionalProperties": false
},
"extentSetNode": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"spatialReference": {
"$ref": "#/$defs/spatialReferenceNode",
"description": "The projection for the given extents."
},
"default": {
"$ref": "#/$defs/extentNode",
"description": "The default (starting) extent."
}
},
"required": ["id", "default", "spatialReference"],
"additionalProperties": false
},
"lodSetNode": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"lods": {
"type": "array",
"items": {
"type": "object",
"properties": {
"level": {
"type": "number"
},
"resolution": {
"type": "number"
},
"scale": {
"type": "number"
}
},
"required": ["level", "resolution", "scale"],
"additionalProperties": false
},
"description": "Level of details for a specific tile schema"
}
},
"required": ["id", "lods"],
"additionalProperties": false
},
"tileSchemaNode": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "A unique id identifying a tile schema (combination of an extent set and a zoom scale)"
},
"name": {
"type": "string",
"description": "The name to display in the basemap selector for the set of basemaps referencing this schema."
},
"extentSetId": {
"type": "string",
"description": "The extent set to be used for this basemap (should reference map.extentSets.id)."
},
"lodSetId": {
"type": "string",
"description": "Optional. The level of details set to be used for this basemap (should reference map.lod.id)."
},
"hasNorthPole": {
"type": "boolean",
"default": false,
"description": "Indicates if the map projection includes a north pole. Defaults to false to avoid errors."
}
},
"required": ["extentSetId", "lodSetId", "id", "name"],
"additionalProperties": false
},
"exportComponent": {
"type": "object",
"properties": {
"value": {
"type": "string",
"description": "Value to be passed to the generation function of this export component."
}
},
"description": "This is the initial configuration for an export component.",
"additionalProperties": false
},
"legendExportComponent": {
"type": "object",
"properties": {
"value": {
"type": "string",
"description": "Value to be passed to the generation function of this export component."
},
"columnWidth": {
"type": "integer",
"default": 350,
"description": "Value in pixels to be used as the column width for the export legend."
}
},
"description": "This is the initial configuration for a legend export component.",
"additionalProperties": false
},
"dynamicLayerEntryNode": {
"type": "object",
"properties": {
"index": {
"type": "number",
"description": "The index of the layer in the map service."
},
"name": {
"type": "string",
"description": "A descriptive name for the layer, can override the name coming from the service."
}
},
"required": ["index"],
"additionalProperties": false
},
"entry": {
"type": "object",
"description": "",
"properties": {
"layerId": {
"type": "string",
"description": "Link to a layer defined in the layers section"
},
"entryIndex": {
"type": "integer",
"description": "Index of the 'sublayer' in the case of an ESRI dynamic layer. This cannot point to an entry with stateOnly:true ."
},
"symbologyExpanded": {
"type": "boolean",
"default": false,
"description": "Indicates if symbology stack is expand by default"
}
},
"required": ["layerId"],
"additionalProperties": false
},
"entryGroup": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Title of the group"
},
"expanded": {
"type": "boolean",
"default": true
},
"children": {
"type": "array",
"items": {
"oneOf": [
{
"$ref": "#/$defs/entryGroup"
},
{
"$ref": "#/$defs/entry"
}
]
},
"minItems": 1
}
},
"required": ["name", "children"],
"additionalProperties": false
},
"legendStructured": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": ["structured"]
},
"root": {
"$ref": "#/$defs/entryGroup"
}
},
"required": ["type", "root"],
"additionalProperties": false
},
"featureLayerNode": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "The id of the layer for referencing within the viewer (does not relate directly to any external service)"
},
"name": {
"type": "string",
"description": "The display name of the layer. If it is not present the viewer will make an attempt to scrape this information."
},
"url": {
"type": "string",
"description": "The service endpoint of the layer. It should match the type provided in layerType."
},
"layerType": {
"type": "string",
"enum": ["esriFeature"]
}
},
"required": ["id", "layerType", "url"],
"additionalProperties": false
},
"dynamicLayerNode": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "The id of the layer for referencing within the viewer (does not relate directly to any external service)"
},
"name": {
"type": "string",
"description": "The display name of the layer. If it is not present the viewer will make an attempt to scrape this information."
},
"url": {
"type": "string",
"description": "The service endpoint of the layer. It should match the type provided in layerType."
},
"layerType": {
"type": "string",
"enum": ["esriDynamic"]
},
"singleEntryCollapse": {
"type": "boolean",
"default": false,
"description": "Indicates that the dynamic layer with a single layer entry should be rendered without the root group."
},
"layerEntries": {
"type": "array",
"items": {
"$ref": "#/$defs/dynamicLayerEntryNode"
},
"minItems": 1
}
},
"required": ["id", "layerType", "layerEntries", "url"],
"additionalProperties": false
},
"layerNode": {
"oneOf": [
{
"$ref": "#/$defs/featureLayerNode"
},
{
"$ref": "#/$defs/dynamicLayerNode"
}
]
},
"layerList": {
"type": "array",
"items": {
"$ref": "#/$defs/layerNode"
},
"minItems": 0
},
"baseMapNode": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "A unique identifier for the basemap."
},
"name": {
"type": "string",
"description": "Name of the basemap used for labeling."
},
"description": {
"type": "string",
"description": "Description of the basemap. Will be visible when basemap selector is expanded.Description of the basemap. Will be visible when basemap selector is expanded."
},
"altText": {
"type": "string",
"description": "Alt text for the basemap thumbnail image."
},
"tileSchemaId": {
"type": "string",
"description": "The tile schema for this basemap (should reference map.tileSchemas.id)"
},
"layers": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"default": ""
},
"layerType": {
"type": "string",
"default": ""
},
"url": {
"type": "string",
"default": ""
}
},
"additionalProperties": false,
"required": ["id", "layerType", "url"]
},
"minItems": 1,
"description": "A set of URLs which should be composited to form a basemap entry"
}
},
"required": ["id", "name", "description", "layers", "altText", "tileSchemaId"],
"additionalProperties": false
},
"sideMenuNode": {
"type": "object",
"properties": {
"logo": {
"type": "boolean",
"default": true,
"description": "Indicates if the logo should be shown in the left side menu."
},
"items": {
"type": "array",
"items": {
"$ref": "#/$defs/sideMenuButtons"
},
"default": [
["layers", "basemap"],
["fullscreen", "export", "share", "touch", "help", "about"],
["language"],
["plugins"]
]
}
},
"additionalProperties": false,
"description": "Specifies which options are available in the left side menu."
},
"sideMenuButtons": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string",
"enum": [
"layers",
"basemap",
"geoSearch",
"about",
"fullscreen",
"export",
"share",
"touch",
"help",
"language",
"plugins"
]
}
},
"appBarNode": {
"type": "object",
"properties": {
"geoSearch": {
"type": "boolean",
"default": true,
"description": "Shows the geosearch button in the main app toolbar. The button will be hidden if geosearch component is disabled or no search service URLs are provided."
},
"basemap": {
"type": "boolean",
"default": true,
"description": "Shows the basemap selector button in the main app toolbar."
}
},
"additionalProperties": false
},
"navBarNode": {
"type": "object",
"description": "Provides configuration to the nav bar. If not supplied the default nav bar buttons are shown.",
"properties": {
"zoom": {
"type": "string",
"enum": ["all", "buttons", "slider"],
"default": "buttons"
},
"extra": {
"$ref": "#/$defs/navBarButtons",
"default": ["fullscreen", "geoLocator", "home", "help"]
}
},
"required": ["zoom"],
"additionalProperties": false
},
"navBarButtons": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string",
"enum": [
"geoLocator",
"marquee",
"home",
"history",
"basemap",
"help",
"fullscreen",
"geoSearch",
"sideMenu",
"layers"
]
}
},
"mapComponentsNode": {
"type": "object",
"properties": {
"geoSearch": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
},
"showGraphic": {
"type": "boolean"
},
"showInfo": {
"type": "boolean"
}
}
},
"mouseInfo": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
},
"spatialReference": {
"$ref": "#/$defs/spatialReferenceNode"
}
}
},
"northArrow": {
"type": "object",
"enabled": {
"type": "boolean",
"default": true
}
},
"overviewMap": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
},
"layerType": {
"type": "string"
}
}
},
"scaleBar": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
}
}
},
"basemap": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
}
}
}
},
"additionalProperties": false
},
"legendUI": {
"type": "object",
"description": "Specifies options for the legend like reordering, importing, etc.",
"properties": {
"allowImport": {
"type": "boolean",
"default": true,
"description": "Specifies if the user-added layers are allowed."
},
"isOpen": {
"type": "object",
"description": "Specifies whether the legend is opened by default on initial loading of the map for small, medium, and large viewports.",
"properties": {
"large": {
"type": "boolean",
"default": false,
"description": "Whether the legend is opened by default on initial loading of the map for large viewports."
},
"medium": {
"type": "boolean",
"default": false,
"description": "Whether the legend is opened by default on initial loading of the map for medium viewports."
},
"small": {
"type": "boolean",
"default": false,
"description": "Whether the legend is opened by default on initial loading of the map for small viewports."
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
"help": {
"type": "object",
"description": "Specifies details for the Help section.",
"properties": {
"folderName": {
"type": "string",
"description": "Help folder name which contains the help description and images."
}
},
"required": ["folderName"],
"additionalProperties": false
}
},
"properties": {
"language": {
"type": "string",
"enum": ["en", "fr"],
"description": "ISO 639-1 code indicating the language of strings in the schema file"
},
"ui": {
"description": "A set of service endpoints used by the viewer",
"type": "object",
"properties": {
"fullscreen": {
"type": "boolean",
"default": false,
"description": "Indicates viewer takes up entire viewport."
},
"title": {
"type": "string",
"description": "An optional title to be used in the place of the default viewer title."
},
"appBar": {
"$ref": "#/$defs/appBarNode",
"default": {
"geoSearch": true,
"basemap": true
},
"description": "Provides configuration to the main app toolbar. If not supplied, the default appbar controls are displayed."
},
"navBar": {
"$ref": "#/$defs/navBarNode"
},
"sideMenu": {
"$ref": "#/$defs/sideMenuNode"
},
"help": {
"$ref": "#/$defs/help"
},
"legend": {
"$ref": "#/$defs/legendUI"
}
}
},
"services": {
"description": "A set of service endpoints used by the viewer",
"type": "object",
"properties": {
"proxyUrl": {
"type": "string",
"description": "An optional proxy to be used for dealing with same-origin issues. URL must either be a relative path on the same server or an absolute path on a server which sets CORS headers."
},
"exportMapUrl": {
"type": "string",
"description": "An ESRI service endpoint for generating map images. Should point directly to an endpoint that can be consumed by ESRI PrintTask. NOTE: The PrintTask service has to be asynchronous"
},
"export": {
"type": "object",
"description": "Export properties",
"properties": {
"title": {
"$ref": "#/$defs/exportComponent",
"description": "Title of the export graphic."
},
"map": {
"$ref": "#/$defs/exportComponent",
"description": "Map component."
},
"mapElements": {
"$ref": "#/$defs/exportComponent",
"description": "North arrow and scalebar component."
},
"legend": {
"$ref": "#/$defs/legendExportComponent",
"description": "Legend component."
},
"footnote": {
"$ref": "#/$defs/exportComponent",
"description": "Foot notice to add to exported map"
},
"timeout": {
"type": "number",
"default": 120000,
"description": "A timeout delay in milliseconds after which the export image generation is considered to have failed. Defaults to 120sec."
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
"map": {
"type": "object",
"description": "Core map properties (extent sets, levels of detail)",
"properties": {
"extentSets": {
"type": "array",
"items": {
"$ref": "#/$defs/extentSetNode"
},
"description": "The default extent of the map."
},
"lodSets": {
"type": "array",
"items": {
"$ref": "#/$defs/lodSetNode"
},
"description": "The levels of detail (zoom scales) available for the map."
},
"tileSchemas": {
"type": "array",
"items": {
"$ref": "#/$defs/tileSchemaNode"
},
"minItems": 1,
"description": "A unique combination of an LoD and an extent set (each basemap must fit into a tile schema)."
},
"components": {
"type": "object",
"$ref": "#/$defs/mapComponentsNode"
},
"initialBasemapId": {
"type": "string",
"description": "Initial basemap to load. If not supplied viewer will select any basemap."
},
"baseMaps": {
"type": "array",
"items": {
"$ref": "#/$defs/baseMapNode"
},
"minItems": 1,
"description": "A list of basemaps available."
},
"layers": {
"$ref": "#/$defs/layerList",
"description": "Layer list in the order which they should be added to the map."
},
"legend": {
"$ref": "#/$defs/legendStructured",
"description": "A structured legend."
}
},
"required": ["tileSchemas", "baseMaps"]
}
}
}