-
Notifications
You must be signed in to change notification settings - Fork 34
/
schema.json
173 lines (173 loc) · 5.09 KB
/
schema.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
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "GeoView Basemap Panel Schema",
"type": "object",
"version": 1.0,
"comments": "Configuration for GeoView basemap panel package.",
"additionalProperties": false,
"definitions": {
"basemapNameNode": {
"type": "string",
"description": "The display name of the layer."
},
"basemapDescriptionNode": {
"type": "string",
"description": "Basemap description."
},
"thumbnailUrlNode": {
"type": "array",
"uniqueItems": true,
"items": { "type": "string" },
"description": "Basemap thumbnail urls."
},
"basemapLayerUrlNode": {
"type": "string",
"description": "The service endpoint of the basemap layer."
},
"basemapAttributionNode": {
"type": "string",
"description": "Basemap attribution text."
},
"basemapLayersNode": {
"type": "object",
"properties": {
"basemapId": {
"type": "string",
"description": "the id of the basmap layer."
},
"url": {
"$ref": "#/definitions/basemapLayerUrlNode"
},
"opacity": {
"type": "number",
"description": "the opacity of this layer.",
"default": 0
}
},
"additionalItems": false,
"required": ["basemapId", "url"]
},
"basemap": {
"type": "object",
"properties": {
"basemapId": {
"type": "string",
"description": "the basemap id",
"enum": ["transport", "simple", "shaded", "osm", "nogeom", "imagery"]
},
"shaded": {
"type": "boolean",
"description": "if a shaded layer should be included with this basemap.",
"default": false
},
"labeled": {
"type": "boolean",
"description": "if labels should be enabled in this basemap.",
"default": false
}
},
"additionalProperties": false,
"required": ["basemapId", "shaded", "labeled"]
},
"customBasemap": {
"type": "object",
"properties": {
"basemapId": {
"type": "string",
"description": "the basemap id."
},
"name": {
"$ref": "#/definitions/basemapNameNode"
},
"description": {
"$ref": "#/definitions/basemapDescriptionNode"
},
"thumbnailUrl": {
"$ref": "#/definitions/thumbnailUrlNode"
},
"layers": {
"type": "array",
"description": "a list of basemap layers",
"items": {
"$ref": "#/definitions/basemapLayersNode"
},
"minItems": 1
},
"attribution": {
"$ref": "#/definitions/basemapAttributionNode"
},
"zoomLevels": {
"type": "object",
"description": "Zoom levels for the basemap",
"properties": {
"min": {
"type": "integer",
"minimum": 0,
"maximum": 24,
"default": 0
},
"max": {
"type": "integer",
"minimum": 0,
"maximum": 24,
"default": 24
}
},
"additionalProperties": false,
"required": ["min", "max"]
}
},
"additionalProperties": false,
"required": ["basemapId", "name", "description", "layers"]
}
},
"properties": {
"isOpen": {
"type": "boolean",
"description": "Specifies whether the basemap panel is initially open or closed",
"default": false
},
"canSwichProjection": {
"type": "boolean",
"description": "Allow the user to switch projection from the basemap panel.",
"default": true
},
"supportedProjections": {
"type": "array",
"items": {
"type": "object",
"properties": {
"projectionCode": {
"type": "integer",
"enum": [3978, 3857],
"description": "Default projection to load on start."
},
"customBasemaps": {
"type": "array",
"description": "A list of custom basemaps.",
"items": {
"$ref": "#/definitions/customBasemap"
},
"minItems": 0
},
"coreBasemaps": {
"type": "array",
"description": "A list of basemaps available in the core to show in the panel.",
"items": {
"$ref": "#/definitions/basemap"
},
"minItems": 1
}
}
},
"minItems": 1,
"required": ["coreBasemaps", "customBasemaps"]
},
"version": {
"type": "string",
"enum": ["1.0"],
"description": "The schema version used to validate the configuration file. The schema should enumerate the list of versions accepted by this version of the viewer."
}
},
"required": ["canSwichProjection", "supportedProjections"]
}