@versatiles/map-editor 4.0.0 → 4.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,821 +0,0 @@
1
- {
2
- "title": "VersaTiles map (.mapjson), format version 1",
3
- "description": "A map of the VersaTiles map editor: its visible area, properties and elements. See https://github.com/versatiles-org/versatiles-map-editor/blob/main/packages/map-state/MAPJSON.md",
4
- "$id": "https://versatiles.org/versatiles-map-editor/schema/mapjson-1.schema.json",
5
- "$schema": "http://json-schema.org/draft-07/schema#",
6
- "$ref": "#/definitions/MapJSON",
7
- "definitions": {
8
- "MapJSON": {
9
- "type": "object",
10
- "properties": {
11
- "frame": {
12
- "$ref": "#/definitions/StateFrame",
13
- "description": "What a shared or embedded map shows when it opens, and how its viewers can turn it."
14
- },
15
- "meta": {
16
- "$ref": "#/definitions/StateMetadata"
17
- },
18
- "elements": {
19
- "type": "array",
20
- "items": {
21
- "$ref": "#/definitions/StateElement"
22
- },
23
- "description": "The elements, in drawing order: the first one at the back, the last one in front."
24
- },
25
- "$schema": {
26
- "type": "string",
27
- "description": "The URL of the JSON Schema of the format version of the file, `MAPJSON_SCHEMA_URL`, e.g. for editors that check a file while it is written. The editor writes it; a reader does not need it."
28
- },
29
- "version": {
30
- "type": "integer",
31
- "description": "The version of the format of the file: 1. A file without it is of version 1.",
32
- "minimum": 1,
33
- "maximum": 1,
34
- "default": 1
35
- }
36
- },
37
- "required": ["elements"],
38
- "description": "The content of a .mapjson file: a map state with the URL of its schema."
39
- },
40
- "StateFrame": {
41
- "type": "object",
42
- "properties": {
43
- "bounds": {
44
- "$ref": "#/definitions/Bounds",
45
- "description": "The visible area: what the map shows completely, whatever the size and the shape of the window. Without it, the bounds of the elements are shown."
46
- },
47
- "bearing": {
48
- "type": "number",
49
- "description": "The rotation of the map: the compass direction at the top of the window, in degrees clockwise from north, e.g. 90 with east at the top. Default: 0, north at the top.",
50
- "exclusiveMinimum": -180,
51
- "maximum": 180,
52
- "default": 0
53
- },
54
- "pitch": {
55
- "type": "number",
56
- "description": "The tilt of the map, in degrees: 0 looks straight down, more looks towards the horizon. Default: 0.",
57
- "minimum": 0,
58
- "maximum": 60,
59
- "default": 0
60
- }
61
- },
62
- "description": "What a shared or embedded map shows when it opens: an area, seen from a direction. What its viewers can do from there is a setting of the viewer, see `StateViewer`."
63
- },
64
- "Bounds": {
65
- "type": "array",
66
- "minItems": 4,
67
- "items": [
68
- {
69
- "type": "number",
70
- "title": "west"
71
- },
72
- {
73
- "type": "number",
74
- "title": "south"
75
- },
76
- {
77
- "type": "number",
78
- "title": "east"
79
- },
80
- {
81
- "type": "number",
82
- "title": "north"
83
- }
84
- ],
85
- "maxItems": 4,
86
- "description": "A geographic area: west, south, east and north, in degrees (WGS 84)."
87
- },
88
- "StateMetadata": {
89
- "type": "object",
90
- "properties": {
91
- "background": {
92
- "$ref": "#/definitions/StateBackground",
93
- "description": "The background map. Without it, the map has the default one: the vector map of OpenStreetMap in the theme \"colorful\", see `BACKGROUND_DEFAULTS`."
94
- },
95
- "legend": {
96
- "$ref": "#/definitions/StateLegend",
97
- "description": "A legend, defined by the author, not generated from the elements."
98
- },
99
- "colorScheme": {
100
- "type": "string",
101
- "description": "The id of the color scheme offered for the map's colors. Without it, the default scheme."
102
- },
103
- "viewer": {
104
- "$ref": "#/definitions/StateViewer",
105
- "description": "What a shared or embedded map shows over it, and where: the search, the zoom buttons, the legend."
106
- },
107
- "labels": {
108
- "$ref": "#/definitions/StateLabels",
109
- "description": "How the labels of markers are shown. Those of the background map are settings of the background."
110
- },
111
- "title": {
112
- "type": "string",
113
- "description": "The title of the map, e.g. for the list of maps, the title of the page and file names."
114
- }
115
- }
116
- },
117
- "StateBackground": {
118
- "type": "object",
119
- "properties": {
120
- "base": {
121
- "type": "string",
122
- "enum": ["vector", "satellite"],
123
- "description": "The vector map of OpenStreetMap, or satellite imagery.",
124
- "default": "vector"
125
- },
126
- "theme": {
127
- "type": "string",
128
- "description": "The theme of the vector map, one of `@versatiles/style`, e.g. \"gray\" or \"gray-dark\".",
129
- "default": "colorful"
130
- },
131
- "streets": {
132
- "type": "boolean",
133
- "description": "Whether the satellite map shows streets, railways and the symbols of points of interest over the imagery. The vector map always does.",
134
- "default": true
135
- },
136
- "borders": {
137
- "type": "boolean",
138
- "description": "Whether the satellite map shows the borders of countries and states over the imagery. The vector map always does.",
139
- "default": true
140
- },
141
- "labels": {
142
- "type": "string",
143
- "enum": ["normal", "fewer", "none"],
144
- "description": "How many labels the map shows: all, fewer (with more space between them), or none.",
145
- "default": "normal"
146
- },
147
- "language": {
148
- "type": "string",
149
- "description": "The language of the labels: \"user\" (of the browser), \"local\" (the local names), or a language code, e.g. \"de\".",
150
- "default": "user"
151
- },
152
- "font": {
153
- "type": "string",
154
- "description": "The glyph font of the labels.",
155
- "default": "noto_sans_regular"
156
- },
157
- "labelSize": {
158
- "type": "number",
159
- "description": "The size of the labels, as a factor.",
160
- "exclusiveMinimum": 0,
161
- "maximum": 100,
162
- "default": 1
163
- },
164
- "haloWidth": {
165
- "type": "number",
166
- "description": "The width of the halo around the labels, in pixels. Default: 2 on the vector map, 1 over the imagery.",
167
- "minimum": 0,
168
- "maximum": 1000
169
- },
170
- "labelsOnTop": {
171
- "type": "boolean",
172
- "description": "Draw the labels over the areas and lines of the elements, instead of under them. The labels of markers are always on top.",
173
- "default": false
174
- },
175
- "colors": {
176
- "$ref": "#/definitions/StateBackgroundColors",
177
- "description": "Changes of the colors of the map."
178
- },
179
- "hillshade": {
180
- "type": "boolean",
181
- "description": "The relief shaded: hills and mountains with light and shadow.",
182
- "default": false
183
- },
184
- "terrain": {
185
- "type": "boolean",
186
- "description": "The terrain raised to its heights, which a tilted map shows.",
187
- "default": false
188
- },
189
- "buildings": {
190
- "type": "string",
191
- "enum": ["flat", "extruded"],
192
- "description": "The buildings of the vector map: \"flat\", or \"extruded\" to their heights, which a tilted map shows when zoomed in.",
193
- "default": "flat"
194
- },
195
- "options": {
196
- "type": "object",
197
- "additionalProperties": {},
198
- "description": "Options of `@versatiles/style` for what the settings cannot say, e.g. `{ \"features\": { \"terrain\": { \"exaggeration\": 2 } } }`: of `osm()` for the vector map, of `satellite()` for the imagery. They are laid over the options that the editor builds from the settings, so they win where both say something. The editor does not write them itself."
199
- }
200
- },
201
- "description": "The background map, as its author set it: the base map, its theme, its labels, its colors and its relief. The editor builds the map from these settings, with `@versatiles/style`. Missing fields have their default; the background with only defaults is not stored at all."
202
- },
203
- "StateBackgroundColors": {
204
- "type": "object",
205
- "properties": {
206
- "saturation": {
207
- "type": "number",
208
- "description": "From -1 (gray) to 1.",
209
- "minimum": -1,
210
- "maximum": 1,
211
- "default": 0
212
- },
213
- "black": {
214
- "type": "number",
215
- "description": "The lightness that black becomes, where 0 is black and 1 white.",
216
- "minimum": -1,
217
- "maximum": 1,
218
- "default": 0
219
- },
220
- "white": {
221
- "type": "number",
222
- "description": "The lightness that white becomes.",
223
- "minimum": 0,
224
- "maximum": 2,
225
- "default": 1
226
- }
227
- },
228
- "description": "Changes of the colors of the background map; without them, its colors are as they are."
229
- },
230
- "StateLegend": {
231
- "type": "object",
232
- "properties": {
233
- "layout": {
234
- "type": "string",
235
- "enum": ["vertical", "horizontal", "inline"],
236
- "description": "How the entries are arranged. \"inline\" flows like text. Default: \"vertical\".",
237
- "default": "vertical"
238
- },
239
- "font": {
240
- "type": "string",
241
- "enum": ["sans-serif", "serif", "monospace"],
242
- "description": "Default: \"sans-serif\".",
243
- "default": "sans-serif"
244
- },
245
- "bold": {
246
- "type": "boolean",
247
- "description": "The texts of all entries in bold. Default: false.",
248
- "default": false
249
- },
250
- "italic": {
251
- "type": "boolean",
252
- "description": "The texts of all entries in italic. Default: false.",
253
- "default": false
254
- },
255
- "theme": {
256
- "type": "string",
257
- "enum": ["light", "dark", "glass"],
258
- "description": "The background and the border of the legend. Default: \"light\".",
259
- "default": "light"
260
- },
261
- "entries": {
262
- "type": "array",
263
- "items": {
264
- "$ref": "#/definitions/StateLegendEntry"
265
- }
266
- }
267
- },
268
- "required": ["entries"]
269
- },
270
- "StateLegendEntry": {
271
- "anyOf": [
272
- {
273
- "$ref": "#/definitions/StateLegendMarker"
274
- },
275
- {
276
- "$ref": "#/definitions/StateLegendLine"
277
- },
278
- {
279
- "$ref": "#/definitions/StateLegendArea"
280
- }
281
- ],
282
- "description": "A row of the legend: a small copy of an element, and a text. Its styles are those of an element of its kind, with the same defaults (see the elements)."
283
- },
284
- "StateLegendMarker": {
285
- "type": "object",
286
- "properties": {
287
- "type": {
288
- "type": "string",
289
- "const": "marker"
290
- },
291
- "style": {
292
- "$ref": "#/definitions/MarkerStyle"
293
- },
294
- "label": {
295
- "type": "string",
296
- "description": "The text next to it.",
297
- "default": ""
298
- }
299
- },
300
- "required": ["type"],
301
- "description": "A legend entry with a marker."
302
- },
303
- "MarkerStyle": {
304
- "type": "object",
305
- "properties": {
306
- "symbol": {
307
- "type": "string",
308
- "description": "The image of the symbol, e.g. \"icons:anchor\", or \"\" for none.",
309
- "default": "extras:pin-teardrop"
310
- },
311
- "color": {
312
- "$ref": "#/definitions/HexColor",
313
- "description": "The color of the symbol, with its opacity.",
314
- "default": "#ff0000"
315
- },
316
- "size": {
317
- "type": "number",
318
- "description": "The size of the symbol, as a factor.",
319
- "exclusiveMinimum": 0,
320
- "maximum": 100,
321
- "default": 1
322
- },
323
- "rotation": {
324
- "type": "integer",
325
- "description": "The rotation of the symbol, in whole degrees clockwise, above -180 and up to 180.",
326
- "exclusiveMinimum": -180,
327
- "maximum": 180,
328
- "default": 0
329
- },
330
- "haloWidth": {
331
- "type": "number",
332
- "description": "The width of the halo around the symbol and the label, in pixels.",
333
- "minimum": 0,
334
- "maximum": 1000,
335
- "default": 1
336
- },
337
- "haloColor": {
338
- "$ref": "#/definitions/HexColor",
339
- "description": "The color of the halo around the symbol and the label.",
340
- "default": "#ffffff"
341
- },
342
- "labelColor": {
343
- "$ref": "#/definitions/HexColor",
344
- "description": "The color of the text of the label.",
345
- "default": "#000000"
346
- },
347
- "labelSize": {
348
- "type": "number",
349
- "description": "The size of the label, as a factor of 16 pixels.",
350
- "exclusiveMinimum": 0,
351
- "maximum": 100,
352
- "default": 1
353
- },
354
- "labelFont": {
355
- "type": "string",
356
- "description": "The glyph font of the label, e.g. \"noto_sans_bold\"; \"\" for the font of the labels of the background map.",
357
- "default": ""
358
- },
359
- "labelPosition": {
360
- "$ref": "#/definitions/LabelPositionName",
361
- "description": "The position of the label around the symbol; \"auto\" where it fits, or on the point without a symbol.",
362
- "default": "auto"
363
- },
364
- "flat": {
365
- "type": "boolean",
366
- "description": "The marker lies flat on the map, its symbol and its label: on a map that is rotated or tilted, it turns and tilts with the map, so e.g. an arrow keeps its compass direction, and the positions of the label are compass directions. Else it stands upright and faces the viewer, however the map is turned.",
367
- "default": false
368
- }
369
- },
370
- "description": "The style of a marker: its symbol, and the look of its label. Missing fields have their default."
371
- },
372
- "HexColor": {
373
- "type": "string",
374
- "description": "A color as hex code: \"#rrggbb\", or \"#rrggbbaa\" with its opacity (alpha). Written in lower case.",
375
- "pattern": "^#([0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"
376
- },
377
- "LabelPositionName": {
378
- "type": "string",
379
- "enum": ["auto", "right", "left", "top", "bottom", "top-right", "top-left", "bottom-right", "bottom-left"]
380
- },
381
- "StateLegendLine": {
382
- "type": "object",
383
- "properties": {
384
- "type": {
385
- "type": "string",
386
- "const": "line"
387
- },
388
- "style": {
389
- "$ref": "#/definitions/LineStyle"
390
- },
391
- "label": {
392
- "type": "string",
393
- "description": "The text next to it.",
394
- "default": ""
395
- }
396
- },
397
- "required": ["type"],
398
- "description": "A legend entry with a line."
399
- },
400
- "LineStyle": {
401
- "type": "object",
402
- "properties": {
403
- "color": {
404
- "$ref": "#/definitions/HexColor",
405
- "description": "The color of the line, with its opacity.",
406
- "default": "#ff0000"
407
- },
408
- "width": {
409
- "type": "number",
410
- "description": "The width, in pixels.",
411
- "minimum": 0,
412
- "maximum": 1000,
413
- "default": 2
414
- },
415
- "dash": {
416
- "$ref": "#/definitions/DashName",
417
- "description": "Solid, dashed, dotted, long dashes, or dashes and dots.",
418
- "default": "solid"
419
- },
420
- "arrowStart": {
421
- "$ref": "#/definitions/ArrowName",
422
- "description": "The arrowhead at the first point.",
423
- "default": "none"
424
- },
425
- "arrowEnd": {
426
- "$ref": "#/definitions/ArrowName",
427
- "description": "The arrowhead at the last point.",
428
- "default": "none"
429
- },
430
- "arrowSize": {
431
- "type": "number",
432
- "description": "The width of the arrowheads across the line, as a factor of the width of the line. Only with an arrowhead.",
433
- "exclusiveMinimum": 0,
434
- "maximum": 100,
435
- "default": 3
436
- }
437
- },
438
- "description": "The style of a line: its color, width and dashes, and its arrowheads. Missing fields have their default."
439
- },
440
- "DashName": {
441
- "type": "string",
442
- "enum": ["solid", "dashed", "dotted", "long-dash", "dash-dot"]
443
- },
444
- "ArrowName": {
445
- "type": "string",
446
- "enum": ["none", "triangle", "chevron", "circle"]
447
- },
448
- "StateLegendArea": {
449
- "type": "object",
450
- "properties": {
451
- "type": {
452
- "type": "string",
453
- "const": "area"
454
- },
455
- "style": {
456
- "$ref": "#/definitions/AreaStyle"
457
- },
458
- "outlineStyle": {
459
- "$ref": "#/definitions/OutlineStyle",
460
- "description": "The outline of the area."
461
- },
462
- "label": {
463
- "type": "string",
464
- "description": "The text next to it.",
465
- "default": ""
466
- }
467
- },
468
- "required": ["type"],
469
- "description": "A legend entry with an area, e.g. of a polygon or a circle."
470
- },
471
- "AreaStyle": {
472
- "type": "object",
473
- "properties": {
474
- "color": {
475
- "$ref": "#/definitions/HexColor",
476
- "description": "The color of the area, with its opacity.",
477
- "default": "#ff000040"
478
- },
479
- "pattern": {
480
- "$ref": "#/definitions/FillPatternName",
481
- "description": "The pattern of the fill.",
482
- "default": "solid"
483
- },
484
- "patternScale": {
485
- "type": "number",
486
- "description": "The size of the pattern, as a factor; at 1 the lines (across them) or the dots are 8 pixels apart. Only with a pattern.",
487
- "minimum": 0.5,
488
- "maximum": 4,
489
- "default": 1
490
- },
491
- "patternCoverage": {
492
- "type": "number",
493
- "description": "The share of the area that the lines or dots of the pattern cover, from 0.05 to 0.95. Only with a pattern.",
494
- "minimum": 0.05,
495
- "maximum": 0.95,
496
- "default": 0.5
497
- }
498
- },
499
- "description": "The style of an area (of a polygon or a circle): its color and pattern. Missing fields have their default."
500
- },
501
- "FillPatternName": {
502
- "type": "string",
503
- "enum": [
504
- "solid",
505
- "diagonal-up",
506
- "diagonal-down",
507
- "horizontal",
508
- "vertical",
509
- "cross",
510
- "diagonal-cross",
511
- "dots",
512
- "diagonal-dots"
513
- ]
514
- },
515
- "OutlineStyle": {
516
- "type": "object",
517
- "properties": {
518
- "visible": {
519
- "type": "boolean",
520
- "description": "Whether the outline is drawn.",
521
- "default": true
522
- },
523
- "color": {
524
- "$ref": "#/definitions/HexColor",
525
- "description": "The color of the outline, with its opacity.",
526
- "default": "#ff0000"
527
- },
528
- "width": {
529
- "type": "number",
530
- "description": "The width, in pixels.",
531
- "minimum": 0,
532
- "maximum": 1000,
533
- "default": 2
534
- },
535
- "dash": {
536
- "$ref": "#/definitions/DashName",
537
- "description": "Solid, dashed, dotted, long dashes, or dashes and dots.",
538
- "default": "solid"
539
- }
540
- },
541
- "description": "The style of the outline of an area. Missing fields have their default."
542
- },
543
- "StateViewer": {
544
- "type": "object",
545
- "properties": {
546
- "search": {
547
- "type": "string",
548
- "enum": ["top-left", "top-right", "none"],
549
- "description": "The address search. Default: \"none\".",
550
- "default": "none"
551
- },
552
- "navigation": {
553
- "type": "string",
554
- "enum": ["top-left", "top-right", "bottom-left", "bottom-right"],
555
- "description": "The place of the navigation buttons: those for zooming, the compass, and the buttons to reset the view, for the whole screen and for the viewer's location, as far as the map has them. Default: \"top-right\".",
556
- "default": "top-right"
557
- },
558
- "zoomButtons": {
559
- "type": "boolean",
560
- "description": "The buttons for zooming in and out, of the navigation buttons, and with them the compass of a map that its viewers can turn. Default: true.",
561
- "default": true
562
- },
563
- "legend": {
564
- "type": "string",
565
- "enum": ["bottom-left", "bottom", "bottom-right", "right", "top-right", "top", "top-left", "left", "none"],
566
- "description": "The legend, if the map has one: a side (centered) or a corner. Default: \"bottom-left\".",
567
- "default": "bottom-left"
568
- },
569
- "scale": {
570
- "type": "string",
571
- "enum": ["bottom-left", "bottom-right", "none"],
572
- "description": "A bar with the length that it stands for on the map, in meters or kilometers. Default: \"none\".",
573
- "default": "none"
574
- },
575
- "reset": {
576
- "type": "boolean",
577
- "description": "A button that shows the map as it opened: its area, its rotation and its tilt. One of the navigation buttons. Default: false.",
578
- "default": false
579
- },
580
- "fullscreen": {
581
- "type": "boolean",
582
- "description": "A button that shows the map on the whole screen, and back. One of the navigation buttons. An embedded map needs the permission of its page: `allow=\"fullscreen\"` on its iframe. Default: false.",
583
- "default": false
584
- },
585
- "locate": {
586
- "type": "boolean",
587
- "description": "A button that shows where the viewer is, if they allow it, and follows them until it is switched off. One of the navigation buttons. An embedded map needs the permission of its page: `allow=\"geolocation\"` on its iframe. Default: false.",
588
- "default": false
589
- },
590
- "canPan": {
591
- "type": "boolean",
592
- "description": "Viewers can move the map. Default: true.",
593
- "default": true
594
- },
595
- "canZoom": {
596
- "type": "boolean",
597
- "description": "Viewers can zoom in and out. Default: true.",
598
- "default": true
599
- },
600
- "canRotate": {
601
- "type": "boolean",
602
- "description": "Viewers can rotate the map. Default: false.",
603
- "default": false
604
- },
605
- "canTilt": {
606
- "type": "boolean",
607
- "description": "Viewers can tilt the map. Default: false.",
608
- "default": false
609
- },
610
- "confine": {
611
- "type": "boolean",
612
- "description": "Viewers stay in the area that the map shows when it opens: they cannot zoom out further, nor move the map beyond it. Default: false.",
613
- "default": false
614
- },
615
- "minZoom": {
616
- "type": "number",
617
- "description": "The least zoom level that viewers can zoom out to, in steps of 0.5. What a zoom level shows depends on the size of the window, so `confine` is the better way to keep viewers from zooming out. Default: none.",
618
- "minimum": 0,
619
- "maximum": 22,
620
- "multipleOf": 0.5
621
- },
622
- "maxZoom": {
623
- "type": "number",
624
- "description": "The largest zoom level that viewers can zoom in to, in steps of 0.5, e.g. if the map is not meant to be looked at more closely. Not less than `minZoom`. Default: none.",
625
- "minimum": 0,
626
- "maximum": 22,
627
- "multipleOf": 0.5
628
- },
629
- "scrollZoom": {
630
- "type": "string",
631
- "enum": ["protected", "free"],
632
- "description": "What the wheel does over the map when it is embedded in a page: \"protected\" scrolls the page, and the map zooms with Ctrl (or ⌘) and the wheel, and moves on touch screens with two fingers; \"free\" zooms the map. A map in a window of its own is always free. Default: \"protected\".",
633
- "default": "protected"
634
- }
635
- },
636
- "description": "How a shared or embedded map is used. What the viewer shows over the map, and where: a control at a position, or \"none\"; the navigation buttons at a position, each of them shown or not. Controls in the same corner are stacked. And what its viewers can do with the map: move it and zoom, unless that is switched off; rotate and tilt it, if that is switched on. Defaults in `VIEWER_DEFAULTS`."
637
- },
638
- "StateLabels": {
639
- "type": "object",
640
- "properties": {
641
- "overlap": {
642
- "type": "string",
643
- "enum": ["show", "hide"],
644
- "description": "Labels of markers that would overlap other labels: \"show\" them all, also on top of each other, or \"hide\" them (their symbols stay).",
645
- "default": "show"
646
- },
647
- "minZoom": {
648
- "type": "number",
649
- "description": "The zoom level from which the labels of markers are shown, with one decimal place, above 0 and up to 22 (`MAX_ZOOM`), e.g. 12.5. Without it, at every zoom level.",
650
- "exclusiveMinimum": 0,
651
- "maximum": 22
652
- }
653
- },
654
- "description": "How the labels of markers are shown: whether they may overlap, and from which zoom level."
655
- },
656
- "StateElement": {
657
- "anyOf": [
658
- {
659
- "$ref": "#/definitions/StateElementMarker"
660
- },
661
- {
662
- "$ref": "#/definitions/StateElementLine"
663
- },
664
- {
665
- "$ref": "#/definitions/StateElementPolygon"
666
- },
667
- {
668
- "$ref": "#/definitions/StateElementCircle"
669
- }
670
- ]
671
- },
672
- "StateElementMarker": {
673
- "type": "object",
674
- "properties": {
675
- "type": {
676
- "type": "string",
677
- "const": "marker"
678
- },
679
- "point": {
680
- "$ref": "#/definitions/Position"
681
- },
682
- "label": {
683
- "type": "string",
684
- "description": "The text of the label next to the symbol; none if it is missing or \"\".",
685
- "default": ""
686
- },
687
- "style": {
688
- "$ref": "#/definitions/MarkerStyle",
689
- "description": "The symbol and the look of the label."
690
- },
691
- "popup": {
692
- "$ref": "#/definitions/StatePopup"
693
- }
694
- },
695
- "required": ["type", "point"],
696
- "description": "A symbol at a point, with an optional label."
697
- },
698
- "Position": {
699
- "type": "array",
700
- "minItems": 2,
701
- "items": [
702
- {
703
- "type": "number",
704
- "title": "longitude"
705
- },
706
- {
707
- "type": "number",
708
- "title": "latitude"
709
- }
710
- ],
711
- "maxItems": 2,
712
- "description": "A position on the map: longitude and latitude, in degrees (WGS 84)."
713
- },
714
- "StatePopup": {
715
- "type": "object",
716
- "properties": {
717
- "text": {
718
- "type": "string",
719
- "description": "Plain text with simple formatting: **bold**, line breaks and links."
720
- }
721
- },
722
- "required": ["text"],
723
- "description": "A popup that opens when the element is clicked or tapped in the viewer."
724
- },
725
- "StateElementLine": {
726
- "type": "object",
727
- "properties": {
728
- "type": {
729
- "type": "string",
730
- "const": "line"
731
- },
732
- "points": {
733
- "type": "array",
734
- "items": {
735
- "$ref": "#/definitions/Position"
736
- },
737
- "minItems": 2
738
- },
739
- "smooth": {
740
- "type": "boolean",
741
- "description": "Drawn as a smooth curve through the points, instead of straight from point to point.",
742
- "default": false
743
- },
744
- "style": {
745
- "$ref": "#/definitions/LineStyle",
746
- "description": "The line: its color, width and dashes, and the arrowheads."
747
- },
748
- "popup": {
749
- "$ref": "#/definitions/StatePopup"
750
- }
751
- },
752
- "required": ["type", "points"],
753
- "description": "A line through points."
754
- },
755
- "StateElementPolygon": {
756
- "type": "object",
757
- "properties": {
758
- "type": {
759
- "type": "string",
760
- "const": "polygon"
761
- },
762
- "points": {
763
- "type": "array",
764
- "items": {
765
- "$ref": "#/definitions/Position"
766
- },
767
- "minItems": 3
768
- },
769
- "smooth": {
770
- "type": "boolean",
771
- "description": "Drawn as a smooth curve through the points, instead of straight from point to point.",
772
- "default": false
773
- },
774
- "style": {
775
- "$ref": "#/definitions/AreaStyle",
776
- "description": "The area: its color (with its opacity) and pattern."
777
- },
778
- "outlineStyle": {
779
- "$ref": "#/definitions/OutlineStyle",
780
- "description": "The outline: whether it is drawn, its color, width and dashes."
781
- },
782
- "popup": {
783
- "$ref": "#/definitions/StatePopup"
784
- }
785
- },
786
- "required": ["type", "points"],
787
- "description": "An area within points; the last point connects to the first one."
788
- },
789
- "StateElementCircle": {
790
- "type": "object",
791
- "properties": {
792
- "type": {
793
- "type": "string",
794
- "const": "circle"
795
- },
796
- "point": {
797
- "$ref": "#/definitions/Position"
798
- },
799
- "radius": {
800
- "type": "number",
801
- "description": "The radius, in meters.",
802
- "exclusiveMinimum": 0,
803
- "maximum": 20000000
804
- },
805
- "style": {
806
- "$ref": "#/definitions/AreaStyle",
807
- "description": "The area: its color (with its opacity) and pattern."
808
- },
809
- "outlineStyle": {
810
- "$ref": "#/definitions/OutlineStyle",
811
- "description": "The outline: whether it is drawn, its color, width and dashes."
812
- },
813
- "popup": {
814
- "$ref": "#/definitions/StatePopup"
815
- }
816
- },
817
- "required": ["type", "point", "radius"],
818
- "description": "A circle around a point."
819
- }
820
- }
821
- }