@record-evolution/widget-mapbox 1.5.11 → 1.5.13
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 +16 -8
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/widget-mapbox.js +209 -134
- package/dist/widget-mapbox.js.map +1 -1
- package/package.json +4 -3
- package/src/default-data.json +13 -23
- package/src/definition-schema.d.ts +27 -11
- package/src/definition-schema.json +30 -4
- package/src/widget-mapbox.ts +154 -132
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "REWidget widget-mapbox",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "widget-mapbox",
|
|
6
|
-
"version": "1.5.
|
|
6
|
+
"version": "1.5.13",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"main": "dist/widget-mapbox.js",
|
|
9
9
|
"types": "dist/src/widget-mapbox.d.ts",
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@types/geojson": "^7946.0.16",
|
|
28
28
|
"@types/mapbox-gl": "^3.4.1",
|
|
29
|
-
"lit": "^3.3.
|
|
30
|
-
"mapbox-gl": "^3.
|
|
29
|
+
"lit": "^3.3.1",
|
|
30
|
+
"mapbox-gl": "^3.15.0",
|
|
31
31
|
"tinycolor2": "^1.6.0"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
@@ -38,6 +38,7 @@
|
|
|
38
38
|
"@rollup/plugin-json": "^6.1.0",
|
|
39
39
|
"@rollup/plugin-node-resolve": "^16.0.1",
|
|
40
40
|
"@rollup/plugin-replace": "^6.0.2",
|
|
41
|
+
"rollup-plugin-string": "^3.0.0",
|
|
41
42
|
"@rollup/plugin-typescript": "^12.1.3",
|
|
42
43
|
"@types/glob": "^8.1.0",
|
|
43
44
|
"@types/tinycolor2": "^1.4.6",
|
package/src/default-data.json
CHANGED
|
@@ -8,15 +8,11 @@
|
|
|
8
8
|
"type": "circle",
|
|
9
9
|
"color": "#49aaff",
|
|
10
10
|
"latestValues": 10,
|
|
11
|
-
"
|
|
12
|
-
"circle":
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
"symbol": {
|
|
17
|
-
"text-color": "black",
|
|
18
|
-
"text-size": 14
|
|
19
|
-
}
|
|
11
|
+
"circleConfig": {
|
|
12
|
+
"circle-blur": 0.8,
|
|
13
|
+
"circle-opacity": 0.8,
|
|
14
|
+
"text-color": "black",
|
|
15
|
+
"text-size": 14
|
|
20
16
|
},
|
|
21
17
|
"data": [
|
|
22
18
|
{
|
|
@@ -73,12 +69,10 @@
|
|
|
73
69
|
{
|
|
74
70
|
"label": "Heatmap Layer",
|
|
75
71
|
"type": "heatmap",
|
|
76
|
-
"
|
|
77
|
-
"heatmap":
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
"heatmap-radius": 40
|
|
81
|
-
}
|
|
72
|
+
"heatmapConfig": {
|
|
73
|
+
"heatmap-intensity": 0.8,
|
|
74
|
+
"heatmap-opacity": 0.5,
|
|
75
|
+
"heatmap-radius": 40
|
|
82
76
|
},
|
|
83
77
|
"data": [
|
|
84
78
|
{
|
|
@@ -168,14 +162,10 @@
|
|
|
168
162
|
"label": "Track Layer",
|
|
169
163
|
"type": "line",
|
|
170
164
|
"color": "red",
|
|
171
|
-
"
|
|
172
|
-
"line":
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
"symbol": {
|
|
176
|
-
"icon-image": "car-front",
|
|
177
|
-
"icon-size": 1
|
|
178
|
-
}
|
|
165
|
+
"lineConfig": {
|
|
166
|
+
"line-width": 3,
|
|
167
|
+
"icon-image": "car-front",
|
|
168
|
+
"icon-size": 1
|
|
179
169
|
},
|
|
180
170
|
"data": [
|
|
181
171
|
{
|
|
@@ -45,6 +45,7 @@ export type Blur = number;
|
|
|
45
45
|
*/
|
|
46
46
|
export type Opacity = number;
|
|
47
47
|
export type TextSize = number;
|
|
48
|
+
export type TextSize1 = number;
|
|
48
49
|
/**
|
|
49
50
|
* For available icons check the maki icon set here https://labs.mapbox.com/maki-icons/
|
|
50
51
|
*/
|
|
@@ -63,6 +64,14 @@ export type Opacity1 = number;
|
|
|
63
64
|
*/
|
|
64
65
|
export type RadiusBaseSize = number;
|
|
65
66
|
export type LineWidth = number;
|
|
67
|
+
/**
|
|
68
|
+
* For available icons check the maki icon set here https://labs.mapbox.com/maki-icons/
|
|
69
|
+
*/
|
|
70
|
+
export type IconName1 = "marker" | "car-front" | "car-top";
|
|
71
|
+
/**
|
|
72
|
+
* In multiples of the original icon size
|
|
73
|
+
*/
|
|
74
|
+
export type IconSize1 = number;
|
|
66
75
|
export type Longitude = number;
|
|
67
76
|
export type Latitude = number;
|
|
68
77
|
export type Altitude = number;
|
|
@@ -87,10 +96,10 @@ export type Dataseries = {
|
|
|
87
96
|
type?: LayerType;
|
|
88
97
|
color?: LayerBaseColor;
|
|
89
98
|
latestValues?: LatestValues;
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
99
|
+
circleConfig?: CircleLayerConfiguration;
|
|
100
|
+
symbolConfig?: SymbolLayerConfiguration;
|
|
101
|
+
heatmapConfig?: HeatmapLayerConfiguration;
|
|
102
|
+
lineConfig?: TrackLayerConfiguration;
|
|
94
103
|
data?: MapData;
|
|
95
104
|
[k: string]: unknown;
|
|
96
105
|
}[];
|
|
@@ -110,28 +119,35 @@ export interface InputData {
|
|
|
110
119
|
export interface LayerBaseColor {
|
|
111
120
|
[k: string]: unknown;
|
|
112
121
|
}
|
|
113
|
-
export interface
|
|
122
|
+
export interface CircleLayerConfiguration {
|
|
114
123
|
"circle-blur"?: Blur;
|
|
115
124
|
"circle-opacity"?: Opacity;
|
|
116
|
-
[k: string]: unknown;
|
|
117
|
-
}
|
|
118
|
-
export interface SymbolLayer {
|
|
119
125
|
"text-color"?: TextColor;
|
|
120
126
|
"text-size"?: TextSize;
|
|
127
|
+
[k: string]: unknown;
|
|
128
|
+
}
|
|
129
|
+
export interface TextColor {
|
|
130
|
+
[k: string]: unknown;
|
|
131
|
+
}
|
|
132
|
+
export interface SymbolLayerConfiguration {
|
|
133
|
+
"text-color"?: TextColor1;
|
|
134
|
+
"text-size"?: TextSize1;
|
|
121
135
|
"icon-image"?: IconName;
|
|
122
136
|
"icon-size"?: IconSize;
|
|
123
137
|
[k: string]: unknown;
|
|
124
138
|
}
|
|
125
|
-
export interface
|
|
139
|
+
export interface TextColor1 {
|
|
126
140
|
[k: string]: unknown;
|
|
127
141
|
}
|
|
128
|
-
export interface
|
|
142
|
+
export interface HeatmapLayerConfiguration {
|
|
129
143
|
"heatmap-intensity"?: Intensity;
|
|
130
144
|
"heatmap-opacity"?: Opacity1;
|
|
131
145
|
"heatmap-radius"?: RadiusBaseSize;
|
|
132
146
|
[k: string]: unknown;
|
|
133
147
|
}
|
|
134
|
-
export interface
|
|
148
|
+
export interface TrackLayerConfiguration {
|
|
135
149
|
"line-width"?: LineWidth;
|
|
150
|
+
"icon-image"?: IconName1;
|
|
151
|
+
"icon-size"?: IconSize1;
|
|
136
152
|
[k: string]: unknown;
|
|
137
153
|
}
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
"dataDrivenDisabled": true,
|
|
82
82
|
"order": 4
|
|
83
83
|
},
|
|
84
|
-
"
|
|
84
|
+
"circleConfig": {
|
|
85
85
|
"title": "Circle Layer Configuration",
|
|
86
86
|
"type": "object",
|
|
87
87
|
"order": 5,
|
|
@@ -107,10 +107,22 @@
|
|
|
107
107
|
"max": 1,
|
|
108
108
|
"type": "number",
|
|
109
109
|
"order": 2
|
|
110
|
+
},
|
|
111
|
+
"text-color": {
|
|
112
|
+
"title": "Text Color",
|
|
113
|
+
"type": "color",
|
|
114
|
+
"color": true,
|
|
115
|
+
"order": 3
|
|
116
|
+
},
|
|
117
|
+
"text-size": {
|
|
118
|
+
"title": "Text Size",
|
|
119
|
+
"type": "number",
|
|
120
|
+
"min": 1,
|
|
121
|
+
"order": 4
|
|
110
122
|
}
|
|
111
123
|
}
|
|
112
124
|
},
|
|
113
|
-
"
|
|
125
|
+
"symbolConfig": {
|
|
114
126
|
"title": "Symbol Layer Configuration",
|
|
115
127
|
"type": "object",
|
|
116
128
|
"order": 5,
|
|
@@ -147,7 +159,7 @@
|
|
|
147
159
|
}
|
|
148
160
|
}
|
|
149
161
|
},
|
|
150
|
-
"
|
|
162
|
+
"heatmapConfig": {
|
|
151
163
|
"title": "Heatmap Layer Configuration",
|
|
152
164
|
"type": "object",
|
|
153
165
|
"order": 5,
|
|
@@ -179,7 +191,7 @@
|
|
|
179
191
|
}
|
|
180
192
|
}
|
|
181
193
|
},
|
|
182
|
-
"
|
|
194
|
+
"lineConfig": {
|
|
183
195
|
"title": "Track Layer Configuration",
|
|
184
196
|
"type": "object",
|
|
185
197
|
"order": 5,
|
|
@@ -193,6 +205,20 @@
|
|
|
193
205
|
"type": "number",
|
|
194
206
|
"min": 1,
|
|
195
207
|
"order": 1
|
|
208
|
+
},
|
|
209
|
+
"icon-image": {
|
|
210
|
+
"title": "Icon Name",
|
|
211
|
+
"description": "For available icons check the maki icon set here https://labs.mapbox.com/maki-icons/",
|
|
212
|
+
"type": "string",
|
|
213
|
+
"enum": ["marker", "car-front", "car-top"],
|
|
214
|
+
"order": 3
|
|
215
|
+
},
|
|
216
|
+
"icon-size": {
|
|
217
|
+
"title": "Icon size",
|
|
218
|
+
"description": "In multiples of the original icon size",
|
|
219
|
+
"type": "number",
|
|
220
|
+
"min": 0,
|
|
221
|
+
"order": 4
|
|
196
222
|
}
|
|
197
223
|
}
|
|
198
224
|
},
|