@record-evolution/widget-mapbox 1.5.16 → 1.5.18

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/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.16",
6
+ "version": "1.5.18",
7
7
  "engines": {
8
8
  "node": ">=24.9.0",
9
9
  "npm": ">=10.0.2"
@@ -31,7 +31,7 @@
31
31
  "dependencies": {
32
32
  "@types/geojson": "^7946.0.16",
33
33
  "@types/mapbox-gl": "^3.5.0",
34
- "lit": "^3.3.1",
34
+ "lit": "^3.3.3",
35
35
  "mapbox-gl": "^3.23.1",
36
36
  "tinycolor2": "^1.6.0"
37
37
  },
@@ -143,7 +143,7 @@ export type Dataseries = {
143
143
  /**
144
144
  * A Mapbox-powered geospatial visualization widget for displaying location-based data on interactive maps. Use this widget for GPS tracking, asset locations, geographic heatmaps, route visualization, or any data with latitude/longitude coordinates. Supports multiple layer types including circles (points), symbols (icons), heatmaps (density), and lines (tracks/routes). Features auto-follow mode to keep markers in view, multiple map styles, and pivot-based auto-generation of layers from data columns. Ideal for fleet management, IoT device monitoring, field service tracking, and geographic data analysis.
145
145
  */
146
- export interface InputData {
146
+ export interface MapConfiguration {
147
147
  title?: Title;
148
148
  subTitle?: Subtitle;
149
149
  style?: MapStyle;
@@ -1,6 +1,21 @@
1
1
  {
2
- "title": "InputData",
2
+ "title": "Map Configuration",
3
3
  "description": "A Mapbox-powered geospatial visualization widget for displaying location-based data on interactive maps. Use this widget for GPS tracking, asset locations, geographic heatmaps, route visualization, or any data with latitude/longitude coordinates. Supports multiple layer types including circles (points), symbols (icons), heatmaps (density), and lines (tracks/routes). Features auto-follow mode to keep markers in view, multiple map styles, and pivot-based auto-generation of layers from data columns. Ideal for fleet management, IoT device monitoring, field service tracking, and geographic data analysis.",
4
+ "aiSelection": {
5
+ "dataShape": "Points carrying coordinates: dataseries[].data[] entries with lon and lat, optionally alt and a numeric value, rendered as circles, icons, a density heatmap or connected lines. A pivot column produces one layer per distinct value.",
6
+ "useWhen": [
7
+ "Position on the earth is the point — vehicle and asset locations, site maps, field service, GPS traces.",
8
+ "A route or track should be drawn by connecting points in order (dataseries[].type: 'line').",
9
+ "Density across an area should be shaded (dataseries[].type: 'heatmap').",
10
+ "The view should keep following the latest position (follow: true)."
11
+ ],
12
+ "notFor": [
13
+ "Coordinates that are only incidental, where the real question is a measured value over time — use widget-linechart.",
14
+ "Positions on a floor plan, schematic or photo rather than on the earth — use widget-overlay.",
15
+ "Distance, speed or dwell time presented as numbers — use widget-value or widget-table.",
16
+ "How long an asset stayed in each place or state — use widget-statehistory."
17
+ ]
18
+ },
4
19
  "type": "object",
5
20
  "properties": {
6
21
  "title": {
@@ -9,13 +9,13 @@ import tinycolor from 'tinycolor2'
9
9
  import {
10
10
  CircleLayerConfiguration,
11
11
  HeatmapLayerConfiguration,
12
- InputData,
12
+ MapConfiguration,
13
13
  MapData,
14
14
  SymbolLayerConfiguration,
15
15
  TrackLayerConfiguration
16
16
  } from './definition-schema.js'
17
17
 
18
- type Dataseries = Exclude<InputData['dataseries'], undefined>[number]
18
+ type Dataseries = Exclude<MapConfiguration['dataseries'], undefined>[number]
19
19
  type Point = Exclude<Dataseries['data'], undefined>[number]
20
20
  type Theme = {
21
21
  theme_name: string
@@ -37,7 +37,7 @@ type DataSet = {
37
37
 
38
38
  @customElement('widget-mapbox-versionplaceholder')
39
39
  export class WidgetMapbox extends LitElement {
40
- @property({ type: Object }) inputData?: InputData
40
+ @property({ type: Object }) inputData?: MapConfiguration
41
41
  @property({ type: Object }) theme?: Theme
42
42
 
43
43
  @state() private map: any | undefined = undefined
@@ -62,7 +62,7 @@ export class WidgetMapbox extends LitElement {
62
62
  this.updateMap()
63
63
  })
64
64
  mapboxgl.accessToken =
65
- 'pk.eyJ1IjoibWFya29wZSIsImEiOiJjazc1OWlsNjkwN2pyM2VxajV1eGRnYzgwIn0.3lVksk1nej_0KnWjCkBDAA'
65
+ 'pk.eyJ1IjoibWFya29wZSIsImEiOiJjbXB2Yjh2ankwMWUxMnNyM243aGFlNGxiIn0.BXax9rCajgo3Sn5MvAu7dQ'
66
66
  }
67
67
 
68
68
  disconnectedCallback() {