@record-evolution/widget-mapbox 1.4.11 → 1.4.12
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.
- package/dist/src/widget-mapbox.d.ts +5 -3
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/widget-mapbox.js +228 -196
- package/dist/widget-mapbox.js.map +1 -1
- package/package.json +3 -1
- package/src/default-data.json +384 -383
- package/src/definition-schema.d.ts +254 -0
- package/src/definition-schema.json +137 -5
- package/src/widget-mapbox.ts +539 -498
- package/dist/src/types.d.ts +0 -28
- package/src/types.ts +0 -33
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
/**
|
|
3
|
+
* This file was automatically generated by json-schema-to-typescript.
|
|
4
|
+
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
|
|
5
|
+
* and run json-schema-to-typescript to regenerate this file.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
export type Title = string;
|
|
9
|
+
export type Subtitle = string;
|
|
10
|
+
/**
|
|
11
|
+
* The basic style of the map.
|
|
12
|
+
*/
|
|
13
|
+
export type MapStyle =
|
|
14
|
+
| "streets-v12"
|
|
15
|
+
| "outdoors-v12"
|
|
16
|
+
| "light-v11"
|
|
17
|
+
| "dark-v11"
|
|
18
|
+
| "satellite-v9"
|
|
19
|
+
| "satellite-streets-v12"
|
|
20
|
+
| "navigation-day-v1"
|
|
21
|
+
| "navigation-night-v1";
|
|
22
|
+
export type ShowLegend = boolean;
|
|
23
|
+
/**
|
|
24
|
+
* If true, the map automatically keeps the drawn locations in focus.
|
|
25
|
+
*/
|
|
26
|
+
export type AutoFollow = boolean;
|
|
27
|
+
/**
|
|
28
|
+
* The name for this data series
|
|
29
|
+
*/
|
|
30
|
+
export type SeriesLabel = string;
|
|
31
|
+
/**
|
|
32
|
+
* Create the specified type of layer on the map.
|
|
33
|
+
*/
|
|
34
|
+
export type LayerType = "circle" | "symbol" | "heatmap" | "line";
|
|
35
|
+
export type LayerBaseColor = string;
|
|
36
|
+
/**
|
|
37
|
+
* Restrict the number of rows for this dataseries to the given number of newest values. (If pivoted, then per each of the pivot dataseries.)
|
|
38
|
+
*/
|
|
39
|
+
export type LatestValues = number;
|
|
40
|
+
export type Blur = number;
|
|
41
|
+
export type Opacity = number;
|
|
42
|
+
export type TextColor = string;
|
|
43
|
+
export type TextSize = number;
|
|
44
|
+
/**
|
|
45
|
+
* For available icons check the maki icon set here https://labs.mapbox.com/maki-icons/
|
|
46
|
+
*/
|
|
47
|
+
export type IconName =
|
|
48
|
+
| "marker"
|
|
49
|
+
| "airfield"
|
|
50
|
+
| "airport"
|
|
51
|
+
| "alcohol-shop"
|
|
52
|
+
| "america-football"
|
|
53
|
+
| "amusement-park"
|
|
54
|
+
| "aquarium"
|
|
55
|
+
| "art-gallery"
|
|
56
|
+
| "bakery"
|
|
57
|
+
| "bank"
|
|
58
|
+
| "bar"
|
|
59
|
+
| "baseball"
|
|
60
|
+
| "basketball"
|
|
61
|
+
| "beer"
|
|
62
|
+
| "bicycle"
|
|
63
|
+
| "building"
|
|
64
|
+
| "bus"
|
|
65
|
+
| "cafe"
|
|
66
|
+
| "campsite"
|
|
67
|
+
| "car"
|
|
68
|
+
| "cemetery"
|
|
69
|
+
| "cinema"
|
|
70
|
+
| "circle"
|
|
71
|
+
| "college"
|
|
72
|
+
| "commerical"
|
|
73
|
+
| "cricket"
|
|
74
|
+
| "cross"
|
|
75
|
+
| "dam"
|
|
76
|
+
| "danger"
|
|
77
|
+
| "dog-park"
|
|
78
|
+
| "embassy"
|
|
79
|
+
| "emergency-telephone"
|
|
80
|
+
| "entrance"
|
|
81
|
+
| "farm"
|
|
82
|
+
| "fast-food"
|
|
83
|
+
| "ferry"
|
|
84
|
+
| "fire-station"
|
|
85
|
+
| "fuel"
|
|
86
|
+
| "garden"
|
|
87
|
+
| "golf"
|
|
88
|
+
| "grocery-store"
|
|
89
|
+
| "hairdresser"
|
|
90
|
+
| "harbor"
|
|
91
|
+
| "heart"
|
|
92
|
+
| "heliport"
|
|
93
|
+
| "hospital"
|
|
94
|
+
| "industrial"
|
|
95
|
+
| "information"
|
|
96
|
+
| "laundry"
|
|
97
|
+
| "library"
|
|
98
|
+
| "lighthouse"
|
|
99
|
+
| "lodging"
|
|
100
|
+
| "logging"
|
|
101
|
+
| "london-underground"
|
|
102
|
+
| "marker-stroked"
|
|
103
|
+
| "minefield"
|
|
104
|
+
| "mobile-phone"
|
|
105
|
+
| "monument"
|
|
106
|
+
| "mountain"
|
|
107
|
+
| "museum"
|
|
108
|
+
| "music"
|
|
109
|
+
| "oil-well"
|
|
110
|
+
| "park"
|
|
111
|
+
| "parking"
|
|
112
|
+
| "parking-garage"
|
|
113
|
+
| "pharmacy"
|
|
114
|
+
| "picnic-site"
|
|
115
|
+
| "pitch"
|
|
116
|
+
| "place-of-worship"
|
|
117
|
+
| "playground"
|
|
118
|
+
| "police"
|
|
119
|
+
| "polling-place"
|
|
120
|
+
| "post"
|
|
121
|
+
| "prison"
|
|
122
|
+
| "rail"
|
|
123
|
+
| "rail-above"
|
|
124
|
+
| "rail-light"
|
|
125
|
+
| "rail-metro"
|
|
126
|
+
| "rail-underground"
|
|
127
|
+
| "railway"
|
|
128
|
+
| "religious-christian"
|
|
129
|
+
| "religious-jewish"
|
|
130
|
+
| "religious-muslim"
|
|
131
|
+
| "religious-islam"
|
|
132
|
+
| "restaurant"
|
|
133
|
+
| "roadblock"
|
|
134
|
+
| "rocket"
|
|
135
|
+
| "school"
|
|
136
|
+
| "scooter"
|
|
137
|
+
| "shop"
|
|
138
|
+
| "skiing"
|
|
139
|
+
| "slaughterhouse"
|
|
140
|
+
| "soccer"
|
|
141
|
+
| "square"
|
|
142
|
+
| "stadium"
|
|
143
|
+
| "star"
|
|
144
|
+
| "star-stroked"
|
|
145
|
+
| "suitcase"
|
|
146
|
+
| "swimming"
|
|
147
|
+
| "table-tennis"
|
|
148
|
+
| "teahouse"
|
|
149
|
+
| "tennis"
|
|
150
|
+
| "theatre"
|
|
151
|
+
| "toilet"
|
|
152
|
+
| "town-hall"
|
|
153
|
+
| "trash"
|
|
154
|
+
| "tree-1"
|
|
155
|
+
| "tree-2"
|
|
156
|
+
| "triangle"
|
|
157
|
+
| "triangle-stroked"
|
|
158
|
+
| "veterinary"
|
|
159
|
+
| "volcano"
|
|
160
|
+
| "warehouse"
|
|
161
|
+
| "waste-basket"
|
|
162
|
+
| "water"
|
|
163
|
+
| "wetland"
|
|
164
|
+
| "zoo";
|
|
165
|
+
/**
|
|
166
|
+
* In multiples of the original icon size
|
|
167
|
+
*/
|
|
168
|
+
export type IconSize = number;
|
|
169
|
+
/**
|
|
170
|
+
* The higher the intensity, the more 'hot' the heatmap becomes. The value is a multiple with default value 1. e.g. to double the intensitiy choose 2.
|
|
171
|
+
*/
|
|
172
|
+
export type Intensity = number;
|
|
173
|
+
export type Opacity1 = number;
|
|
174
|
+
/**
|
|
175
|
+
* The radius will be combined with the data value to to determine the heat radius of a point.
|
|
176
|
+
*/
|
|
177
|
+
export type RadiusBaseSize = number;
|
|
178
|
+
export type LineWidth = number;
|
|
179
|
+
export type Longitude = number;
|
|
180
|
+
export type Latitude = number;
|
|
181
|
+
export type Altitude = number;
|
|
182
|
+
export type AValueForTheDataPoint = number;
|
|
183
|
+
/**
|
|
184
|
+
* You can specify a column in the input data to autogenerate dataseries for each distinct entry in this column. E.g. if you have a table with columns [city, lon, lat, temperature] and specify 'city' as pivot column, then you will get a layer for each city.
|
|
185
|
+
*/
|
|
186
|
+
export type PivotColumn = string;
|
|
187
|
+
/**
|
|
188
|
+
* This is the map data
|
|
189
|
+
*/
|
|
190
|
+
export type MapData = {
|
|
191
|
+
lon: Longitude;
|
|
192
|
+
lat: Latitude;
|
|
193
|
+
alt?: Altitude;
|
|
194
|
+
value?: AValueForTheDataPoint;
|
|
195
|
+
pivot?: PivotColumn;
|
|
196
|
+
[k: string]: unknown;
|
|
197
|
+
}[];
|
|
198
|
+
export type Dataseries = {
|
|
199
|
+
label: SeriesLabel;
|
|
200
|
+
type: LayerType;
|
|
201
|
+
color?: LayerBaseColor;
|
|
202
|
+
latestValues?: LatestValues;
|
|
203
|
+
config?: LayerConfiguration;
|
|
204
|
+
data?: MapData;
|
|
205
|
+
[k: string]: unknown;
|
|
206
|
+
}[];
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* A map-chart
|
|
210
|
+
*/
|
|
211
|
+
export interface MapConfiguration {
|
|
212
|
+
/**
|
|
213
|
+
* Settings
|
|
214
|
+
*/
|
|
215
|
+
settings?: {
|
|
216
|
+
title?: Title;
|
|
217
|
+
subTitle?: Subtitle;
|
|
218
|
+
style: MapStyle;
|
|
219
|
+
showLegend?: ShowLegend;
|
|
220
|
+
follow?: AutoFollow;
|
|
221
|
+
[k: string]: unknown;
|
|
222
|
+
};
|
|
223
|
+
dataseries?: Dataseries;
|
|
224
|
+
[k: string]: unknown;
|
|
225
|
+
}
|
|
226
|
+
export interface LayerConfiguration {
|
|
227
|
+
circle?: CircleLayer;
|
|
228
|
+
symbol?: TextLayer;
|
|
229
|
+
heatmap?: HeatmapLayer;
|
|
230
|
+
line?: TrackLayer;
|
|
231
|
+
[k: string]: unknown;
|
|
232
|
+
}
|
|
233
|
+
export interface CircleLayer {
|
|
234
|
+
"circle-blur"?: Blur;
|
|
235
|
+
"circle-opacity"?: Opacity;
|
|
236
|
+
[k: string]: unknown;
|
|
237
|
+
}
|
|
238
|
+
export interface TextLayer {
|
|
239
|
+
"text-color"?: TextColor;
|
|
240
|
+
"text-size"?: TextSize;
|
|
241
|
+
"icon-image"?: IconName;
|
|
242
|
+
"icon-size"?: IconSize;
|
|
243
|
+
[k: string]: unknown;
|
|
244
|
+
}
|
|
245
|
+
export interface HeatmapLayer {
|
|
246
|
+
"heatmap-intensity"?: Intensity;
|
|
247
|
+
"heatmap-opacity"?: Opacity1;
|
|
248
|
+
"heatmap-radius"?: RadiusBaseSize;
|
|
249
|
+
[k: string]: unknown;
|
|
250
|
+
}
|
|
251
|
+
export interface TrackLayer {
|
|
252
|
+
"line-width"?: LineWidth;
|
|
253
|
+
[k: string]: unknown;
|
|
254
|
+
}
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
"description": "Settings",
|
|
8
8
|
"type": "object",
|
|
9
9
|
"order": 8,
|
|
10
|
+
"required": ["style"],
|
|
10
11
|
"properties": {
|
|
11
12
|
"title": {
|
|
12
13
|
"title": "Title",
|
|
@@ -17,20 +18,29 @@
|
|
|
17
18
|
"title": "Subtitle",
|
|
18
19
|
"type": "string",
|
|
19
20
|
"order": 2
|
|
20
|
-
},
|
|
21
|
+
},
|
|
21
22
|
"style": {
|
|
22
23
|
"title": "Map Style",
|
|
23
24
|
"description": "The basic style of the map.",
|
|
24
25
|
"type": "string",
|
|
25
|
-
"enum": [
|
|
26
|
+
"enum": [
|
|
27
|
+
"streets-v12",
|
|
28
|
+
"outdoors-v12",
|
|
29
|
+
"light-v11",
|
|
30
|
+
"dark-v11",
|
|
31
|
+
"satellite-v9",
|
|
32
|
+
"satellite-streets-v12",
|
|
33
|
+
"navigation-day-v1",
|
|
34
|
+
"navigation-night-v1"
|
|
35
|
+
],
|
|
26
36
|
"required": true,
|
|
27
37
|
"order": 3
|
|
28
|
-
},
|
|
38
|
+
},
|
|
29
39
|
"showLegend": {
|
|
30
40
|
"title": "Show Legend",
|
|
31
41
|
"type": "boolean",
|
|
32
42
|
"order": 4
|
|
33
|
-
},
|
|
43
|
+
},
|
|
34
44
|
"follow": {
|
|
35
45
|
"title": "Auto Follow",
|
|
36
46
|
"description": "If true, the map automatically keeps the drawn locations in focus.",
|
|
@@ -45,6 +55,7 @@
|
|
|
45
55
|
"type": "array",
|
|
46
56
|
"items": {
|
|
47
57
|
"type": "object",
|
|
58
|
+
"required": ["label", "type"],
|
|
48
59
|
"properties": {
|
|
49
60
|
"label": {
|
|
50
61
|
"title": "Series Label",
|
|
@@ -64,6 +75,7 @@
|
|
|
64
75
|
"color": {
|
|
65
76
|
"title": "Layer Base Color",
|
|
66
77
|
"type": "color",
|
|
78
|
+
"color": true,
|
|
67
79
|
"order": 3
|
|
68
80
|
},
|
|
69
81
|
"latestValues": {
|
|
@@ -106,6 +118,7 @@
|
|
|
106
118
|
"text-color": {
|
|
107
119
|
"title": "Text Color",
|
|
108
120
|
"type": "color",
|
|
121
|
+
"color": true,
|
|
109
122
|
"order": 1
|
|
110
123
|
},
|
|
111
124
|
"text-size": {
|
|
@@ -118,7 +131,125 @@
|
|
|
118
131
|
"title": "Icon Name",
|
|
119
132
|
"description": "For available icons check the maki icon set here https://labs.mapbox.com/maki-icons/",
|
|
120
133
|
"type": "string",
|
|
121
|
-
"enum": [
|
|
134
|
+
"enum": [
|
|
135
|
+
"marker",
|
|
136
|
+
"airfield",
|
|
137
|
+
"airport",
|
|
138
|
+
"alcohol-shop",
|
|
139
|
+
"america-football",
|
|
140
|
+
"amusement-park",
|
|
141
|
+
"aquarium",
|
|
142
|
+
"art-gallery",
|
|
143
|
+
"bakery",
|
|
144
|
+
"bank",
|
|
145
|
+
"bar",
|
|
146
|
+
"baseball",
|
|
147
|
+
"basketball",
|
|
148
|
+
"beer",
|
|
149
|
+
"bicycle",
|
|
150
|
+
"building",
|
|
151
|
+
"bus",
|
|
152
|
+
"cafe",
|
|
153
|
+
"campsite",
|
|
154
|
+
"car",
|
|
155
|
+
"cemetery",
|
|
156
|
+
"cinema",
|
|
157
|
+
"circle",
|
|
158
|
+
"college",
|
|
159
|
+
"commerical",
|
|
160
|
+
"cricket",
|
|
161
|
+
"cross",
|
|
162
|
+
"dam",
|
|
163
|
+
"danger",
|
|
164
|
+
"dog-park",
|
|
165
|
+
"embassy",
|
|
166
|
+
"emergency-telephone",
|
|
167
|
+
"entrance",
|
|
168
|
+
"farm",
|
|
169
|
+
"fast-food",
|
|
170
|
+
"ferry",
|
|
171
|
+
"fire-station",
|
|
172
|
+
"fuel",
|
|
173
|
+
"garden",
|
|
174
|
+
"golf",
|
|
175
|
+
"grocery-store",
|
|
176
|
+
"hairdresser",
|
|
177
|
+
"harbor",
|
|
178
|
+
"heart",
|
|
179
|
+
"heliport",
|
|
180
|
+
"hospital",
|
|
181
|
+
"industrial",
|
|
182
|
+
"information",
|
|
183
|
+
"laundry",
|
|
184
|
+
"library",
|
|
185
|
+
"lighthouse",
|
|
186
|
+
"lodging",
|
|
187
|
+
"logging",
|
|
188
|
+
"london-underground",
|
|
189
|
+
"marker-stroked",
|
|
190
|
+
"minefield",
|
|
191
|
+
"mobile-phone",
|
|
192
|
+
"monument",
|
|
193
|
+
"mountain",
|
|
194
|
+
"museum",
|
|
195
|
+
"music",
|
|
196
|
+
"oil-well",
|
|
197
|
+
"park",
|
|
198
|
+
"parking",
|
|
199
|
+
"parking-garage",
|
|
200
|
+
"pharmacy",
|
|
201
|
+
"picnic-site",
|
|
202
|
+
"pitch",
|
|
203
|
+
"place-of-worship",
|
|
204
|
+
"playground",
|
|
205
|
+
"police",
|
|
206
|
+
"polling-place",
|
|
207
|
+
"post",
|
|
208
|
+
"prison",
|
|
209
|
+
"rail",
|
|
210
|
+
"rail-above",
|
|
211
|
+
"rail-light",
|
|
212
|
+
"rail-metro",
|
|
213
|
+
"rail-underground",
|
|
214
|
+
"railway",
|
|
215
|
+
"religious-christian",
|
|
216
|
+
"religious-jewish",
|
|
217
|
+
"religious-muslim",
|
|
218
|
+
"religious-islam",
|
|
219
|
+
"restaurant",
|
|
220
|
+
"roadblock",
|
|
221
|
+
"rocket",
|
|
222
|
+
"school",
|
|
223
|
+
"scooter",
|
|
224
|
+
"shop",
|
|
225
|
+
"skiing",
|
|
226
|
+
"slaughterhouse",
|
|
227
|
+
"soccer",
|
|
228
|
+
"square",
|
|
229
|
+
"stadium",
|
|
230
|
+
"star",
|
|
231
|
+
"star-stroked",
|
|
232
|
+
"suitcase",
|
|
233
|
+
"swimming",
|
|
234
|
+
"table-tennis",
|
|
235
|
+
"teahouse",
|
|
236
|
+
"tennis",
|
|
237
|
+
"theatre",
|
|
238
|
+
"toilet",
|
|
239
|
+
"town-hall",
|
|
240
|
+
"trash",
|
|
241
|
+
"tree-1",
|
|
242
|
+
"tree-2",
|
|
243
|
+
"triangle",
|
|
244
|
+
"triangle-stroked",
|
|
245
|
+
"veterinary",
|
|
246
|
+
"volcano",
|
|
247
|
+
"warehouse",
|
|
248
|
+
"waste-basket",
|
|
249
|
+
"water",
|
|
250
|
+
"wetland",
|
|
251
|
+
"zoo"
|
|
252
|
+
],
|
|
122
253
|
"order": 3
|
|
123
254
|
},
|
|
124
255
|
"icon-size": {
|
|
@@ -180,6 +311,7 @@
|
|
|
180
311
|
"order": 6,
|
|
181
312
|
"items": {
|
|
182
313
|
"type": "object",
|
|
314
|
+
"required": ["lon", "lat"],
|
|
183
315
|
"properties": {
|
|
184
316
|
"lon": {
|
|
185
317
|
"title": "Longitude",
|