@xyo-network/react-map 2.64.0 → 2.64.3
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/browser/AnimatedHeatMapSettings.js +56 -3
- package/dist/browser/AnimatedHeatMapSettings.js.map +1 -1
- package/dist/browser/Colors/index.js +0 -1
- package/dist/browser/Colors/index.js.map +1 -1
- package/dist/browser/Components/AnimatedHeatMap.js +623 -10
- package/dist/browser/Components/AnimatedHeatMap.js.map +1 -1
- package/dist/browser/Components/AnimatedHeatMapLoaded.js +864 -13
- package/dist/browser/Components/AnimatedHeatMapLoaded.js.map +1 -1
- package/dist/browser/Components/HeatMapSettings.js +56 -3
- package/dist/browser/Components/HeatMapSettings.js.map +1 -1
- package/dist/browser/Components/LayerAnimator.js +5 -4
- package/dist/browser/Components/LayerAnimator.js.map +1 -1
- package/dist/browser/Components/Legend.js +32 -7
- package/dist/browser/Components/Legend.js.map +1 -1
- package/dist/browser/Components/Legends/ColorGradient.js +3 -2
- package/dist/browser/Components/Legends/ColorGradient.js.map +1 -1
- package/dist/browser/Components/Legends/index.js +25 -1
- package/dist/browser/Components/Legends/index.js.map +1 -1
- package/dist/browser/Components/MapBox.js +66 -12
- package/dist/browser/Components/MapBox.js.map +1 -1
- package/dist/browser/Components/MapBoxHeat.js +151 -6
- package/dist/browser/Components/MapBoxHeat.js.map +1 -1
- package/dist/browser/Components/MapBoxPoints.js +207 -14
- package/dist/browser/Components/MapBoxPoints.js.map +1 -1
- package/dist/browser/Components/MapSettingsComponents/Setting.js +16 -3
- package/dist/browser/Components/MapSettingsComponents/Setting.js.map +1 -1
- package/dist/browser/Components/MapSettingsComponents/SettingsBox.js +38 -6
- package/dist/browser/Components/MapSettingsComponents/SettingsBox.js.map +1 -1
- package/dist/browser/Components/MapSettingsComponents/index.js +50 -2
- package/dist/browser/Components/MapSettingsComponents/index.js.map +1 -1
- package/dist/browser/Components/index.js +1084 -11
- package/dist/browser/Components/index.js.map +1 -1
- package/dist/browser/Contexts/HeatMapInitializer/Context.js +2 -1
- package/dist/browser/Contexts/HeatMapInitializer/Context.js.map +1 -1
- package/dist/browser/Contexts/HeatMapInitializer/Provider.js +235 -14
- package/dist/browser/Contexts/HeatMapInitializer/Provider.js.map +1 -1
- package/dist/browser/Contexts/HeatMapInitializer/index.js +294 -3
- package/dist/browser/Contexts/HeatMapInitializer/index.js.map +1 -1
- package/dist/browser/Contexts/HeatMapInitializer/useHeatMapInitializer.js +8 -2
- package/dist/browser/Contexts/HeatMapInitializer/useHeatMapInitializer.js.map +1 -1
- package/dist/browser/Contexts/MapBoxInstance/Context.js +2 -1
- package/dist/browser/Contexts/MapBoxInstance/Context.js.map +1 -1
- package/dist/browser/Contexts/MapBoxInstance/Provider.js +9 -3
- package/dist/browser/Contexts/MapBoxInstance/Provider.js.map +1 -1
- package/dist/browser/Contexts/MapBoxInstance/index.js +35 -3
- package/dist/browser/Contexts/MapBoxInstance/index.js.map +1 -1
- package/dist/browser/Contexts/MapBoxInstance/useMapBoxInstance.js +8 -2
- package/dist/browser/Contexts/MapBoxInstance/useMapBoxInstance.js.map +1 -1
- package/dist/browser/Contexts/MapSettings/Context.js +2 -1
- package/dist/browser/Contexts/MapSettings/Context.js.map +1 -1
- package/dist/browser/Contexts/MapSettings/Provider.js +117 -5
- package/dist/browser/Contexts/MapSettings/Provider.js.map +1 -1
- package/dist/browser/Contexts/MapSettings/index.js +148 -3
- package/dist/browser/Contexts/MapSettings/index.js.map +1 -1
- package/dist/browser/Contexts/MapSettings/useMapSettings.js +8 -2
- package/dist/browser/Contexts/MapSettings/useMapSettings.js.map +1 -1
- package/dist/browser/Contexts/MapboxAccessToken/Context.js +2 -1
- package/dist/browser/Contexts/MapboxAccessToken/Context.js.map +1 -1
- package/dist/browser/Contexts/MapboxAccessToken/Provider.js +9 -3
- package/dist/browser/Contexts/MapboxAccessToken/Provider.js.map +1 -1
- package/dist/browser/Contexts/MapboxAccessToken/index.js +22 -4
- package/dist/browser/Contexts/MapboxAccessToken/index.js.map +1 -1
- package/dist/browser/Contexts/MapboxAccessToken/use.js +8 -2
- package/dist/browser/Contexts/MapboxAccessToken/use.js.map +1 -1
- package/dist/browser/Contexts/index.js +459 -4
- package/dist/browser/Contexts/index.js.map +1 -1
- package/dist/browser/Layers/Builders/LocationHeatMapLayerBuilder.js +110 -6
- package/dist/browser/Layers/Builders/LocationHeatMapLayerBuilder.js.map +1 -1
- package/dist/browser/Layers/Builders/LocationHeatMapLayerBuilderAnimated.js +36 -4
- package/dist/browser/Layers/Builders/LocationHeatMapLayerBuilderAnimated.js.map +1 -1
- package/dist/browser/Layers/Builders/LocationPointsMapLayerBuilder.js +40 -4
- package/dist/browser/Layers/Builders/LocationPointsMapLayerBuilder.js.map +1 -1
- package/dist/browser/Layers/Builders/index.js +205 -3
- package/dist/browser/Layers/Builders/index.js.map +1 -1
- package/dist/browser/Layers/CircleLayer.js +3 -2
- package/dist/browser/Layers/CircleLayer.js.map +1 -1
- package/dist/browser/Layers/Configs/HeatMapFillLayerConfig.js +2 -1
- package/dist/browser/Layers/Configs/HeatMapFillLayerConfig.js.map +1 -1
- package/dist/browser/Layers/Configs/HeatMapLineLayerConfig.js +2 -1
- package/dist/browser/Layers/Configs/HeatMapLineLayerConfig.js.map +1 -1
- package/dist/browser/Layers/Configs/HeatMapSymbolLayerConfig.js +2 -1
- package/dist/browser/Layers/Configs/HeatMapSymbolLayerConfig.js.map +1 -1
- package/dist/browser/Layers/Configs/LocationPointLayerConfig.js +2 -1
- package/dist/browser/Layers/Configs/LocationPointLayerConfig.js.map +1 -1
- package/dist/browser/Layers/Configs/index.js +62 -4
- package/dist/browser/Layers/Configs/index.js.map +1 -1
- package/dist/browser/Layers/FillLayer.js +3 -2
- package/dist/browser/Layers/FillLayer.js.map +1 -1
- package/dist/browser/Layers/LineLayer.js +3 -2
- package/dist/browser/Layers/LineLayer.js.map +1 -1
- package/dist/browser/Layers/SymbolLayer.js +3 -2
- package/dist/browser/Layers/SymbolLayer.js.map +1 -1
- package/dist/browser/Layers/index.js +213 -7
- package/dist/browser/Layers/index.js.map +1 -1
- package/dist/browser/MapBoxClasses/MapBase.js +3 -2
- package/dist/browser/MapBoxClasses/MapBase.js.map +1 -1
- package/dist/browser/MapBoxClasses/MapHeat.js +41 -11
- package/dist/browser/MapBoxClasses/MapHeat.js.map +1 -1
- package/dist/browser/MapBoxClasses/MapPoints.js +33 -3
- package/dist/browser/MapBoxClasses/MapPoints.js.map +1 -1
- package/dist/browser/MapBoxClasses/MapSettings.js +6 -5
- package/dist/browser/MapBoxClasses/MapSettings.js.map +1 -1
- package/dist/browser/MapBoxClasses/index.js +288 -4
- package/dist/browser/MapBoxClasses/index.js.map +1 -1
- package/dist/browser/Settings/DefaultMapSettings.js +2 -1
- package/dist/browser/Settings/DefaultMapSettings.js.map +1 -1
- package/dist/browser/Settings/index.js +55 -2
- package/dist/browser/Settings/index.js.map +1 -1
- package/dist/browser/hooks/index.js +156 -5
- package/dist/browser/hooks/index.js.map +1 -1
- package/dist/browser/hooks/useDynamicMapResize.js +2 -1
- package/dist/browser/hooks/useDynamicMapResize.js.map +1 -1
- package/dist/browser/hooks/useDynamicPositioning.js +7 -6
- package/dist/browser/hooks/useDynamicPositioning.js.map +1 -1
- package/dist/browser/hooks/useFindHashes.js +4 -3
- package/dist/browser/hooks/useFindHashes.js.map +1 -1
- package/dist/browser/hooks/useHeatMapColors.js +2 -1
- package/dist/browser/hooks/useHeatMapColors.js.map +1 -1
- package/dist/browser/hooks/useQuadKeyPayloadsToFeatures.js +4 -3
- package/dist/browser/hooks/useQuadKeyPayloadsToFeatures.js.map +1 -1
- package/dist/browser/index.js +1298 -10
- package/dist/browser/index.js.map +1 -1
- package/dist/browser/lib/MapStyle.js +1 -0
- package/dist/browser/lib/MapStyle.js.map +1 -1
- package/dist/browser/lib/index.js +13 -2
- package/dist/browser/lib/index.js.map +1 -1
- package/dist/browser/types/index.js +0 -1
- package/dist/browser/types/index.js.map +1 -1
- package/dist/docs.json +296 -296
- package/package.json +14 -14
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/Layers/Builders/LocationHeatMapLayerBuilder.ts"],"sourcesContent":["import { HeatMapFillLayerConfig, HeatMapLineLayerConfig, HeatMapSymbolLayerConfig } from '../Configs'\nimport { FillLayerBuilder } from '../FillLayer'\nimport { LineLayerBuilder } from '../LineLayer'\nimport { SymbolLayerBuilder } from '../SymbolLayer'\n\nexport const MapHeatConstants = {\n LocationDebugLayerId: 'location-debug-id',\n LocationDebugLayerSource: 'location-debug-source',\n LocationFillLayerId: 'location-fill-id',\n LocationFillLayerSource: 'location-fill-source',\n LocationLineLayerId: 'location-line-id',\n LocationLineLayerSource: 'location-line-source',\n}\n\nexport const LocationHeatMapLayerBuilder = (color: string, alternateColor = '#000') => {\n const {\n LocationFillLayerId,\n LocationFillLayerSource,\n LocationLineLayerId,\n LocationLineLayerSource,\n LocationDebugLayerId,\n LocationDebugLayerSource,\n } = MapHeatConstants\n\n const fillLayerConfig = HeatMapFillLayerConfig(color)\n const lineLayerConfig = HeatMapLineLayerConfig(color)\n const debugLayerConfig = HeatMapSymbolLayerConfig(alternateColor)\n\n const fillLayer = new FillLayerBuilder(LocationFillLayerId, LocationFillLayerSource, fillLayerConfig)\n const lineLayer = new LineLayerBuilder(LocationLineLayerId, LocationLineLayerSource, lineLayerConfig)\n const debugLayer = new SymbolLayerBuilder(LocationDebugLayerId, LocationDebugLayerSource, debugLayerConfig)\n\n return [fillLayer, lineLayer, debugLayer]\n}\n"],"mappings":"AAAA,SAAS,
|
|
1
|
+
{"version":3,"sources":["../../../../src/Layers/Configs/HeatMapFillLayerConfig.ts","../../../../src/Layers/Configs/HeatMapLineLayerConfig.ts","../../../../src/Layers/Configs/HeatMapSymbolLayerConfig.ts","../../../../src/Layers/FillLayer.ts","../../../../src/Layers/LineLayer.ts","../../../../src/Layers/SymbolLayer.ts","../../../../src/Layers/Builders/LocationHeatMapLayerBuilder.ts"],"sourcesContent":["import { FillLayer } from 'mapbox-gl'\n\nexport const HeatMapFillLayerConfig: (color: string) => Partial<FillLayer> = (color) => ({\n paint: {\n 'fill-color': color,\n 'fill-opacity': [\n 'let',\n 'density',\n ['+', ['/', ['number', ['get', 'value']], 4], 0.125],\n ['interpolate', ['linear'], ['var', 'density'], 0.8, ['var', 'density'], 1, 0.85],\n ],\n },\n})\n","import { LineLayer } from 'mapbox-gl'\n\nexport const HeatMapLineLayerConfig: (color: string) => Partial<LineLayer> = (color) => ({\n layout: {\n // Enable for debugging\n visibility: 'none',\n },\n paint: {\n 'line-color': color,\n 'line-opacity': ['let', 'density', 0, ['interpolate', ['linear'], ['var', 'density'], 0.8, ['var', 'density'], 1, 0.85]],\n 'line-width': 0.5,\n },\n})\n","import { SymbolLayer } from 'mapbox-gl'\n\nexport const HeatMapSymbolLayerConfig: (color: string) => Partial<SymbolLayer> = (color) => ({\n layout: {\n 'text-anchor': 'center',\n 'text-field': [\n 'concat',\n 'value: ',\n ['to-string', ['+', ['/', ['number', ['get', 'value']], 2], 0.25]],\n '\\n',\n 'count: ',\n ['to-string', ['get', 'count']],\n ],\n 'text-size': 10,\n visibility: 'none',\n },\n paint: {\n 'text-color': color,\n },\n})\n","import { LayerBase } from '@xyo-network/sdk-geo'\n// eslint-disable-next-line no-restricted-imports\nimport { FillLayer } from 'mapbox-gl'\n\nexport class FillLayerBuilder extends LayerBase<FillLayer> {\n FillLayerOptions: Partial<FillLayer>\n\n // ensures this class passes for `AnyLayer` type in MapBox\n type: 'fill' = 'fill' as const\n\n constructor(id: string, source: string, FillLayerOptions?: Partial<FillLayer>) {\n super(id, source)\n this.FillLayerOptions = FillLayerOptions || { id: this.id, source: this.source }\n }\n buildLayer(): FillLayer {\n return {\n ...this.FillLayerOptions,\n id: this.id,\n source: this.source,\n type: this.type,\n }\n }\n}\n","import { LayerBase } from '@xyo-network/sdk-geo'\n// eslint-disable-next-line no-restricted-imports\nimport { LineLayer } from 'mapbox-gl'\n\nexport class LineLayerBuilder extends LayerBase<LineLayer> {\n LineLayerOptions: Partial<LineLayer>\n\n // ensures this class passes for `AnyLayer` type in MapBox\n type: 'line' = 'line' as const\n\n constructor(id: string, source: string, LineLayerOptions?: Partial<LineLayer>) {\n super(id, source)\n this.LineLayerOptions = LineLayerOptions || { id: this.id, source: this.source }\n }\n buildLayer(): LineLayer {\n return {\n ...this.LineLayerOptions,\n id: this.id,\n layout: {},\n source: this.source,\n type: this.type,\n }\n }\n}\n","import { LayerBase } from '@xyo-network/sdk-geo'\n// eslint-disable-next-line no-restricted-imports\nimport { SymbolLayer } from 'mapbox-gl'\n\nexport class SymbolLayerBuilder extends LayerBase<SymbolLayer> {\n SymbolLayerOptions: Partial<SymbolLayer>\n\n // ensures this class passes for `AnyLayer` type in MapBox\n type: 'symbol' = 'symbol' as const\n\n constructor(id: string, source: string, SymbolLayerOptions?: Partial<SymbolLayer>) {\n super(id, source)\n this.SymbolLayerOptions = SymbolLayerOptions || { id: this.id, source: this.source }\n }\n buildLayer(): SymbolLayer {\n return {\n ...this.SymbolLayerOptions,\n id: this.id,\n source: this.source,\n type: this.type,\n }\n }\n}\n","import { HeatMapFillLayerConfig, HeatMapLineLayerConfig, HeatMapSymbolLayerConfig } from '../Configs'\nimport { FillLayerBuilder } from '../FillLayer'\nimport { LineLayerBuilder } from '../LineLayer'\nimport { SymbolLayerBuilder } from '../SymbolLayer'\n\nexport const MapHeatConstants = {\n LocationDebugLayerId: 'location-debug-id',\n LocationDebugLayerSource: 'location-debug-source',\n LocationFillLayerId: 'location-fill-id',\n LocationFillLayerSource: 'location-fill-source',\n LocationLineLayerId: 'location-line-id',\n LocationLineLayerSource: 'location-line-source',\n}\n\nexport const LocationHeatMapLayerBuilder = (color: string, alternateColor = '#000') => {\n const {\n LocationFillLayerId,\n LocationFillLayerSource,\n LocationLineLayerId,\n LocationLineLayerSource,\n LocationDebugLayerId,\n LocationDebugLayerSource,\n } = MapHeatConstants\n\n const fillLayerConfig = HeatMapFillLayerConfig(color)\n const lineLayerConfig = HeatMapLineLayerConfig(color)\n const debugLayerConfig = HeatMapSymbolLayerConfig(alternateColor)\n\n const fillLayer = new FillLayerBuilder(LocationFillLayerId, LocationFillLayerSource, fillLayerConfig)\n const lineLayer = new LineLayerBuilder(LocationLineLayerId, LocationLineLayerSource, lineLayerConfig)\n const debugLayer = new SymbolLayerBuilder(LocationDebugLayerId, LocationDebugLayerSource, debugLayerConfig)\n\n return [fillLayer, lineLayer, debugLayer]\n}\n"],"mappings":"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","names":["LayerBase","LayerBase"]}
|
|
@@ -1,6 +1,38 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
// src/Layers/Configs/HeatMapFillLayerConfig.ts
|
|
2
|
+
var HeatMapFillLayerConfig = (color) => ({
|
|
3
|
+
paint: {
|
|
4
|
+
"fill-color": color,
|
|
5
|
+
"fill-opacity": [
|
|
6
|
+
"let",
|
|
7
|
+
"density",
|
|
8
|
+
["+", ["/", ["number", ["get", "value"]], 4], 0.125],
|
|
9
|
+
["interpolate", ["linear"], ["var", "density"], 0.8, ["var", "density"], 1, 0.85]
|
|
10
|
+
]
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
// src/Layers/FillLayer.ts
|
|
15
|
+
import { LayerBase } from "@xyo-network/sdk-geo";
|
|
16
|
+
var FillLayerBuilder = class extends LayerBase {
|
|
17
|
+
FillLayerOptions;
|
|
18
|
+
// ensures this class passes for `AnyLayer` type in MapBox
|
|
19
|
+
type = "fill";
|
|
20
|
+
constructor(id, source, FillLayerOptions) {
|
|
21
|
+
super(id, source);
|
|
22
|
+
this.FillLayerOptions = FillLayerOptions || { id: this.id, source: this.source };
|
|
23
|
+
}
|
|
24
|
+
buildLayer() {
|
|
25
|
+
return {
|
|
26
|
+
...this.FillLayerOptions,
|
|
27
|
+
id: this.id,
|
|
28
|
+
source: this.source,
|
|
29
|
+
type: this.type
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
// src/Layers/Builders/LocationHeatMapLayerBuilderAnimated.ts
|
|
35
|
+
var MapHeatConstants = (index, type) => ({
|
|
4
36
|
LocationDebugLayerId: `location-${type}-debug-id-${index}`,
|
|
5
37
|
LocationDebugLayerSource: `location-${type}-debug-source-${index}`,
|
|
6
38
|
LocationFillLayerId: `location-${type}-fill-id-${index}`,
|
|
@@ -8,7 +40,7 @@ const MapHeatConstants = (index, type) => ({
|
|
|
8
40
|
LocationLineLayerId: `location-${type}-line-id-${index}`,
|
|
9
41
|
LocationLineLayerSource: `location-${type}-line-source-${index}`
|
|
10
42
|
});
|
|
11
|
-
|
|
43
|
+
var LocationHeatMapLayerBuilderAnimated = (color, index, type = "") => {
|
|
12
44
|
const { LocationFillLayerId, LocationFillLayerSource } = MapHeatConstants(index, type);
|
|
13
45
|
const fillLayerConfig = HeatMapFillLayerConfig(color);
|
|
14
46
|
const fillLayer = new FillLayerBuilder(LocationFillLayerId, LocationFillLayerSource, fillLayerConfig);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/Layers/Builders/LocationHeatMapLayerBuilderAnimated.ts"],"sourcesContent":["import { HeatMapFillLayerConfig } from '../Configs'\nimport { FillLayerBuilder } from '../FillLayer'\n\nconst MapHeatConstants = (index: number, type: string) => ({\n LocationDebugLayerId: `location-${type}-debug-id-${index}`,\n LocationDebugLayerSource: `location-${type}-debug-source-${index}`,\n LocationFillLayerId: `location-${type}-fill-id-${index}`,\n LocationFillLayerSource: `location-${type}-fill-source-${index}`,\n LocationLineLayerId: `location-${type}-line-id-${index}`,\n LocationLineLayerSource: `location-${type}-line-source-${index}`,\n})\n\nexport const LocationHeatMapLayerBuilderAnimated = (color: string, index: number, type = '') => {\n const { LocationFillLayerId, LocationFillLayerSource } = MapHeatConstants(index, type)\n\n const fillLayerConfig = HeatMapFillLayerConfig(color)\n\n const fillLayer = new FillLayerBuilder(LocationFillLayerId, LocationFillLayerSource, fillLayerConfig)\n\n return fillLayer\n}\n"],"mappings":"AAAA,SAAS,
|
|
1
|
+
{"version":3,"sources":["../../../../src/Layers/Configs/HeatMapFillLayerConfig.ts","../../../../src/Layers/FillLayer.ts","../../../../src/Layers/Builders/LocationHeatMapLayerBuilderAnimated.ts"],"sourcesContent":["import { FillLayer } from 'mapbox-gl'\n\nexport const HeatMapFillLayerConfig: (color: string) => Partial<FillLayer> = (color) => ({\n paint: {\n 'fill-color': color,\n 'fill-opacity': [\n 'let',\n 'density',\n ['+', ['/', ['number', ['get', 'value']], 4], 0.125],\n ['interpolate', ['linear'], ['var', 'density'], 0.8, ['var', 'density'], 1, 0.85],\n ],\n },\n})\n","import { LayerBase } from '@xyo-network/sdk-geo'\n// eslint-disable-next-line no-restricted-imports\nimport { FillLayer } from 'mapbox-gl'\n\nexport class FillLayerBuilder extends LayerBase<FillLayer> {\n FillLayerOptions: Partial<FillLayer>\n\n // ensures this class passes for `AnyLayer` type in MapBox\n type: 'fill' = 'fill' as const\n\n constructor(id: string, source: string, FillLayerOptions?: Partial<FillLayer>) {\n super(id, source)\n this.FillLayerOptions = FillLayerOptions || { id: this.id, source: this.source }\n }\n buildLayer(): FillLayer {\n return {\n ...this.FillLayerOptions,\n id: this.id,\n source: this.source,\n type: this.type,\n }\n }\n}\n","import { HeatMapFillLayerConfig } from '../Configs'\nimport { FillLayerBuilder } from '../FillLayer'\n\nconst MapHeatConstants = (index: number, type: string) => ({\n LocationDebugLayerId: `location-${type}-debug-id-${index}`,\n LocationDebugLayerSource: `location-${type}-debug-source-${index}`,\n LocationFillLayerId: `location-${type}-fill-id-${index}`,\n LocationFillLayerSource: `location-${type}-fill-source-${index}`,\n LocationLineLayerId: `location-${type}-line-id-${index}`,\n LocationLineLayerSource: `location-${type}-line-source-${index}`,\n})\n\nexport const LocationHeatMapLayerBuilderAnimated = (color: string, index: number, type = '') => {\n const { LocationFillLayerId, LocationFillLayerSource } = MapHeatConstants(index, type)\n\n const fillLayerConfig = HeatMapFillLayerConfig(color)\n\n const fillLayer = new FillLayerBuilder(LocationFillLayerId, LocationFillLayerSource, fillLayerConfig)\n\n return fillLayer\n}\n"],"mappings":";AAEO,IAAM,yBAAgE,CAAC,WAAW;AAAA,EACvF,OAAO;AAAA,IACL,cAAc;AAAA,IACd,gBAAgB;AAAA,MACd;AAAA,MACA;AAAA,MACA,CAAC,KAAK,CAAC,KAAK,CAAC,UAAU,CAAC,OAAO,OAAO,CAAC,GAAG,CAAC,GAAG,KAAK;AAAA,MACnD,CAAC,eAAe,CAAC,QAAQ,GAAG,CAAC,OAAO,SAAS,GAAG,KAAK,CAAC,OAAO,SAAS,GAAG,GAAG,IAAI;AAAA,IAClF;AAAA,EACF;AACF;;;ACZA,SAAS,iBAAiB;AAInB,IAAM,mBAAN,cAA+B,UAAqB;AAAA,EACzD;AAAA;AAAA,EAGA,OAAe;AAAA,EAEf,YAAY,IAAY,QAAgB,kBAAuC;AAC7E,UAAM,IAAI,MAAM;AAChB,SAAK,mBAAmB,oBAAoB,EAAE,IAAI,KAAK,IAAI,QAAQ,KAAK,OAAO;AAAA,EACjF;AAAA,EACA,aAAwB;AACtB,WAAO;AAAA,MACL,GAAG,KAAK;AAAA,MACR,IAAI,KAAK;AAAA,MACT,QAAQ,KAAK;AAAA,MACb,MAAM,KAAK;AAAA,IACb;AAAA,EACF;AACF;;;ACnBA,IAAM,mBAAmB,CAAC,OAAe,UAAkB;AAAA,EACzD,sBAAsB,YAAY,IAAI,aAAa,KAAK;AAAA,EACxD,0BAA0B,YAAY,IAAI,iBAAiB,KAAK;AAAA,EAChE,qBAAqB,YAAY,IAAI,YAAY,KAAK;AAAA,EACtD,yBAAyB,YAAY,IAAI,gBAAgB,KAAK;AAAA,EAC9D,qBAAqB,YAAY,IAAI,YAAY,KAAK;AAAA,EACtD,yBAAyB,YAAY,IAAI,gBAAgB,KAAK;AAChE;AAEO,IAAM,sCAAsC,CAAC,OAAe,OAAe,OAAO,OAAO;AAC9F,QAAM,EAAE,qBAAqB,wBAAwB,IAAI,iBAAiB,OAAO,IAAI;AAErF,QAAM,kBAAkB,uBAAuB,KAAK;AAEpD,QAAM,YAAY,IAAI,iBAAiB,qBAAqB,yBAAyB,eAAe;AAEpG,SAAO;AACT;","names":[]}
|
|
@@ -1,10 +1,46 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
// src/Layers/CircleLayer.ts
|
|
2
|
+
import { LayerBase } from "@xyo-network/sdk-geo";
|
|
3
|
+
var CircleLayerBuilder = class extends LayerBase {
|
|
4
|
+
CircleLayerOptions;
|
|
5
|
+
// ensures this class passes for `AnyLayer` type in MapBox
|
|
6
|
+
type = "circle";
|
|
7
|
+
constructor(id, source, CircleLayerOptions) {
|
|
8
|
+
super(id, source);
|
|
9
|
+
this.CircleLayerOptions = CircleLayerOptions || { id: this.id, source: this.source, type: "circle" };
|
|
10
|
+
}
|
|
11
|
+
buildLayer() {
|
|
12
|
+
return {
|
|
13
|
+
filter: ["==", "$type", "Point"],
|
|
14
|
+
layout: {},
|
|
15
|
+
paint: {
|
|
16
|
+
"circle-color": "#ff0000",
|
|
17
|
+
"circle-radius": 6
|
|
18
|
+
},
|
|
19
|
+
type: this.type,
|
|
20
|
+
...this.CircleLayerOptions,
|
|
21
|
+
id: this.id,
|
|
22
|
+
source: this.source
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
// src/Layers/Configs/LocationPointLayerConfig.ts
|
|
28
|
+
var LocationPointLayerConfig = (color, circleRadius, circleOpacity) => {
|
|
29
|
+
return {
|
|
30
|
+
paint: {
|
|
31
|
+
"circle-color": color,
|
|
32
|
+
"circle-opacity": circleOpacity,
|
|
33
|
+
"circle-radius": circleRadius
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
// src/Layers/Builders/LocationPointsMapLayerBuilder.ts
|
|
39
|
+
var MapPointsConstants = {
|
|
4
40
|
LocationDotsLayerId: "location-dots",
|
|
5
41
|
LocationDotsLayerSource: "location-dots-source"
|
|
6
42
|
};
|
|
7
|
-
|
|
43
|
+
var LocationPointsMapLayerBuilder = (color, circleRadius = 6, circleOpacity = 0.8) => {
|
|
8
44
|
const { LocationDotsLayerId, LocationDotsLayerSource } = MapPointsConstants;
|
|
9
45
|
const dotLayerConfig = LocationPointLayerConfig(color, circleRadius, circleOpacity);
|
|
10
46
|
const dotLayer = new CircleLayerBuilder(LocationDotsLayerId, LocationDotsLayerSource, dotLayerConfig);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/Layers/Builders/LocationPointsMapLayerBuilder.ts"],"sourcesContent":["import { CircleLayerBuilder } from '../CircleLayer'\nimport { LocationPointLayerConfig } from '../Configs'\n\nexport const MapPointsConstants = {\n LocationDotsLayerId: 'location-dots',\n LocationDotsLayerSource: 'location-dots-source',\n}\n\nexport const LocationPointsMapLayerBuilder = (color: string, circleRadius = 6, circleOpacity = 0.8) => {\n const { LocationDotsLayerId, LocationDotsLayerSource } = MapPointsConstants\n\n const dotLayerConfig = LocationPointLayerConfig(color, circleRadius, circleOpacity)\n\n const dotLayer = new CircleLayerBuilder(LocationDotsLayerId, LocationDotsLayerSource, dotLayerConfig)\n\n return [dotLayer]\n}\n"],"mappings":"AAAA,SAAS,
|
|
1
|
+
{"version":3,"sources":["../../../../src/Layers/CircleLayer.ts","../../../../src/Layers/Configs/LocationPointLayerConfig.ts","../../../../src/Layers/Builders/LocationPointsMapLayerBuilder.ts"],"sourcesContent":["import { LayerBase } from '@xyo-network/sdk-geo'\n// eslint-disable-next-line no-restricted-imports\nimport { CircleLayer } from 'mapbox-gl'\n\nexport class CircleLayerBuilder extends LayerBase<CircleLayer> {\n CircleLayerOptions: Partial<CircleLayer>\n\n // ensures this class passes for `AnyLayer` type in MapBox\n type: 'circle' = 'circle' as const\n\n constructor(id: string, source: string, CircleLayerOptions?: Partial<CircleLayer>) {\n super(id, source)\n this.CircleLayerOptions = CircleLayerOptions || { id: this.id, source: this.source, type: 'circle' }\n }\n buildLayer(): CircleLayer {\n return {\n filter: ['==', '$type', 'Point'],\n layout: {},\n paint: {\n 'circle-color': '#ff0000',\n 'circle-radius': 6,\n },\n type: this.type,\n ...this.CircleLayerOptions,\n id: this.id,\n source: this.source,\n }\n }\n}\n","import { CircleLayer } from 'mapbox-gl'\n\nexport const LocationPointLayerConfig: (color: string, circleRadius: number, circleOpacity: number) => Partial<CircleLayer> = (\n color,\n circleRadius,\n circleOpacity,\n) => {\n return {\n paint: {\n 'circle-color': color,\n 'circle-opacity': circleOpacity,\n 'circle-radius': circleRadius,\n },\n }\n}\n","import { CircleLayerBuilder } from '../CircleLayer'\nimport { LocationPointLayerConfig } from '../Configs'\n\nexport const MapPointsConstants = {\n LocationDotsLayerId: 'location-dots',\n LocationDotsLayerSource: 'location-dots-source',\n}\n\nexport const LocationPointsMapLayerBuilder = (color: string, circleRadius = 6, circleOpacity = 0.8) => {\n const { LocationDotsLayerId, LocationDotsLayerSource } = MapPointsConstants\n\n const dotLayerConfig = LocationPointLayerConfig(color, circleRadius, circleOpacity)\n\n const dotLayer = new CircleLayerBuilder(LocationDotsLayerId, LocationDotsLayerSource, dotLayerConfig)\n\n return [dotLayer]\n}\n"],"mappings":";AAAA,SAAS,iBAAiB;AAInB,IAAM,qBAAN,cAAiC,UAAuB;AAAA,EAC7D;AAAA;AAAA,EAGA,OAAiB;AAAA,EAEjB,YAAY,IAAY,QAAgB,oBAA2C;AACjF,UAAM,IAAI,MAAM;AAChB,SAAK,qBAAqB,sBAAsB,EAAE,IAAI,KAAK,IAAI,QAAQ,KAAK,QAAQ,MAAM,SAAS;AAAA,EACrG;AAAA,EACA,aAA0B;AACxB,WAAO;AAAA,MACL,QAAQ,CAAC,MAAM,SAAS,OAAO;AAAA,MAC/B,QAAQ,CAAC;AAAA,MACT,OAAO;AAAA,QACL,gBAAgB;AAAA,QAChB,iBAAiB;AAAA,MACnB;AAAA,MACA,MAAM,KAAK;AAAA,MACX,GAAG,KAAK;AAAA,MACR,IAAI,KAAK;AAAA,MACT,QAAQ,KAAK;AAAA,IACf;AAAA,EACF;AACF;;;AC1BO,IAAM,2BAAiH,CAC5H,OACA,cACA,kBACG;AACH,SAAO;AAAA,IACL,OAAO;AAAA,MACL,gBAAgB;AAAA,MAChB,kBAAkB;AAAA,MAClB,iBAAiB;AAAA,IACnB;AAAA,EACF;AACF;;;ACXO,IAAM,qBAAqB;AAAA,EAChC,qBAAqB;AAAA,EACrB,yBAAyB;AAC3B;AAEO,IAAM,gCAAgC,CAAC,OAAe,eAAe,GAAG,gBAAgB,QAAQ;AACrG,QAAM,EAAE,qBAAqB,wBAAwB,IAAI;AAEzD,QAAM,iBAAiB,yBAAyB,OAAO,cAAc,aAAa;AAElF,QAAM,WAAW,IAAI,mBAAmB,qBAAqB,yBAAyB,cAAc;AAEpG,SAAO,CAAC,QAAQ;AAClB;","names":[]}
|
|
@@ -1,4 +1,206 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
// src/Layers/Configs/HeatMapFillLayerConfig.ts
|
|
2
|
+
var HeatMapFillLayerConfig = (color) => ({
|
|
3
|
+
paint: {
|
|
4
|
+
"fill-color": color,
|
|
5
|
+
"fill-opacity": [
|
|
6
|
+
"let",
|
|
7
|
+
"density",
|
|
8
|
+
["+", ["/", ["number", ["get", "value"]], 4], 0.125],
|
|
9
|
+
["interpolate", ["linear"], ["var", "density"], 0.8, ["var", "density"], 1, 0.85]
|
|
10
|
+
]
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
// src/Layers/Configs/HeatMapLineLayerConfig.ts
|
|
15
|
+
var HeatMapLineLayerConfig = (color) => ({
|
|
16
|
+
layout: {
|
|
17
|
+
// Enable for debugging
|
|
18
|
+
visibility: "none"
|
|
19
|
+
},
|
|
20
|
+
paint: {
|
|
21
|
+
"line-color": color,
|
|
22
|
+
"line-opacity": ["let", "density", 0, ["interpolate", ["linear"], ["var", "density"], 0.8, ["var", "density"], 1, 0.85]],
|
|
23
|
+
"line-width": 0.5
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
// src/Layers/Configs/HeatMapSymbolLayerConfig.ts
|
|
28
|
+
var HeatMapSymbolLayerConfig = (color) => ({
|
|
29
|
+
layout: {
|
|
30
|
+
"text-anchor": "center",
|
|
31
|
+
"text-field": [
|
|
32
|
+
"concat",
|
|
33
|
+
"value: ",
|
|
34
|
+
["to-string", ["+", ["/", ["number", ["get", "value"]], 2], 0.25]],
|
|
35
|
+
"\n",
|
|
36
|
+
"count: ",
|
|
37
|
+
["to-string", ["get", "count"]]
|
|
38
|
+
],
|
|
39
|
+
"text-size": 10,
|
|
40
|
+
visibility: "none"
|
|
41
|
+
},
|
|
42
|
+
paint: {
|
|
43
|
+
"text-color": color
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
// src/Layers/Configs/LocationPointLayerConfig.ts
|
|
48
|
+
var LocationPointLayerConfig = (color, circleRadius, circleOpacity) => {
|
|
49
|
+
return {
|
|
50
|
+
paint: {
|
|
51
|
+
"circle-color": color,
|
|
52
|
+
"circle-opacity": circleOpacity,
|
|
53
|
+
"circle-radius": circleRadius
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
// src/Layers/FillLayer.ts
|
|
59
|
+
import { LayerBase } from "@xyo-network/sdk-geo";
|
|
60
|
+
var FillLayerBuilder = class extends LayerBase {
|
|
61
|
+
FillLayerOptions;
|
|
62
|
+
// ensures this class passes for `AnyLayer` type in MapBox
|
|
63
|
+
type = "fill";
|
|
64
|
+
constructor(id, source, FillLayerOptions) {
|
|
65
|
+
super(id, source);
|
|
66
|
+
this.FillLayerOptions = FillLayerOptions || { id: this.id, source: this.source };
|
|
67
|
+
}
|
|
68
|
+
buildLayer() {
|
|
69
|
+
return {
|
|
70
|
+
...this.FillLayerOptions,
|
|
71
|
+
id: this.id,
|
|
72
|
+
source: this.source,
|
|
73
|
+
type: this.type
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
// src/Layers/LineLayer.ts
|
|
79
|
+
import { LayerBase as LayerBase2 } from "@xyo-network/sdk-geo";
|
|
80
|
+
var LineLayerBuilder = class extends LayerBase2 {
|
|
81
|
+
LineLayerOptions;
|
|
82
|
+
// ensures this class passes for `AnyLayer` type in MapBox
|
|
83
|
+
type = "line";
|
|
84
|
+
constructor(id, source, LineLayerOptions) {
|
|
85
|
+
super(id, source);
|
|
86
|
+
this.LineLayerOptions = LineLayerOptions || { id: this.id, source: this.source };
|
|
87
|
+
}
|
|
88
|
+
buildLayer() {
|
|
89
|
+
return {
|
|
90
|
+
...this.LineLayerOptions,
|
|
91
|
+
id: this.id,
|
|
92
|
+
layout: {},
|
|
93
|
+
source: this.source,
|
|
94
|
+
type: this.type
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
// src/Layers/SymbolLayer.ts
|
|
100
|
+
import { LayerBase as LayerBase3 } from "@xyo-network/sdk-geo";
|
|
101
|
+
var SymbolLayerBuilder = class extends LayerBase3 {
|
|
102
|
+
SymbolLayerOptions;
|
|
103
|
+
// ensures this class passes for `AnyLayer` type in MapBox
|
|
104
|
+
type = "symbol";
|
|
105
|
+
constructor(id, source, SymbolLayerOptions) {
|
|
106
|
+
super(id, source);
|
|
107
|
+
this.SymbolLayerOptions = SymbolLayerOptions || { id: this.id, source: this.source };
|
|
108
|
+
}
|
|
109
|
+
buildLayer() {
|
|
110
|
+
return {
|
|
111
|
+
...this.SymbolLayerOptions,
|
|
112
|
+
id: this.id,
|
|
113
|
+
source: this.source,
|
|
114
|
+
type: this.type
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
// src/Layers/Builders/LocationHeatMapLayerBuilder.ts
|
|
120
|
+
var MapHeatConstants = {
|
|
121
|
+
LocationDebugLayerId: "location-debug-id",
|
|
122
|
+
LocationDebugLayerSource: "location-debug-source",
|
|
123
|
+
LocationFillLayerId: "location-fill-id",
|
|
124
|
+
LocationFillLayerSource: "location-fill-source",
|
|
125
|
+
LocationLineLayerId: "location-line-id",
|
|
126
|
+
LocationLineLayerSource: "location-line-source"
|
|
127
|
+
};
|
|
128
|
+
var LocationHeatMapLayerBuilder = (color, alternateColor = "#000") => {
|
|
129
|
+
const {
|
|
130
|
+
LocationFillLayerId,
|
|
131
|
+
LocationFillLayerSource,
|
|
132
|
+
LocationLineLayerId,
|
|
133
|
+
LocationLineLayerSource,
|
|
134
|
+
LocationDebugLayerId,
|
|
135
|
+
LocationDebugLayerSource
|
|
136
|
+
} = MapHeatConstants;
|
|
137
|
+
const fillLayerConfig = HeatMapFillLayerConfig(color);
|
|
138
|
+
const lineLayerConfig = HeatMapLineLayerConfig(color);
|
|
139
|
+
const debugLayerConfig = HeatMapSymbolLayerConfig(alternateColor);
|
|
140
|
+
const fillLayer = new FillLayerBuilder(LocationFillLayerId, LocationFillLayerSource, fillLayerConfig);
|
|
141
|
+
const lineLayer = new LineLayerBuilder(LocationLineLayerId, LocationLineLayerSource, lineLayerConfig);
|
|
142
|
+
const debugLayer = new SymbolLayerBuilder(LocationDebugLayerId, LocationDebugLayerSource, debugLayerConfig);
|
|
143
|
+
return [fillLayer, lineLayer, debugLayer];
|
|
144
|
+
};
|
|
145
|
+
|
|
146
|
+
// src/Layers/Builders/LocationHeatMapLayerBuilderAnimated.ts
|
|
147
|
+
var MapHeatConstants2 = (index, type) => ({
|
|
148
|
+
LocationDebugLayerId: `location-${type}-debug-id-${index}`,
|
|
149
|
+
LocationDebugLayerSource: `location-${type}-debug-source-${index}`,
|
|
150
|
+
LocationFillLayerId: `location-${type}-fill-id-${index}`,
|
|
151
|
+
LocationFillLayerSource: `location-${type}-fill-source-${index}`,
|
|
152
|
+
LocationLineLayerId: `location-${type}-line-id-${index}`,
|
|
153
|
+
LocationLineLayerSource: `location-${type}-line-source-${index}`
|
|
154
|
+
});
|
|
155
|
+
var LocationHeatMapLayerBuilderAnimated = (color, index, type = "") => {
|
|
156
|
+
const { LocationFillLayerId, LocationFillLayerSource } = MapHeatConstants2(index, type);
|
|
157
|
+
const fillLayerConfig = HeatMapFillLayerConfig(color);
|
|
158
|
+
const fillLayer = new FillLayerBuilder(LocationFillLayerId, LocationFillLayerSource, fillLayerConfig);
|
|
159
|
+
return fillLayer;
|
|
160
|
+
};
|
|
161
|
+
|
|
162
|
+
// src/Layers/CircleLayer.ts
|
|
163
|
+
import { LayerBase as LayerBase4 } from "@xyo-network/sdk-geo";
|
|
164
|
+
var CircleLayerBuilder = class extends LayerBase4 {
|
|
165
|
+
CircleLayerOptions;
|
|
166
|
+
// ensures this class passes for `AnyLayer` type in MapBox
|
|
167
|
+
type = "circle";
|
|
168
|
+
constructor(id, source, CircleLayerOptions) {
|
|
169
|
+
super(id, source);
|
|
170
|
+
this.CircleLayerOptions = CircleLayerOptions || { id: this.id, source: this.source, type: "circle" };
|
|
171
|
+
}
|
|
172
|
+
buildLayer() {
|
|
173
|
+
return {
|
|
174
|
+
filter: ["==", "$type", "Point"],
|
|
175
|
+
layout: {},
|
|
176
|
+
paint: {
|
|
177
|
+
"circle-color": "#ff0000",
|
|
178
|
+
"circle-radius": 6
|
|
179
|
+
},
|
|
180
|
+
type: this.type,
|
|
181
|
+
...this.CircleLayerOptions,
|
|
182
|
+
id: this.id,
|
|
183
|
+
source: this.source
|
|
184
|
+
};
|
|
185
|
+
}
|
|
186
|
+
};
|
|
187
|
+
|
|
188
|
+
// src/Layers/Builders/LocationPointsMapLayerBuilder.ts
|
|
189
|
+
var MapPointsConstants = {
|
|
190
|
+
LocationDotsLayerId: "location-dots",
|
|
191
|
+
LocationDotsLayerSource: "location-dots-source"
|
|
192
|
+
};
|
|
193
|
+
var LocationPointsMapLayerBuilder = (color, circleRadius = 6, circleOpacity = 0.8) => {
|
|
194
|
+
const { LocationDotsLayerId, LocationDotsLayerSource } = MapPointsConstants;
|
|
195
|
+
const dotLayerConfig = LocationPointLayerConfig(color, circleRadius, circleOpacity);
|
|
196
|
+
const dotLayer = new CircleLayerBuilder(LocationDotsLayerId, LocationDotsLayerSource, dotLayerConfig);
|
|
197
|
+
return [dotLayer];
|
|
198
|
+
};
|
|
199
|
+
export {
|
|
200
|
+
LocationHeatMapLayerBuilder,
|
|
201
|
+
LocationHeatMapLayerBuilderAnimated,
|
|
202
|
+
LocationPointsMapLayerBuilder,
|
|
203
|
+
MapHeatConstants,
|
|
204
|
+
MapPointsConstants
|
|
205
|
+
};
|
|
4
206
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/Layers/Builders/index.ts"],"sourcesContent":["export * from './LocationHeatMapLayerBuilder'\nexport * from './LocationHeatMapLayerBuilderAnimated'\nexport * from './LocationPointsMapLayerBuilder'\n"],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../../../src/Layers/Configs/HeatMapFillLayerConfig.ts","../../../../src/Layers/Configs/HeatMapLineLayerConfig.ts","../../../../src/Layers/Configs/HeatMapSymbolLayerConfig.ts","../../../../src/Layers/Configs/LocationPointLayerConfig.ts","../../../../src/Layers/FillLayer.ts","../../../../src/Layers/LineLayer.ts","../../../../src/Layers/SymbolLayer.ts","../../../../src/Layers/Builders/LocationHeatMapLayerBuilder.ts","../../../../src/Layers/Builders/LocationHeatMapLayerBuilderAnimated.ts","../../../../src/Layers/CircleLayer.ts","../../../../src/Layers/Builders/LocationPointsMapLayerBuilder.ts"],"sourcesContent":["import { FillLayer } from 'mapbox-gl'\n\nexport const HeatMapFillLayerConfig: (color: string) => Partial<FillLayer> = (color) => ({\n paint: {\n 'fill-color': color,\n 'fill-opacity': [\n 'let',\n 'density',\n ['+', ['/', ['number', ['get', 'value']], 4], 0.125],\n ['interpolate', ['linear'], ['var', 'density'], 0.8, ['var', 'density'], 1, 0.85],\n ],\n },\n})\n","import { LineLayer } from 'mapbox-gl'\n\nexport const HeatMapLineLayerConfig: (color: string) => Partial<LineLayer> = (color) => ({\n layout: {\n // Enable for debugging\n visibility: 'none',\n },\n paint: {\n 'line-color': color,\n 'line-opacity': ['let', 'density', 0, ['interpolate', ['linear'], ['var', 'density'], 0.8, ['var', 'density'], 1, 0.85]],\n 'line-width': 0.5,\n },\n})\n","import { SymbolLayer } from 'mapbox-gl'\n\nexport const HeatMapSymbolLayerConfig: (color: string) => Partial<SymbolLayer> = (color) => ({\n layout: {\n 'text-anchor': 'center',\n 'text-field': [\n 'concat',\n 'value: ',\n ['to-string', ['+', ['/', ['number', ['get', 'value']], 2], 0.25]],\n '\\n',\n 'count: ',\n ['to-string', ['get', 'count']],\n ],\n 'text-size': 10,\n visibility: 'none',\n },\n paint: {\n 'text-color': color,\n },\n})\n","import { CircleLayer } from 'mapbox-gl'\n\nexport const LocationPointLayerConfig: (color: string, circleRadius: number, circleOpacity: number) => Partial<CircleLayer> = (\n color,\n circleRadius,\n circleOpacity,\n) => {\n return {\n paint: {\n 'circle-color': color,\n 'circle-opacity': circleOpacity,\n 'circle-radius': circleRadius,\n },\n }\n}\n","import { LayerBase } from '@xyo-network/sdk-geo'\n// eslint-disable-next-line no-restricted-imports\nimport { FillLayer } from 'mapbox-gl'\n\nexport class FillLayerBuilder extends LayerBase<FillLayer> {\n FillLayerOptions: Partial<FillLayer>\n\n // ensures this class passes for `AnyLayer` type in MapBox\n type: 'fill' = 'fill' as const\n\n constructor(id: string, source: string, FillLayerOptions?: Partial<FillLayer>) {\n super(id, source)\n this.FillLayerOptions = FillLayerOptions || { id: this.id, source: this.source }\n }\n buildLayer(): FillLayer {\n return {\n ...this.FillLayerOptions,\n id: this.id,\n source: this.source,\n type: this.type,\n }\n }\n}\n","import { LayerBase } from '@xyo-network/sdk-geo'\n// eslint-disable-next-line no-restricted-imports\nimport { LineLayer } from 'mapbox-gl'\n\nexport class LineLayerBuilder extends LayerBase<LineLayer> {\n LineLayerOptions: Partial<LineLayer>\n\n // ensures this class passes for `AnyLayer` type in MapBox\n type: 'line' = 'line' as const\n\n constructor(id: string, source: string, LineLayerOptions?: Partial<LineLayer>) {\n super(id, source)\n this.LineLayerOptions = LineLayerOptions || { id: this.id, source: this.source }\n }\n buildLayer(): LineLayer {\n return {\n ...this.LineLayerOptions,\n id: this.id,\n layout: {},\n source: this.source,\n type: this.type,\n }\n }\n}\n","import { LayerBase } from '@xyo-network/sdk-geo'\n// eslint-disable-next-line no-restricted-imports\nimport { SymbolLayer } from 'mapbox-gl'\n\nexport class SymbolLayerBuilder extends LayerBase<SymbolLayer> {\n SymbolLayerOptions: Partial<SymbolLayer>\n\n // ensures this class passes for `AnyLayer` type in MapBox\n type: 'symbol' = 'symbol' as const\n\n constructor(id: string, source: string, SymbolLayerOptions?: Partial<SymbolLayer>) {\n super(id, source)\n this.SymbolLayerOptions = SymbolLayerOptions || { id: this.id, source: this.source }\n }\n buildLayer(): SymbolLayer {\n return {\n ...this.SymbolLayerOptions,\n id: this.id,\n source: this.source,\n type: this.type,\n }\n }\n}\n","import { HeatMapFillLayerConfig, HeatMapLineLayerConfig, HeatMapSymbolLayerConfig } from '../Configs'\nimport { FillLayerBuilder } from '../FillLayer'\nimport { LineLayerBuilder } from '../LineLayer'\nimport { SymbolLayerBuilder } from '../SymbolLayer'\n\nexport const MapHeatConstants = {\n LocationDebugLayerId: 'location-debug-id',\n LocationDebugLayerSource: 'location-debug-source',\n LocationFillLayerId: 'location-fill-id',\n LocationFillLayerSource: 'location-fill-source',\n LocationLineLayerId: 'location-line-id',\n LocationLineLayerSource: 'location-line-source',\n}\n\nexport const LocationHeatMapLayerBuilder = (color: string, alternateColor = '#000') => {\n const {\n LocationFillLayerId,\n LocationFillLayerSource,\n LocationLineLayerId,\n LocationLineLayerSource,\n LocationDebugLayerId,\n LocationDebugLayerSource,\n } = MapHeatConstants\n\n const fillLayerConfig = HeatMapFillLayerConfig(color)\n const lineLayerConfig = HeatMapLineLayerConfig(color)\n const debugLayerConfig = HeatMapSymbolLayerConfig(alternateColor)\n\n const fillLayer = new FillLayerBuilder(LocationFillLayerId, LocationFillLayerSource, fillLayerConfig)\n const lineLayer = new LineLayerBuilder(LocationLineLayerId, LocationLineLayerSource, lineLayerConfig)\n const debugLayer = new SymbolLayerBuilder(LocationDebugLayerId, LocationDebugLayerSource, debugLayerConfig)\n\n return [fillLayer, lineLayer, debugLayer]\n}\n","import { HeatMapFillLayerConfig } from '../Configs'\nimport { FillLayerBuilder } from '../FillLayer'\n\nconst MapHeatConstants = (index: number, type: string) => ({\n LocationDebugLayerId: `location-${type}-debug-id-${index}`,\n LocationDebugLayerSource: `location-${type}-debug-source-${index}`,\n LocationFillLayerId: `location-${type}-fill-id-${index}`,\n LocationFillLayerSource: `location-${type}-fill-source-${index}`,\n LocationLineLayerId: `location-${type}-line-id-${index}`,\n LocationLineLayerSource: `location-${type}-line-source-${index}`,\n})\n\nexport const LocationHeatMapLayerBuilderAnimated = (color: string, index: number, type = '') => {\n const { LocationFillLayerId, LocationFillLayerSource } = MapHeatConstants(index, type)\n\n const fillLayerConfig = HeatMapFillLayerConfig(color)\n\n const fillLayer = new FillLayerBuilder(LocationFillLayerId, LocationFillLayerSource, fillLayerConfig)\n\n return fillLayer\n}\n","import { LayerBase } from '@xyo-network/sdk-geo'\n// eslint-disable-next-line no-restricted-imports\nimport { CircleLayer } from 'mapbox-gl'\n\nexport class CircleLayerBuilder extends LayerBase<CircleLayer> {\n CircleLayerOptions: Partial<CircleLayer>\n\n // ensures this class passes for `AnyLayer` type in MapBox\n type: 'circle' = 'circle' as const\n\n constructor(id: string, source: string, CircleLayerOptions?: Partial<CircleLayer>) {\n super(id, source)\n this.CircleLayerOptions = CircleLayerOptions || { id: this.id, source: this.source, type: 'circle' }\n }\n buildLayer(): CircleLayer {\n return {\n filter: ['==', '$type', 'Point'],\n layout: {},\n paint: {\n 'circle-color': '#ff0000',\n 'circle-radius': 6,\n },\n type: this.type,\n ...this.CircleLayerOptions,\n id: this.id,\n source: this.source,\n }\n }\n}\n","import { CircleLayerBuilder } from '../CircleLayer'\nimport { LocationPointLayerConfig } from '../Configs'\n\nexport const MapPointsConstants = {\n LocationDotsLayerId: 'location-dots',\n LocationDotsLayerSource: 'location-dots-source',\n}\n\nexport const LocationPointsMapLayerBuilder = (color: string, circleRadius = 6, circleOpacity = 0.8) => {\n const { LocationDotsLayerId, LocationDotsLayerSource } = MapPointsConstants\n\n const dotLayerConfig = LocationPointLayerConfig(color, circleRadius, circleOpacity)\n\n const dotLayer = new CircleLayerBuilder(LocationDotsLayerId, LocationDotsLayerSource, dotLayerConfig)\n\n return [dotLayer]\n}\n"],"mappings":"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","names":["LayerBase","LayerBase","MapHeatConstants","LayerBase"]}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
// src/Layers/CircleLayer.ts
|
|
1
2
|
import { LayerBase } from "@xyo-network/sdk-geo";
|
|
2
|
-
|
|
3
|
+
var CircleLayerBuilder = class extends LayerBase {
|
|
3
4
|
CircleLayerOptions;
|
|
4
5
|
// ensures this class passes for `AnyLayer` type in MapBox
|
|
5
6
|
type = "circle";
|
|
@@ -21,7 +22,7 @@ class CircleLayerBuilder extends LayerBase {
|
|
|
21
22
|
source: this.source
|
|
22
23
|
};
|
|
23
24
|
}
|
|
24
|
-
}
|
|
25
|
+
};
|
|
25
26
|
export {
|
|
26
27
|
CircleLayerBuilder
|
|
27
28
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/Layers/CircleLayer.ts"],"sourcesContent":["import { LayerBase } from '@xyo-network/sdk-geo'\n// eslint-disable-next-line no-restricted-imports\nimport { CircleLayer } from 'mapbox-gl'\n\nexport class CircleLayerBuilder extends LayerBase<CircleLayer> {\n CircleLayerOptions: Partial<CircleLayer>\n\n // ensures this class passes for `AnyLayer` type in MapBox\n type: 'circle' = 'circle' as const\n\n constructor(id: string, source: string, CircleLayerOptions?: Partial<CircleLayer>) {\n super(id, source)\n this.CircleLayerOptions = CircleLayerOptions || { id: this.id, source: this.source, type: 'circle' }\n }\n buildLayer(): CircleLayer {\n return {\n filter: ['==', '$type', 'Point'],\n layout: {},\n paint: {\n 'circle-color': '#ff0000',\n 'circle-radius': 6,\n },\n type: this.type,\n ...this.CircleLayerOptions,\n id: this.id,\n source: this.source,\n }\n }\n}\n"],"mappings":"AAAA,SAAS,iBAAiB;AAInB,
|
|
1
|
+
{"version":3,"sources":["../../../src/Layers/CircleLayer.ts"],"sourcesContent":["import { LayerBase } from '@xyo-network/sdk-geo'\n// eslint-disable-next-line no-restricted-imports\nimport { CircleLayer } from 'mapbox-gl'\n\nexport class CircleLayerBuilder extends LayerBase<CircleLayer> {\n CircleLayerOptions: Partial<CircleLayer>\n\n // ensures this class passes for `AnyLayer` type in MapBox\n type: 'circle' = 'circle' as const\n\n constructor(id: string, source: string, CircleLayerOptions?: Partial<CircleLayer>) {\n super(id, source)\n this.CircleLayerOptions = CircleLayerOptions || { id: this.id, source: this.source, type: 'circle' }\n }\n buildLayer(): CircleLayer {\n return {\n filter: ['==', '$type', 'Point'],\n layout: {},\n paint: {\n 'circle-color': '#ff0000',\n 'circle-radius': 6,\n },\n type: this.type,\n ...this.CircleLayerOptions,\n id: this.id,\n source: this.source,\n }\n }\n}\n"],"mappings":";AAAA,SAAS,iBAAiB;AAInB,IAAM,qBAAN,cAAiC,UAAuB;AAAA,EAC7D;AAAA;AAAA,EAGA,OAAiB;AAAA,EAEjB,YAAY,IAAY,QAAgB,oBAA2C;AACjF,UAAM,IAAI,MAAM;AAChB,SAAK,qBAAqB,sBAAsB,EAAE,IAAI,KAAK,IAAI,QAAQ,KAAK,QAAQ,MAAM,SAAS;AAAA,EACrG;AAAA,EACA,aAA0B;AACxB,WAAO;AAAA,MACL,QAAQ,CAAC,MAAM,SAAS,OAAO;AAAA,MAC/B,QAAQ,CAAC;AAAA,MACT,OAAO;AAAA,QACL,gBAAgB;AAAA,QAChB,iBAAiB;AAAA,MACnB;AAAA,MACA,MAAM,KAAK;AAAA,MACX,GAAG,KAAK;AAAA,MACR,IAAI,KAAK;AAAA,MACT,QAAQ,KAAK;AAAA,IACf;AAAA,EACF;AACF;","names":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/Layers/Configs/HeatMapFillLayerConfig.ts"],"sourcesContent":["import { FillLayer } from 'mapbox-gl'\n\nexport const HeatMapFillLayerConfig: (color: string) => Partial<FillLayer> = (color) => ({\n paint: {\n 'fill-color': color,\n 'fill-opacity': [\n 'let',\n 'density',\n ['+', ['/', ['number', ['get', 'value']], 4], 0.125],\n ['interpolate', ['linear'], ['var', 'density'], 0.8, ['var', 'density'], 1, 0.85],\n ],\n },\n})\n"],"mappings":"AAEO,
|
|
1
|
+
{"version":3,"sources":["../../../../src/Layers/Configs/HeatMapFillLayerConfig.ts"],"sourcesContent":["import { FillLayer } from 'mapbox-gl'\n\nexport const HeatMapFillLayerConfig: (color: string) => Partial<FillLayer> = (color) => ({\n paint: {\n 'fill-color': color,\n 'fill-opacity': [\n 'let',\n 'density',\n ['+', ['/', ['number', ['get', 'value']], 4], 0.125],\n ['interpolate', ['linear'], ['var', 'density'], 0.8, ['var', 'density'], 1, 0.85],\n ],\n },\n})\n"],"mappings":";AAEO,IAAM,yBAAgE,CAAC,WAAW;AAAA,EACvF,OAAO;AAAA,IACL,cAAc;AAAA,IACd,gBAAgB;AAAA,MACd;AAAA,MACA;AAAA,MACA,CAAC,KAAK,CAAC,KAAK,CAAC,UAAU,CAAC,OAAO,OAAO,CAAC,GAAG,CAAC,GAAG,KAAK;AAAA,MACnD,CAAC,eAAe,CAAC,QAAQ,GAAG,CAAC,OAAO,SAAS,GAAG,KAAK,CAAC,OAAO,SAAS,GAAG,GAAG,IAAI;AAAA,IAClF;AAAA,EACF;AACF;","names":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/Layers/Configs/HeatMapLineLayerConfig.ts"],"sourcesContent":["import { LineLayer } from 'mapbox-gl'\n\nexport const HeatMapLineLayerConfig: (color: string) => Partial<LineLayer> = (color) => ({\n layout: {\n // Enable for debugging\n visibility: 'none',\n },\n paint: {\n 'line-color': color,\n 'line-opacity': ['let', 'density', 0, ['interpolate', ['linear'], ['var', 'density'], 0.8, ['var', 'density'], 1, 0.85]],\n 'line-width': 0.5,\n },\n})\n"],"mappings":"AAEO,
|
|
1
|
+
{"version":3,"sources":["../../../../src/Layers/Configs/HeatMapLineLayerConfig.ts"],"sourcesContent":["import { LineLayer } from 'mapbox-gl'\n\nexport const HeatMapLineLayerConfig: (color: string) => Partial<LineLayer> = (color) => ({\n layout: {\n // Enable for debugging\n visibility: 'none',\n },\n paint: {\n 'line-color': color,\n 'line-opacity': ['let', 'density', 0, ['interpolate', ['linear'], ['var', 'density'], 0.8, ['var', 'density'], 1, 0.85]],\n 'line-width': 0.5,\n },\n})\n"],"mappings":";AAEO,IAAM,yBAAgE,CAAC,WAAW;AAAA,EACvF,QAAQ;AAAA;AAAA,IAEN,YAAY;AAAA,EACd;AAAA,EACA,OAAO;AAAA,IACL,cAAc;AAAA,IACd,gBAAgB,CAAC,OAAO,WAAW,GAAG,CAAC,eAAe,CAAC,QAAQ,GAAG,CAAC,OAAO,SAAS,GAAG,KAAK,CAAC,OAAO,SAAS,GAAG,GAAG,IAAI,CAAC;AAAA,IACvH,cAAc;AAAA,EAChB;AACF;","names":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/Layers/Configs/HeatMapSymbolLayerConfig.ts"],"sourcesContent":["import { SymbolLayer } from 'mapbox-gl'\n\nexport const HeatMapSymbolLayerConfig: (color: string) => Partial<SymbolLayer> = (color) => ({\n layout: {\n 'text-anchor': 'center',\n 'text-field': [\n 'concat',\n 'value: ',\n ['to-string', ['+', ['/', ['number', ['get', 'value']], 2], 0.25]],\n '\\n',\n 'count: ',\n ['to-string', ['get', 'count']],\n ],\n 'text-size': 10,\n visibility: 'none',\n },\n paint: {\n 'text-color': color,\n },\n})\n"],"mappings":"AAEO,
|
|
1
|
+
{"version":3,"sources":["../../../../src/Layers/Configs/HeatMapSymbolLayerConfig.ts"],"sourcesContent":["import { SymbolLayer } from 'mapbox-gl'\n\nexport const HeatMapSymbolLayerConfig: (color: string) => Partial<SymbolLayer> = (color) => ({\n layout: {\n 'text-anchor': 'center',\n 'text-field': [\n 'concat',\n 'value: ',\n ['to-string', ['+', ['/', ['number', ['get', 'value']], 2], 0.25]],\n '\\n',\n 'count: ',\n ['to-string', ['get', 'count']],\n ],\n 'text-size': 10,\n visibility: 'none',\n },\n paint: {\n 'text-color': color,\n },\n})\n"],"mappings":";AAEO,IAAM,2BAAoE,CAAC,WAAW;AAAA,EAC3F,QAAQ;AAAA,IACN,eAAe;AAAA,IACf,cAAc;AAAA,MACZ;AAAA,MACA;AAAA,MACA,CAAC,aAAa,CAAC,KAAK,CAAC,KAAK,CAAC,UAAU,CAAC,OAAO,OAAO,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC;AAAA,MACjE;AAAA,MACA;AAAA,MACA,CAAC,aAAa,CAAC,OAAO,OAAO,CAAC;AAAA,IAChC;AAAA,IACA,aAAa;AAAA,IACb,YAAY;AAAA,EACd;AAAA,EACA,OAAO;AAAA,IACL,cAAc;AAAA,EAChB;AACF;","names":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/Layers/Configs/LocationPointLayerConfig.ts"],"sourcesContent":["import { CircleLayer } from 'mapbox-gl'\n\nexport const LocationPointLayerConfig: (color: string, circleRadius: number, circleOpacity: number) => Partial<CircleLayer> = (\n color,\n circleRadius,\n circleOpacity,\n) => {\n return {\n paint: {\n 'circle-color': color,\n 'circle-opacity': circleOpacity,\n 'circle-radius': circleRadius,\n },\n }\n}\n"],"mappings":"AAEO,
|
|
1
|
+
{"version":3,"sources":["../../../../src/Layers/Configs/LocationPointLayerConfig.ts"],"sourcesContent":["import { CircleLayer } from 'mapbox-gl'\n\nexport const LocationPointLayerConfig: (color: string, circleRadius: number, circleOpacity: number) => Partial<CircleLayer> = (\n color,\n circleRadius,\n circleOpacity,\n) => {\n return {\n paint: {\n 'circle-color': color,\n 'circle-opacity': circleOpacity,\n 'circle-radius': circleRadius,\n },\n }\n}\n"],"mappings":";AAEO,IAAM,2BAAiH,CAC5H,OACA,cACA,kBACG;AACH,SAAO;AAAA,IACL,OAAO;AAAA,MACL,gBAAgB;AAAA,MAChB,kBAAkB;AAAA,MAClB,iBAAiB;AAAA,IACnB;AAAA,EACF;AACF;","names":[]}
|
|
@@ -1,5 +1,63 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
// src/Layers/Configs/HeatMapFillLayerConfig.ts
|
|
2
|
+
var HeatMapFillLayerConfig = (color) => ({
|
|
3
|
+
paint: {
|
|
4
|
+
"fill-color": color,
|
|
5
|
+
"fill-opacity": [
|
|
6
|
+
"let",
|
|
7
|
+
"density",
|
|
8
|
+
["+", ["/", ["number", ["get", "value"]], 4], 0.125],
|
|
9
|
+
["interpolate", ["linear"], ["var", "density"], 0.8, ["var", "density"], 1, 0.85]
|
|
10
|
+
]
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
// src/Layers/Configs/HeatMapLineLayerConfig.ts
|
|
15
|
+
var HeatMapLineLayerConfig = (color) => ({
|
|
16
|
+
layout: {
|
|
17
|
+
// Enable for debugging
|
|
18
|
+
visibility: "none"
|
|
19
|
+
},
|
|
20
|
+
paint: {
|
|
21
|
+
"line-color": color,
|
|
22
|
+
"line-opacity": ["let", "density", 0, ["interpolate", ["linear"], ["var", "density"], 0.8, ["var", "density"], 1, 0.85]],
|
|
23
|
+
"line-width": 0.5
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
// src/Layers/Configs/HeatMapSymbolLayerConfig.ts
|
|
28
|
+
var HeatMapSymbolLayerConfig = (color) => ({
|
|
29
|
+
layout: {
|
|
30
|
+
"text-anchor": "center",
|
|
31
|
+
"text-field": [
|
|
32
|
+
"concat",
|
|
33
|
+
"value: ",
|
|
34
|
+
["to-string", ["+", ["/", ["number", ["get", "value"]], 2], 0.25]],
|
|
35
|
+
"\n",
|
|
36
|
+
"count: ",
|
|
37
|
+
["to-string", ["get", "count"]]
|
|
38
|
+
],
|
|
39
|
+
"text-size": 10,
|
|
40
|
+
visibility: "none"
|
|
41
|
+
},
|
|
42
|
+
paint: {
|
|
43
|
+
"text-color": color
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
// src/Layers/Configs/LocationPointLayerConfig.ts
|
|
48
|
+
var LocationPointLayerConfig = (color, circleRadius, circleOpacity) => {
|
|
49
|
+
return {
|
|
50
|
+
paint: {
|
|
51
|
+
"circle-color": color,
|
|
52
|
+
"circle-opacity": circleOpacity,
|
|
53
|
+
"circle-radius": circleRadius
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
export {
|
|
58
|
+
HeatMapFillLayerConfig,
|
|
59
|
+
HeatMapLineLayerConfig,
|
|
60
|
+
HeatMapSymbolLayerConfig,
|
|
61
|
+
LocationPointLayerConfig
|
|
62
|
+
};
|
|
5
63
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/Layers/Configs/
|
|
1
|
+
{"version":3,"sources":["../../../../src/Layers/Configs/HeatMapFillLayerConfig.ts","../../../../src/Layers/Configs/HeatMapLineLayerConfig.ts","../../../../src/Layers/Configs/HeatMapSymbolLayerConfig.ts","../../../../src/Layers/Configs/LocationPointLayerConfig.ts"],"sourcesContent":["import { FillLayer } from 'mapbox-gl'\n\nexport const HeatMapFillLayerConfig: (color: string) => Partial<FillLayer> = (color) => ({\n paint: {\n 'fill-color': color,\n 'fill-opacity': [\n 'let',\n 'density',\n ['+', ['/', ['number', ['get', 'value']], 4], 0.125],\n ['interpolate', ['linear'], ['var', 'density'], 0.8, ['var', 'density'], 1, 0.85],\n ],\n },\n})\n","import { LineLayer } from 'mapbox-gl'\n\nexport const HeatMapLineLayerConfig: (color: string) => Partial<LineLayer> = (color) => ({\n layout: {\n // Enable for debugging\n visibility: 'none',\n },\n paint: {\n 'line-color': color,\n 'line-opacity': ['let', 'density', 0, ['interpolate', ['linear'], ['var', 'density'], 0.8, ['var', 'density'], 1, 0.85]],\n 'line-width': 0.5,\n },\n})\n","import { SymbolLayer } from 'mapbox-gl'\n\nexport const HeatMapSymbolLayerConfig: (color: string) => Partial<SymbolLayer> = (color) => ({\n layout: {\n 'text-anchor': 'center',\n 'text-field': [\n 'concat',\n 'value: ',\n ['to-string', ['+', ['/', ['number', ['get', 'value']], 2], 0.25]],\n '\\n',\n 'count: ',\n ['to-string', ['get', 'count']],\n ],\n 'text-size': 10,\n visibility: 'none',\n },\n paint: {\n 'text-color': color,\n },\n})\n","import { CircleLayer } from 'mapbox-gl'\n\nexport const LocationPointLayerConfig: (color: string, circleRadius: number, circleOpacity: number) => Partial<CircleLayer> = (\n color,\n circleRadius,\n circleOpacity,\n) => {\n return {\n paint: {\n 'circle-color': color,\n 'circle-opacity': circleOpacity,\n 'circle-radius': circleRadius,\n },\n }\n}\n"],"mappings":";AAEO,IAAM,yBAAgE,CAAC,WAAW;AAAA,EACvF,OAAO;AAAA,IACL,cAAc;AAAA,IACd,gBAAgB;AAAA,MACd;AAAA,MACA;AAAA,MACA,CAAC,KAAK,CAAC,KAAK,CAAC,UAAU,CAAC,OAAO,OAAO,CAAC,GAAG,CAAC,GAAG,KAAK;AAAA,MACnD,CAAC,eAAe,CAAC,QAAQ,GAAG,CAAC,OAAO,SAAS,GAAG,KAAK,CAAC,OAAO,SAAS,GAAG,GAAG,IAAI;AAAA,IAClF;AAAA,EACF;AACF;;;ACVO,IAAM,yBAAgE,CAAC,WAAW;AAAA,EACvF,QAAQ;AAAA;AAAA,IAEN,YAAY;AAAA,EACd;AAAA,EACA,OAAO;AAAA,IACL,cAAc;AAAA,IACd,gBAAgB,CAAC,OAAO,WAAW,GAAG,CAAC,eAAe,CAAC,QAAQ,GAAG,CAAC,OAAO,SAAS,GAAG,KAAK,CAAC,OAAO,SAAS,GAAG,GAAG,IAAI,CAAC;AAAA,IACvH,cAAc;AAAA,EAChB;AACF;;;ACVO,IAAM,2BAAoE,CAAC,WAAW;AAAA,EAC3F,QAAQ;AAAA,IACN,eAAe;AAAA,IACf,cAAc;AAAA,MACZ;AAAA,MACA;AAAA,MACA,CAAC,aAAa,CAAC,KAAK,CAAC,KAAK,CAAC,UAAU,CAAC,OAAO,OAAO,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC;AAAA,MACjE;AAAA,MACA;AAAA,MACA,CAAC,aAAa,CAAC,OAAO,OAAO,CAAC;AAAA,IAChC;AAAA,IACA,aAAa;AAAA,IACb,YAAY;AAAA,EACd;AAAA,EACA,OAAO;AAAA,IACL,cAAc;AAAA,EAChB;AACF;;;ACjBO,IAAM,2BAAiH,CAC5H,OACA,cACA,kBACG;AACH,SAAO;AAAA,IACL,OAAO;AAAA,MACL,gBAAgB;AAAA,MAChB,kBAAkB;AAAA,MAClB,iBAAiB;AAAA,IACnB;AAAA,EACF;AACF;","names":[]}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
// src/Layers/FillLayer.ts
|
|
1
2
|
import { LayerBase } from "@xyo-network/sdk-geo";
|
|
2
|
-
|
|
3
|
+
var FillLayerBuilder = class extends LayerBase {
|
|
3
4
|
FillLayerOptions;
|
|
4
5
|
// ensures this class passes for `AnyLayer` type in MapBox
|
|
5
6
|
type = "fill";
|
|
@@ -15,7 +16,7 @@ class FillLayerBuilder extends LayerBase {
|
|
|
15
16
|
type: this.type
|
|
16
17
|
};
|
|
17
18
|
}
|
|
18
|
-
}
|
|
19
|
+
};
|
|
19
20
|
export {
|
|
20
21
|
FillLayerBuilder
|
|
21
22
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/Layers/FillLayer.ts"],"sourcesContent":["import { LayerBase } from '@xyo-network/sdk-geo'\n// eslint-disable-next-line no-restricted-imports\nimport { FillLayer } from 'mapbox-gl'\n\nexport class FillLayerBuilder extends LayerBase<FillLayer> {\n FillLayerOptions: Partial<FillLayer>\n\n // ensures this class passes for `AnyLayer` type in MapBox\n type: 'fill' = 'fill' as const\n\n constructor(id: string, source: string, FillLayerOptions?: Partial<FillLayer>) {\n super(id, source)\n this.FillLayerOptions = FillLayerOptions || { id: this.id, source: this.source }\n }\n buildLayer(): FillLayer {\n return {\n ...this.FillLayerOptions,\n id: this.id,\n source: this.source,\n type: this.type,\n }\n }\n}\n"],"mappings":"AAAA,SAAS,iBAAiB;AAInB,
|
|
1
|
+
{"version":3,"sources":["../../../src/Layers/FillLayer.ts"],"sourcesContent":["import { LayerBase } from '@xyo-network/sdk-geo'\n// eslint-disable-next-line no-restricted-imports\nimport { FillLayer } from 'mapbox-gl'\n\nexport class FillLayerBuilder extends LayerBase<FillLayer> {\n FillLayerOptions: Partial<FillLayer>\n\n // ensures this class passes for `AnyLayer` type in MapBox\n type: 'fill' = 'fill' as const\n\n constructor(id: string, source: string, FillLayerOptions?: Partial<FillLayer>) {\n super(id, source)\n this.FillLayerOptions = FillLayerOptions || { id: this.id, source: this.source }\n }\n buildLayer(): FillLayer {\n return {\n ...this.FillLayerOptions,\n id: this.id,\n source: this.source,\n type: this.type,\n }\n }\n}\n"],"mappings":";AAAA,SAAS,iBAAiB;AAInB,IAAM,mBAAN,cAA+B,UAAqB;AAAA,EACzD;AAAA;AAAA,EAGA,OAAe;AAAA,EAEf,YAAY,IAAY,QAAgB,kBAAuC;AAC7E,UAAM,IAAI,MAAM;AAChB,SAAK,mBAAmB,oBAAoB,EAAE,IAAI,KAAK,IAAI,QAAQ,KAAK,OAAO;AAAA,EACjF;AAAA,EACA,aAAwB;AACtB,WAAO;AAAA,MACL,GAAG,KAAK;AAAA,MACR,IAAI,KAAK;AAAA,MACT,QAAQ,KAAK;AAAA,MACb,MAAM,KAAK;AAAA,IACb;AAAA,EACF;AACF;","names":[]}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
// src/Layers/LineLayer.ts
|
|
1
2
|
import { LayerBase } from "@xyo-network/sdk-geo";
|
|
2
|
-
|
|
3
|
+
var LineLayerBuilder = class extends LayerBase {
|
|
3
4
|
LineLayerOptions;
|
|
4
5
|
// ensures this class passes for `AnyLayer` type in MapBox
|
|
5
6
|
type = "line";
|
|
@@ -16,7 +17,7 @@ class LineLayerBuilder extends LayerBase {
|
|
|
16
17
|
type: this.type
|
|
17
18
|
};
|
|
18
19
|
}
|
|
19
|
-
}
|
|
20
|
+
};
|
|
20
21
|
export {
|
|
21
22
|
LineLayerBuilder
|
|
22
23
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/Layers/LineLayer.ts"],"sourcesContent":["import { LayerBase } from '@xyo-network/sdk-geo'\n// eslint-disable-next-line no-restricted-imports\nimport { LineLayer } from 'mapbox-gl'\n\nexport class LineLayerBuilder extends LayerBase<LineLayer> {\n LineLayerOptions: Partial<LineLayer>\n\n // ensures this class passes for `AnyLayer` type in MapBox\n type: 'line' = 'line' as const\n\n constructor(id: string, source: string, LineLayerOptions?: Partial<LineLayer>) {\n super(id, source)\n this.LineLayerOptions = LineLayerOptions || { id: this.id, source: this.source }\n }\n buildLayer(): LineLayer {\n return {\n ...this.LineLayerOptions,\n id: this.id,\n layout: {},\n source: this.source,\n type: this.type,\n }\n }\n}\n"],"mappings":"AAAA,SAAS,iBAAiB;AAInB,
|
|
1
|
+
{"version":3,"sources":["../../../src/Layers/LineLayer.ts"],"sourcesContent":["import { LayerBase } from '@xyo-network/sdk-geo'\n// eslint-disable-next-line no-restricted-imports\nimport { LineLayer } from 'mapbox-gl'\n\nexport class LineLayerBuilder extends LayerBase<LineLayer> {\n LineLayerOptions: Partial<LineLayer>\n\n // ensures this class passes for `AnyLayer` type in MapBox\n type: 'line' = 'line' as const\n\n constructor(id: string, source: string, LineLayerOptions?: Partial<LineLayer>) {\n super(id, source)\n this.LineLayerOptions = LineLayerOptions || { id: this.id, source: this.source }\n }\n buildLayer(): LineLayer {\n return {\n ...this.LineLayerOptions,\n id: this.id,\n layout: {},\n source: this.source,\n type: this.type,\n }\n }\n}\n"],"mappings":";AAAA,SAAS,iBAAiB;AAInB,IAAM,mBAAN,cAA+B,UAAqB;AAAA,EACzD;AAAA;AAAA,EAGA,OAAe;AAAA,EAEf,YAAY,IAAY,QAAgB,kBAAuC;AAC7E,UAAM,IAAI,MAAM;AAChB,SAAK,mBAAmB,oBAAoB,EAAE,IAAI,KAAK,IAAI,QAAQ,KAAK,OAAO;AAAA,EACjF;AAAA,EACA,aAAwB;AACtB,WAAO;AAAA,MACL,GAAG,KAAK;AAAA,MACR,IAAI,KAAK;AAAA,MACT,QAAQ,CAAC;AAAA,MACT,QAAQ,KAAK;AAAA,MACb,MAAM,KAAK;AAAA,IACb;AAAA,EACF;AACF;","names":[]}
|