venue-js 1.4.0-next.21 → 1.4.0-next.22
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/data/index.js +26 -19
- package/dist/data/index.js.map +1 -1
- package/dist/data/index.mjs +26 -19
- package/dist/data/index.mjs.map +1 -1
- package/dist/index.js +181 -174
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +26 -19
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -956,7 +956,7 @@ var createElevatorNodeMap = (elevatorLikeRelationships, unitOpenings, options) =
|
|
|
956
956
|
const level = levels.find((level2) => level2.id === destination.properties.level_id);
|
|
957
957
|
return { opening, level };
|
|
958
958
|
});
|
|
959
|
-
const intermediaryOpeningAndLevels = intermediary.map((unitTypeAndId) => {
|
|
959
|
+
const intermediaryOpeningAndLevels = (intermediary || []).map((unitTypeAndId) => {
|
|
960
960
|
const openings = unitOpenings[unitTypeAndId.id];
|
|
961
961
|
const unit = units.find((unit2) => unit2.id === unitTypeAndId.id);
|
|
962
962
|
const level = levels.find((level2) => level2.id === unit.properties.level_id);
|
|
@@ -1000,11 +1000,13 @@ var createEscalatorNodeMap = (relationships, options) => {
|
|
|
1000
1000
|
const {
|
|
1001
1001
|
properties: { direction, origin, destination }
|
|
1002
1002
|
} = relationship;
|
|
1003
|
-
(
|
|
1004
|
-
|
|
1005
|
-
(
|
|
1003
|
+
if (origin && destination) {
|
|
1004
|
+
(0, import_set.default)(nodeMap, `${origin.id}.${destination.id}`, distanceOptions.baseDistance);
|
|
1005
|
+
if (direction === "undirected") {
|
|
1006
|
+
(0, import_set.default)(nodeMap, `${destination.id}.${origin.id}`, distanceOptions.baseDistance);
|
|
1007
|
+
}
|
|
1008
|
+
counter++;
|
|
1006
1009
|
}
|
|
1007
|
-
counter++;
|
|
1008
1010
|
}
|
|
1009
1011
|
const t1 = performance.now();
|
|
1010
1012
|
trace("nav", ` \u2502 \u251C\u2500 add ${counter} escalator relationships`, t1 - t0);
|
|
@@ -1129,17 +1131,19 @@ var createPOINodeMap = (features, getFeatureUnit, unitOpenings) => {
|
|
|
1129
1131
|
features.forEach((feat) => {
|
|
1130
1132
|
try {
|
|
1131
1133
|
const locatedOnUnitId = getFeatureUnit(feat);
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1134
|
+
if (locatedOnUnitId) {
|
|
1135
|
+
const openings = unitOpenings[locatedOnUnitId] ?? [];
|
|
1136
|
+
const center8 = (0, import_center4.center)(feat);
|
|
1137
|
+
for (const opening of openings) {
|
|
1138
|
+
try {
|
|
1139
|
+
const openingCenter = (0, import_center4.center)(opening);
|
|
1140
|
+
const dis = (0, import_distance2.distance)(center8, openingCenter, { units: "meters" }) + BASE_POI_BASEDISTANCE;
|
|
1141
|
+
import_lodash9.default.set(nodeMap, `${opening.id}.${feat.id}`, dis);
|
|
1142
|
+
import_lodash9.default.set(nodeMap, `${feat.id}.${opening.id}`, dis);
|
|
1143
|
+
counter++;
|
|
1144
|
+
} catch (err) {
|
|
1145
|
+
console.log(err, opening);
|
|
1146
|
+
}
|
|
1143
1147
|
}
|
|
1144
1148
|
}
|
|
1145
1149
|
} catch (err) {
|
|
@@ -1241,7 +1245,7 @@ var prepareGraph = (options) => {
|
|
|
1241
1245
|
unitOpenings,
|
|
1242
1246
|
options
|
|
1243
1247
|
);
|
|
1244
|
-
const amenityNodeMap = createPOINodeMap(amenities, (amenity) => amenity.properties.unit_ids[0], unitOpenings);
|
|
1248
|
+
const amenityNodeMap = createPOINodeMap(amenities, (amenity) => amenity.properties.unit_ids?.[0] || null, unitOpenings);
|
|
1245
1249
|
const anchorsNodeMap = createPOINodeMap(anchors, (anchor) => anchor.properties.unit_id, unitOpenings);
|
|
1246
1250
|
const walkwayUnits = units.filter((unit) => unit.properties.category === "walkway");
|
|
1247
1251
|
const kioskNodeMap = createPOINodeMap(kiosks, (kiosk) => findContainingUnit(kiosk, walkwayUnits)?.id, unitOpenings);
|
|
@@ -2298,7 +2302,9 @@ var createLandmarkUtils = (options) => {
|
|
|
2298
2302
|
const locationType = occupant.properties.unit_id ? "unit" : "kiosk";
|
|
2299
2303
|
const locationId = locationType === "unit" ? occupant.properties.unit_id : occupant.properties.kiosk_id;
|
|
2300
2304
|
const location = locationType === "unit" ? findByIdSync(locationId) : findByIdSync(locationId);
|
|
2301
|
-
|
|
2305
|
+
if (!location) return null;
|
|
2306
|
+
const level = location.properties.level_id ? findByIdSync(location.properties.level_id) : null;
|
|
2307
|
+
if (!level) return null;
|
|
2302
2308
|
return {
|
|
2303
2309
|
name: occupant.properties.name,
|
|
2304
2310
|
point: (0, import_center8.center)(location.geometry).geometry.coordinates,
|
|
@@ -2308,7 +2314,7 @@ var createLandmarkUtils = (options) => {
|
|
|
2308
2314
|
};
|
|
2309
2315
|
};
|
|
2310
2316
|
const landmarks = [
|
|
2311
|
-
...occupants.map(occupantToLandmark)
|
|
2317
|
+
...compact(occupants.map(occupantToLandmark))
|
|
2312
2318
|
];
|
|
2313
2319
|
const findNearbyLandmarks = (point2, levelId) => {
|
|
2314
2320
|
if (point2 === null || levelId === null) return [];
|
|
@@ -2398,6 +2404,7 @@ var getNavigateClient = (options) => {
|
|
|
2398
2404
|
trace("nav", "\u2713 findRoute", 0);
|
|
2399
2405
|
const t02 = performance.now();
|
|
2400
2406
|
const path = graph.path(routeOriginParam, routeDestinationParam);
|
|
2407
|
+
if (path === null) return { steps: [], distance: 0, duration: 0 };
|
|
2401
2408
|
const t12 = performance.now();
|
|
2402
2409
|
trace("nav", " \u251C\u2500 path (dijkstra)", t12 - t02);
|
|
2403
2410
|
const waypoints = waypointUtils.toWaypoints(path);
|
|
@@ -2591,7 +2598,7 @@ var getDataClient = (options) => {
|
|
|
2591
2598
|
var import_maptalks_gl = require("maptalks-gl");
|
|
2592
2599
|
var import_transcoders = require("@maptalks/transcoders.draco");
|
|
2593
2600
|
var import_tween = __toESM(require("@tweenjs/tween.js"));
|
|
2594
|
-
var
|
|
2601
|
+
var import_lodash22 = __toESM(require("lodash"));
|
|
2595
2602
|
var import_distance6 = __toESM(require("@turf/distance"));
|
|
2596
2603
|
var import_center13 = __toESM(require("@turf/center"));
|
|
2597
2604
|
var import_three6 = require("three");
|
|
@@ -2672,7 +2679,7 @@ var VENUE_EVENTS = {
|
|
|
2672
2679
|
};
|
|
2673
2680
|
|
|
2674
2681
|
// src/IndoorMap/utils/createElements.js
|
|
2675
|
-
var
|
|
2682
|
+
var import_lodash18 = __toESM(require("lodash"));
|
|
2676
2683
|
var import_maptalks4 = require("maptalks");
|
|
2677
2684
|
var import_center11 = __toESM(require("@turf/center"));
|
|
2678
2685
|
var import_buffer = __toESM(require("@turf/buffer"));
|
|
@@ -2682,7 +2689,7 @@ var import_three4 = require("three");
|
|
|
2682
2689
|
var maptalks = __toESM(require("maptalks"));
|
|
2683
2690
|
var import_maptalks = require("maptalks.three");
|
|
2684
2691
|
var import_three = require("three");
|
|
2685
|
-
var
|
|
2692
|
+
var import_lodash15 = __toESM(require("lodash"));
|
|
2686
2693
|
var OPTIONS = {
|
|
2687
2694
|
altitude: 25,
|
|
2688
2695
|
scale: 15e-5,
|
|
@@ -2715,7 +2722,7 @@ var Billboard = class extends import_maptalks.BaseObject {
|
|
|
2715
2722
|
} = options;
|
|
2716
2723
|
this.properties = { ...properties };
|
|
2717
2724
|
this._createGroup();
|
|
2718
|
-
const divider =
|
|
2725
|
+
const divider = import_lodash15.default.clamp(window.innerWidth / 375 / 1.75, 1, 1.7);
|
|
2719
2726
|
if (showLeg) {
|
|
2720
2727
|
const lineMaterial = new import_three.LineBasicMaterial({
|
|
2721
2728
|
color: legColor,
|
|
@@ -2750,9 +2757,9 @@ var Billboard = class extends import_maptalks.BaseObject {
|
|
|
2750
2757
|
});
|
|
2751
2758
|
const z = layer.altitudeToVector3(altitude, altitude).x;
|
|
2752
2759
|
const position = layer.coordinateToVector3(coordinate, z);
|
|
2753
|
-
|
|
2754
|
-
|
|
2755
|
-
|
|
2760
|
+
import_lodash15.default.set(this.properties, "default.position", position);
|
|
2761
|
+
import_lodash15.default.set(this.properties, "default.altitude", altitude);
|
|
2762
|
+
import_lodash15.default.set(this.properties, "default.scale", scale3);
|
|
2756
2763
|
this.getObject3d().position.copy(position);
|
|
2757
2764
|
}
|
|
2758
2765
|
setLineHeight(altitude) {
|
|
@@ -2768,7 +2775,7 @@ var Billboard = class extends import_maptalks.BaseObject {
|
|
|
2768
2775
|
// src/IndoorMap/object3d/SpriteMarker.ts
|
|
2769
2776
|
var import_maptalks2 = require("maptalks.three");
|
|
2770
2777
|
var import_three2 = require("three");
|
|
2771
|
-
var
|
|
2778
|
+
var import_lodash16 = __toESM(require("lodash"));
|
|
2772
2779
|
var DEFAULT_SCALE = 0.05;
|
|
2773
2780
|
var DEFAULT_ALTITUDE = 0;
|
|
2774
2781
|
var DEFAULT_ALPHATEST = 0.3;
|
|
@@ -2799,7 +2806,7 @@ var SpriteMarker = class extends import_maptalks2.BaseObject {
|
|
|
2799
2806
|
this.properties = { ...properties };
|
|
2800
2807
|
const modifiedAltitude = altitude + 2;
|
|
2801
2808
|
this.#default = { options: { scale: scale3, altitude: modifiedAltitude }, material };
|
|
2802
|
-
this.#highlight =
|
|
2809
|
+
this.#highlight = import_lodash16.default.merge({}, DEFAULT_OPTIONS.highlight, highlight);
|
|
2803
2810
|
if (material && material instanceof import_three2.SpriteMaterial)
|
|
2804
2811
|
material.alphaTest = alphaTest;
|
|
2805
2812
|
const sprite = new import_three2.Sprite(material);
|
|
@@ -2808,7 +2815,7 @@ var SpriteMarker = class extends import_maptalks2.BaseObject {
|
|
|
2808
2815
|
obj3d.add(sprite);
|
|
2809
2816
|
const z = layer.altitudeToVector3(modifiedAltitude, modifiedAltitude).x;
|
|
2810
2817
|
const position = layer.coordinateToVector3(coordinate, z);
|
|
2811
|
-
|
|
2818
|
+
import_lodash16.default.set(this.properties, "default.position", position);
|
|
2812
2819
|
this.getObject3d().position.copy(position);
|
|
2813
2820
|
}
|
|
2814
2821
|
// Different objects need to implement their own methods
|
|
@@ -2950,14 +2957,14 @@ var NavigationPath = class extends import_maptalks3.BaseObject {
|
|
|
2950
2957
|
|
|
2951
2958
|
// src/IndoorMap/utils/geometry.ts
|
|
2952
2959
|
var import_center10 = __toESM(require("@turf/center"));
|
|
2953
|
-
var
|
|
2960
|
+
var import_lodash17 = __toESM(require("lodash"));
|
|
2954
2961
|
var import_line_offset = __toESM(require("@turf/line-offset"));
|
|
2955
2962
|
var getCenterFromGeometry = (geometry) => {
|
|
2956
2963
|
try {
|
|
2957
2964
|
const { type = null, coordinates = null } = geometry;
|
|
2958
2965
|
if (!type || !coordinates) return null;
|
|
2959
2966
|
const centerPoint = (0, import_center10.default)(geometry);
|
|
2960
|
-
return
|
|
2967
|
+
return import_lodash17.default.get(centerPoint, "geometry.coordinates");
|
|
2961
2968
|
} catch (error) {
|
|
2962
2969
|
return null;
|
|
2963
2970
|
}
|
|
@@ -3108,7 +3115,7 @@ var createWaterFixture = (feature2, style, options = {}) => {
|
|
|
3108
3115
|
const { geometry, properties } = feature2;
|
|
3109
3116
|
const { allowOverride, inheritFillColorToLine, zIndex } = options;
|
|
3110
3117
|
const symbolStyle = { ...style };
|
|
3111
|
-
if (allowOverride)
|
|
3118
|
+
if (allowOverride) import_lodash18.default.merge(symbolStyle, properties.style);
|
|
3112
3119
|
if (inheritFillColorToLine) symbolStyle.lineColor = symbolStyle.polygonFill;
|
|
3113
3120
|
return new GeometryType[geometry.type](geometry.coordinates, {
|
|
3114
3121
|
properties: {
|
|
@@ -3124,7 +3131,7 @@ var createVegetationFixture = (feature2, style, options = {}) => {
|
|
|
3124
3131
|
const { geometry, properties } = feature2;
|
|
3125
3132
|
const { allowOverride, inheritFillColorToLine, zIndex } = options;
|
|
3126
3133
|
const symbolStyle = { ...style };
|
|
3127
|
-
if (allowOverride)
|
|
3134
|
+
if (allowOverride) import_lodash18.default.merge(symbolStyle, properties.style);
|
|
3128
3135
|
if (inheritFillColorToLine) symbolStyle.lineColor = symbolStyle.polygonFill;
|
|
3129
3136
|
return new GeometryType[geometry.type](geometry.coordinates, {
|
|
3130
3137
|
properties: {
|
|
@@ -3141,8 +3148,8 @@ var createObstructionalFixture = (feature2, style = {}, options = {}) => {
|
|
|
3141
3148
|
const { model3d } = properties;
|
|
3142
3149
|
const { allowOverride, inheritFillColorToLine, zIndex } = options;
|
|
3143
3150
|
const symbolStyle = { ...style };
|
|
3144
|
-
if (!
|
|
3145
|
-
if (allowOverride)
|
|
3151
|
+
if (!import_lodash18.default.isEmpty(model3d)) return;
|
|
3152
|
+
if (allowOverride) import_lodash18.default.merge(symbolStyle, properties.style);
|
|
3146
3153
|
if (inheritFillColorToLine) symbolStyle.lineColor = symbolStyle.polygonFill;
|
|
3147
3154
|
if (geometry.type === "LineString") {
|
|
3148
3155
|
const polygon2 = createPolygonFromLineString(geometry);
|
|
@@ -3212,7 +3219,7 @@ var createPrincipalOpening = (feature2, style, options = {}) => {
|
|
|
3212
3219
|
const { geometry, properties } = feature2;
|
|
3213
3220
|
const { allowOverride, zIndex } = options;
|
|
3214
3221
|
const symbolStyle = { ...style };
|
|
3215
|
-
if (allowOverride)
|
|
3222
|
+
if (allowOverride) import_lodash18.default.merge(symbolStyle, properties.style);
|
|
3216
3223
|
try {
|
|
3217
3224
|
return new import_maptalks4.LineString(geometry.coordinates, {
|
|
3218
3225
|
properties: {
|
|
@@ -3229,7 +3236,7 @@ var createEmergencyExitOpening = (feature2, style, options = {}) => {
|
|
|
3229
3236
|
const { geometry, properties } = feature2;
|
|
3230
3237
|
const { allowOverride, zIndex } = options;
|
|
3231
3238
|
const symbolStyle = { ...style };
|
|
3232
|
-
if (allowOverride)
|
|
3239
|
+
if (allowOverride) import_lodash18.default.merge(symbolStyle, properties.style);
|
|
3233
3240
|
try {
|
|
3234
3241
|
return new import_maptalks4.LineString(geometry.coordinates, {
|
|
3235
3242
|
properties: {
|
|
@@ -3246,7 +3253,7 @@ var createPedestrianOpening = (feature2, style, options = {}) => {
|
|
|
3246
3253
|
const { geometry, properties, id } = feature2;
|
|
3247
3254
|
const { allowOverride, zIndex } = options;
|
|
3248
3255
|
const symbolStyle = { ...style };
|
|
3249
|
-
if (allowOverride)
|
|
3256
|
+
if (allowOverride) import_lodash18.default.merge(symbolStyle, properties.style);
|
|
3250
3257
|
try {
|
|
3251
3258
|
return new import_maptalks4.LineString(geometry.coordinates, {
|
|
3252
3259
|
properties: {
|
|
@@ -3284,9 +3291,9 @@ var create3DMarker = (coordinates, options, material, threeLayer, markerProperti
|
|
|
3284
3291
|
};
|
|
3285
3292
|
var getExtrudeConfigByFeature = (baseExtrudeConfig, feature2 = {}) => {
|
|
3286
3293
|
const { feature_type: featureType } = feature2;
|
|
3287
|
-
const featureExtrudeConfig =
|
|
3288
|
-
const featureCategory =
|
|
3289
|
-
const baseFeatureExtrudeConfig =
|
|
3294
|
+
const featureExtrudeConfig = import_lodash18.default.get(feature2, "properties.extrude");
|
|
3295
|
+
const featureCategory = import_lodash18.default.get(feature2, "properties.category");
|
|
3296
|
+
const baseFeatureExtrudeConfig = import_lodash18.default.get(
|
|
3290
3297
|
baseExtrudeConfig,
|
|
3291
3298
|
`${featureType}.${featureCategory || featureType}`
|
|
3292
3299
|
);
|
|
@@ -3344,50 +3351,50 @@ var createStyledUIMarkerElement = ({
|
|
|
3344
3351
|
var styledFeatureGenerator = (mapTheme) => {
|
|
3345
3352
|
const getElementSymbol = (key) => {
|
|
3346
3353
|
const [featureType] = key.split(".");
|
|
3347
|
-
const featureTypeTheme =
|
|
3354
|
+
const featureTypeTheme = import_lodash18.default.get(mapTheme, `${featureType}.geometry.symbol`);
|
|
3348
3355
|
if (featureType === key) return featureTypeTheme;
|
|
3349
|
-
const categoryTheme =
|
|
3350
|
-
return
|
|
3356
|
+
const categoryTheme = import_lodash18.default.get(mapTheme, `${key}.geometry.symbol`);
|
|
3357
|
+
return import_lodash18.default.merge({}, featureTypeTheme, categoryTheme);
|
|
3351
3358
|
};
|
|
3352
3359
|
const getLabelSymbol = (key) => {
|
|
3353
3360
|
const [featureType] = key.split(".");
|
|
3354
|
-
const featureTypeTheme =
|
|
3355
|
-
const categoryTheme =
|
|
3356
|
-
const mergedSymbol =
|
|
3357
|
-
let symbols =
|
|
3361
|
+
const featureTypeTheme = import_lodash18.default.get(mapTheme, `${featureType}.label`);
|
|
3362
|
+
const categoryTheme = import_lodash18.default.get(mapTheme, `${key}.label`);
|
|
3363
|
+
const mergedSymbol = import_lodash18.default.merge({}, featureTypeTheme, categoryTheme);
|
|
3364
|
+
let symbols = import_lodash18.default.values(import_lodash18.default.map(mergedSymbol, "symbol"));
|
|
3358
3365
|
const markerIndexToMove = symbols.findIndex(
|
|
3359
3366
|
({ elementType }) => elementType === "label.marker"
|
|
3360
3367
|
);
|
|
3361
3368
|
if (markerIndexToMove >= 0) {
|
|
3362
|
-
const markerSymbolToMove =
|
|
3369
|
+
const markerSymbolToMove = import_lodash18.default.pullAt(symbols, markerIndexToMove)[0];
|
|
3363
3370
|
symbols.push(markerSymbolToMove);
|
|
3364
3371
|
}
|
|
3365
3372
|
return symbols;
|
|
3366
3373
|
};
|
|
3367
3374
|
const getUIMarkerSymbol = (key) => {
|
|
3368
3375
|
const [featureType] = key.split(".");
|
|
3369
|
-
const featureTypeTheme =
|
|
3370
|
-
const categoryTheme =
|
|
3371
|
-
const mergedSymbol =
|
|
3372
|
-
const symbol =
|
|
3376
|
+
const featureTypeTheme = import_lodash18.default.get(mapTheme, `${featureType}.ui.marker`);
|
|
3377
|
+
const categoryTheme = import_lodash18.default.get(mapTheme, `${key}.ui.marker`);
|
|
3378
|
+
const mergedSymbol = import_lodash18.default.merge({}, featureTypeTheme, categoryTheme);
|
|
3379
|
+
const symbol = import_lodash18.default.get(mergedSymbol, "symbol");
|
|
3373
3380
|
return symbol;
|
|
3374
3381
|
};
|
|
3375
3382
|
const getUIMarkerOptions = (key) => {
|
|
3376
3383
|
const [featureType] = key.split(".");
|
|
3377
|
-
const featureTypeTheme =
|
|
3378
|
-
const categoryTheme =
|
|
3379
|
-
const mergedSymbol =
|
|
3380
|
-
const options =
|
|
3384
|
+
const featureTypeTheme = import_lodash18.default.get(mapTheme, `${featureType}.ui.marker`);
|
|
3385
|
+
const categoryTheme = import_lodash18.default.get(mapTheme, `${key}.ui.marker`);
|
|
3386
|
+
const mergedSymbol = import_lodash18.default.merge({}, featureTypeTheme, categoryTheme);
|
|
3387
|
+
const options = import_lodash18.default.get(mergedSymbol, "options");
|
|
3381
3388
|
return options;
|
|
3382
3389
|
};
|
|
3383
3390
|
const getLabelOptions = (key) => {
|
|
3384
3391
|
const [featureType] = key.split(".");
|
|
3385
|
-
const featureTypeSymbol =
|
|
3386
|
-
const categorySymbol =
|
|
3387
|
-
const mergedSymbol =
|
|
3388
|
-
return
|
|
3392
|
+
const featureTypeSymbol = import_lodash18.default.get(mapTheme, `${featureType}.label`);
|
|
3393
|
+
const categorySymbol = import_lodash18.default.get(mapTheme, `${key}.label`);
|
|
3394
|
+
const mergedSymbol = import_lodash18.default.merge({}, featureTypeSymbol, categorySymbol);
|
|
3395
|
+
return import_lodash18.default.reduce(
|
|
3389
3396
|
mergedSymbol,
|
|
3390
|
-
(acc, symbol) => ({ ...acc, ...
|
|
3397
|
+
(acc, symbol) => ({ ...acc, ...import_lodash18.default.get(symbol, "options", {}) }),
|
|
3391
3398
|
{}
|
|
3392
3399
|
);
|
|
3393
3400
|
};
|
|
@@ -3402,13 +3409,13 @@ var styledFeatureGenerator = (mapTheme) => {
|
|
|
3402
3409
|
};
|
|
3403
3410
|
const generateSpriteHighlightMarkerOption = () => {
|
|
3404
3411
|
return SPRITE_HIGHLIGHT_MARKER_FEATURE.reduce((acc, featCate) => {
|
|
3405
|
-
const categoryKey =
|
|
3412
|
+
const categoryKey = import_lodash18.default.last(featCate.split("-"));
|
|
3406
3413
|
const defaultLabelSymbol = getLabelSymbol(categoryKey);
|
|
3407
3414
|
const highlightLabelSymbol = getLabelSymbol(featCate);
|
|
3408
3415
|
const [defaultBase, defaultIcon] = defaultLabelSymbol;
|
|
3409
3416
|
const [highlightBase, highlightIcon] = highlightLabelSymbol;
|
|
3410
|
-
const base =
|
|
3411
|
-
const icon =
|
|
3417
|
+
const base = import_lodash18.default.merge({}, defaultBase, highlightBase);
|
|
3418
|
+
const icon = import_lodash18.default.merge({}, defaultIcon, highlightIcon);
|
|
3412
3419
|
const material = createSpriteMaterialByLabelSymbol([base, icon]);
|
|
3413
3420
|
const options = getLabelOptions(featCate);
|
|
3414
3421
|
return { ...acc, [featCate]: { material, options } };
|
|
@@ -3418,22 +3425,22 @@ var styledFeatureGenerator = (mapTheme) => {
|
|
|
3418
3425
|
const spriteHighlightMarkerOptionObj = generateSpriteHighlightMarkerOption();
|
|
3419
3426
|
const getElementOptions = (key) => {
|
|
3420
3427
|
const [featureType] = key.split(".");
|
|
3421
|
-
const featureTypeOptions =
|
|
3428
|
+
const featureTypeOptions = import_lodash18.default.get(
|
|
3422
3429
|
mapTheme,
|
|
3423
3430
|
`${featureType}.geometry.options`
|
|
3424
3431
|
);
|
|
3425
|
-
const categoryOptions =
|
|
3426
|
-
return
|
|
3432
|
+
const categoryOptions = import_lodash18.default.get(mapTheme, `${key}.geometry.options`);
|
|
3433
|
+
return import_lodash18.default.merge({}, featureTypeOptions, categoryOptions);
|
|
3427
3434
|
};
|
|
3428
3435
|
const createOccupantMarker = (feature2, locatedFeature, mapConfig) => {
|
|
3429
3436
|
const { textMarkerType, featureExtrudeConfig } = getFeatureMarkerConfig(
|
|
3430
3437
|
feature2,
|
|
3431
3438
|
mapConfig
|
|
3432
3439
|
);
|
|
3433
|
-
const markerHeight =
|
|
3440
|
+
const markerHeight = import_lodash18.default.get(featureExtrudeConfig, "height", 0);
|
|
3434
3441
|
const { properties, id, feature_type } = feature2;
|
|
3435
3442
|
if (!properties.anchor) return;
|
|
3436
|
-
const mainLocationId =
|
|
3443
|
+
const mainLocationId = import_lodash18.default.get(properties, "unit.id") || import_lodash18.default.get(properties, "kiosk.id");
|
|
3437
3444
|
const isMainLocationFeature = mainLocationId === locatedFeature?.id;
|
|
3438
3445
|
const { geometry: mainLocationGeometry } = properties?.anchor;
|
|
3439
3446
|
const geometry = isMainLocationFeature ? mainLocationGeometry : (0, import_center11.default)(locatedFeature)?.geometry;
|
|
@@ -3443,7 +3450,7 @@ var styledFeatureGenerator = (mapTheme) => {
|
|
|
3443
3450
|
category: properties.category,
|
|
3444
3451
|
altitude: getAltitude(properties)
|
|
3445
3452
|
};
|
|
3446
|
-
const occupantName =
|
|
3453
|
+
const occupantName = import_lodash18.default.isEmpty(properties.short_name) ? properties.name : properties.short_name;
|
|
3447
3454
|
if (locatedFeature) {
|
|
3448
3455
|
const { feature_type: feature_type2, properties: properties2 } = locatedFeature;
|
|
3449
3456
|
const { category } = properties2;
|
|
@@ -3457,21 +3464,21 @@ var styledFeatureGenerator = (mapTheme) => {
|
|
|
3457
3464
|
}
|
|
3458
3465
|
return requestedType;
|
|
3459
3466
|
};
|
|
3460
|
-
const logoUrl =
|
|
3461
|
-
const requestedRenderType =
|
|
3467
|
+
const logoUrl = import_lodash18.default.get(properties, "logo.url");
|
|
3468
|
+
const requestedRenderType = import_lodash18.default.get(properties, "render_type", "Name");
|
|
3462
3469
|
const renderType = getValidatedRenderType(requestedRenderType, logoUrl);
|
|
3463
3470
|
if (renderType === "Label") return null;
|
|
3464
3471
|
const renderPriority = properties.render_priority || 3;
|
|
3465
|
-
const labelSymbol = getLabelSymbol(`occupant-${
|
|
3466
|
-
const markerSymbol =
|
|
3467
|
-
const coordinates =
|
|
3472
|
+
const labelSymbol = getLabelSymbol(`occupant-${import_lodash18.default.toLower(renderType)}`);
|
|
3473
|
+
const markerSymbol = import_lodash18.default.last(labelSymbol);
|
|
3474
|
+
const coordinates = import_lodash18.default.get(geometry, "coordinates");
|
|
3468
3475
|
const priorityLabelSymbol = getLabelSymbol(
|
|
3469
|
-
`occupant-${
|
|
3476
|
+
`occupant-${import_lodash18.default.toLower(renderType)}-${renderPriority}`
|
|
3470
3477
|
);
|
|
3471
|
-
const priorityMarkerSymbol =
|
|
3478
|
+
const priorityMarkerSymbol = import_lodash18.default.last(priorityLabelSymbol) || {};
|
|
3472
3479
|
switch (renderType) {
|
|
3473
3480
|
case "Logo":
|
|
3474
|
-
|
|
3481
|
+
import_lodash18.default.set(priorityMarkerSymbol, "markerFile", logoUrl);
|
|
3475
3482
|
return new import_maptalks4.Marker(coordinates, {
|
|
3476
3483
|
properties: {
|
|
3477
3484
|
altitude: getAltitude(properties) + markerHeight,
|
|
@@ -3532,13 +3539,13 @@ var styledFeatureGenerator = (mapTheme) => {
|
|
|
3532
3539
|
});
|
|
3533
3540
|
}
|
|
3534
3541
|
const uiMarkerSymbol = getUIMarkerSymbol(
|
|
3535
|
-
`occupant-${
|
|
3542
|
+
`occupant-${import_lodash18.default.toLower(renderType)}`
|
|
3536
3543
|
);
|
|
3537
3544
|
const uiMarkerPrioritySymbol = getUIMarkerSymbol(
|
|
3538
|
-
`occupant-${
|
|
3545
|
+
`occupant-${import_lodash18.default.toLower(renderType)}-${renderPriority}`
|
|
3539
3546
|
);
|
|
3540
3547
|
const uiMarkerPriorityOptions = getUIMarkerOptions(
|
|
3541
|
-
`occupant-${
|
|
3548
|
+
`occupant-${import_lodash18.default.toLower(renderType)}-${renderPriority}`
|
|
3542
3549
|
);
|
|
3543
3550
|
const style = { ...uiMarkerSymbol, ...uiMarkerPrioritySymbol };
|
|
3544
3551
|
return new import_maptalks4.ui.UIMarker(coordinates, {
|
|
@@ -3560,7 +3567,7 @@ var styledFeatureGenerator = (mapTheme) => {
|
|
|
3560
3567
|
const { category, ordinal, style = {} } = properties;
|
|
3561
3568
|
const elementStyle = getElementSymbol(`${feature_type}.${category}`);
|
|
3562
3569
|
const { allowOverride } = getElementOptions(`${feature_type}.${category}`);
|
|
3563
|
-
if (allowOverride)
|
|
3570
|
+
if (allowOverride) import_lodash18.default.merge(elementStyle, style);
|
|
3564
3571
|
const { polygonFill: color } = elementStyle;
|
|
3565
3572
|
const featureProperty = {
|
|
3566
3573
|
id,
|
|
@@ -3649,9 +3656,9 @@ var styledFeatureGenerator = (mapTheme) => {
|
|
|
3649
3656
|
feature2,
|
|
3650
3657
|
mapConfig
|
|
3651
3658
|
);
|
|
3652
|
-
const markerHeight =
|
|
3659
|
+
const markerHeight = import_lodash18.default.get(featureExtrudeConfig, "height");
|
|
3653
3660
|
const { id, properties } = feature2;
|
|
3654
|
-
const geometry =
|
|
3661
|
+
const geometry = import_lodash18.default.get(feature2, "geometry") || import_lodash18.default.get(feature2, "properties.anchor.geometry");
|
|
3655
3662
|
const coordinates = getCenterFromGeometry(geometry);
|
|
3656
3663
|
const symbol = getElementSymbol("pin-marker");
|
|
3657
3664
|
try {
|
|
@@ -3671,10 +3678,10 @@ var styledFeatureGenerator = (mapTheme) => {
|
|
|
3671
3678
|
feature2,
|
|
3672
3679
|
mapConfig
|
|
3673
3680
|
);
|
|
3674
|
-
const markerHeight =
|
|
3681
|
+
const markerHeight = import_lodash18.default.get(featureExtrudeConfig, "height", 0);
|
|
3675
3682
|
const { properties, id } = feature2;
|
|
3676
3683
|
const { geometry } = properties.anchor;
|
|
3677
|
-
const logoUrl =
|
|
3684
|
+
const logoUrl = import_lodash18.default.get(properties, "logo.url");
|
|
3678
3685
|
const coordinates = getCenterFromGeometry(geometry);
|
|
3679
3686
|
const [markerBase, markerLabel] = getLabelSymbol(
|
|
3680
3687
|
"highlighted-logo-marker"
|
|
@@ -3744,7 +3751,7 @@ var styledFeatureGenerator = (mapTheme) => {
|
|
|
3744
3751
|
feature2,
|
|
3745
3752
|
mapConfig
|
|
3746
3753
|
);
|
|
3747
|
-
const markerHeight =
|
|
3754
|
+
const markerHeight = import_lodash18.default.get(featureExtrudeConfig, "height");
|
|
3748
3755
|
const { id, feature_type, properties } = feature2;
|
|
3749
3756
|
if (!properties.anchor) return;
|
|
3750
3757
|
const markerProperties = {
|
|
@@ -3754,8 +3761,8 @@ var styledFeatureGenerator = (mapTheme) => {
|
|
|
3754
3761
|
altitude: getAltitude(properties) + markerHeight
|
|
3755
3762
|
};
|
|
3756
3763
|
const { geometry } = properties?.anchor;
|
|
3757
|
-
const coordinates =
|
|
3758
|
-
const logoUrl =
|
|
3764
|
+
const coordinates = import_lodash18.default.get(geometry, "coordinates");
|
|
3765
|
+
const logoUrl = import_lodash18.default.get(properties, "logo.url");
|
|
3759
3766
|
if (markerSymbol) {
|
|
3760
3767
|
return new import_maptalks4.Marker(coordinates, {
|
|
3761
3768
|
properties: markerProperties,
|
|
@@ -3770,8 +3777,8 @@ var styledFeatureGenerator = (mapTheme) => {
|
|
|
3770
3777
|
});
|
|
3771
3778
|
}
|
|
3772
3779
|
const labelSymbol = getLabelSymbol("highlight-occupant-logo");
|
|
3773
|
-
const priorityMarkerSymbol =
|
|
3774
|
-
|
|
3780
|
+
const priorityMarkerSymbol = import_lodash18.default.last(labelSymbol) || {};
|
|
3781
|
+
import_lodash18.default.set(priorityMarkerSymbol, "markerFile", logoUrl);
|
|
3775
3782
|
return new import_maptalks4.Marker(coordinates, {
|
|
3776
3783
|
properties: markerProperties,
|
|
3777
3784
|
symbol: labelSymbol
|
|
@@ -3779,14 +3786,14 @@ var styledFeatureGenerator = (mapTheme) => {
|
|
|
3779
3786
|
},
|
|
3780
3787
|
createHighlight2DAmenityMarkerFrom3DMarker: (feature2, mapConfig) => {
|
|
3781
3788
|
const { coordinates, units, kiosk } = feature2;
|
|
3782
|
-
const amenityLocatedUnit =
|
|
3789
|
+
const amenityLocatedUnit = import_lodash18.default.first(units);
|
|
3783
3790
|
const unitConfig = getExtrudeConfigByFeature(
|
|
3784
3791
|
mapConfig,
|
|
3785
3792
|
amenityLocatedUnit
|
|
3786
3793
|
);
|
|
3787
|
-
const unitHeight =
|
|
3794
|
+
const unitHeight = import_lodash18.default.get(unitConfig, "height", 0);
|
|
3788
3795
|
const kioskConfig = getExtrudeConfigByFeature(mapConfig, kiosk);
|
|
3789
|
-
const kioskHeight =
|
|
3796
|
+
const kioskHeight = import_lodash18.default.get(kioskConfig, "height", 0);
|
|
3790
3797
|
const markerHeight = unitHeight + kioskHeight;
|
|
3791
3798
|
const symbol = getElementSymbol("highlight-amenity-marker");
|
|
3792
3799
|
return new import_maptalks4.Marker(coordinates, {
|
|
@@ -3862,7 +3869,7 @@ var styledFeatureGenerator = (mapTheme) => {
|
|
|
3862
3869
|
}
|
|
3863
3870
|
},
|
|
3864
3871
|
createLineStringFromGeometries: (geometries) => {
|
|
3865
|
-
const mergedCoordinates = (0,
|
|
3872
|
+
const mergedCoordinates = (0, import_lodash18.default)(geometries).map((geometry) => {
|
|
3866
3873
|
switch (geometry.type) {
|
|
3867
3874
|
case "Point":
|
|
3868
3875
|
return [
|
|
@@ -3971,29 +3978,29 @@ var styledFeatureGenerator = (mapTheme) => {
|
|
|
3971
3978
|
create3DAmenityMarker: (feature2, threeLayer, config) => {
|
|
3972
3979
|
const { geometry, properties, feature_type, id } = feature2;
|
|
3973
3980
|
const { category, units, kiosk, is_clickable } = properties;
|
|
3974
|
-
const amenityLocatedUnit =
|
|
3975
|
-
const isLocatedUnitModel3dAvailable = !
|
|
3981
|
+
const amenityLocatedUnit = import_lodash18.default.first(units);
|
|
3982
|
+
const isLocatedUnitModel3dAvailable = !import_lodash18.default.isEmpty(
|
|
3976
3983
|
amenityLocatedUnit?.properties?.model3d
|
|
3977
3984
|
);
|
|
3978
|
-
const isLocatedKioskModel3dAvailable = !
|
|
3985
|
+
const isLocatedKioskModel3dAvailable = !import_lodash18.default.isEmpty(
|
|
3979
3986
|
kiosk?.properties?.model3d
|
|
3980
3987
|
);
|
|
3981
3988
|
const unitConfig = getExtrudeConfigByFeature(config, amenityLocatedUnit);
|
|
3982
|
-
const unitHeight = isLocatedUnitModel3dAvailable ? 0 :
|
|
3989
|
+
const unitHeight = isLocatedUnitModel3dAvailable ? 0 : import_lodash18.default.get(unitConfig, "height", 0);
|
|
3983
3990
|
const kioskConfig = getExtrudeConfigByFeature(config, kiosk);
|
|
3984
|
-
const kioskHeight = isLocatedKioskModel3dAvailable ? 0 :
|
|
3985
|
-
const coordinates =
|
|
3991
|
+
const kioskHeight = isLocatedKioskModel3dAvailable ? 0 : import_lodash18.default.get(kioskConfig, "height", 0);
|
|
3992
|
+
const coordinates = import_lodash18.default.get(geometry, "coordinates");
|
|
3986
3993
|
const markerProperties = {
|
|
3987
3994
|
...properties,
|
|
3988
3995
|
coordinates,
|
|
3989
3996
|
id,
|
|
3990
3997
|
feature_type
|
|
3991
3998
|
};
|
|
3992
|
-
const material =
|
|
3999
|
+
const material = import_lodash18.default.get(
|
|
3993
4000
|
spriteMarkerMaterialObj,
|
|
3994
4001
|
`${feature_type}.${category}`
|
|
3995
4002
|
);
|
|
3996
|
-
const highlightOptions =
|
|
4003
|
+
const highlightOptions = import_lodash18.default.get(
|
|
3997
4004
|
spriteHighlightMarkerOptionObj,
|
|
3998
4005
|
`${PREFIX_HIGHLIGHTED_SYMBOL_KEY}-${feature_type}.${category}`
|
|
3999
4006
|
);
|
|
@@ -4016,24 +4023,24 @@ var styledFeatureGenerator = (mapTheme) => {
|
|
|
4016
4023
|
const { category, unit, kiosk } = properties;
|
|
4017
4024
|
const amenityLocation = kiosk || unit;
|
|
4018
4025
|
const locationConfig = getExtrudeConfigByFeature(config, amenityLocation);
|
|
4019
|
-
const coordinates =
|
|
4026
|
+
const coordinates = import_lodash18.default.get(geometry, "coordinates");
|
|
4020
4027
|
const markerProperties = {
|
|
4021
4028
|
...properties,
|
|
4022
4029
|
coordinates,
|
|
4023
4030
|
id,
|
|
4024
4031
|
feature_type
|
|
4025
4032
|
};
|
|
4026
|
-
const material =
|
|
4033
|
+
const material = import_lodash18.default.get(
|
|
4027
4034
|
spriteMarkerMaterialObj,
|
|
4028
4035
|
`${feature_type}.${category}`
|
|
4029
4036
|
);
|
|
4030
|
-
const highlightOptions =
|
|
4037
|
+
const highlightOptions = import_lodash18.default.get(
|
|
4031
4038
|
spriteHighlightMarkerOptionObj,
|
|
4032
4039
|
`${PREFIX_HIGHLIGHTED_SYMBOL_KEY}-${feature_type}.${category}`
|
|
4033
4040
|
);
|
|
4034
4041
|
const options = {
|
|
4035
4042
|
scale: 0.05,
|
|
4036
|
-
altitude:
|
|
4043
|
+
altitude: import_lodash18.default.get(locationConfig, "height", 0),
|
|
4037
4044
|
highlight: highlightOptions
|
|
4038
4045
|
};
|
|
4039
4046
|
return create3DMarker(
|
|
@@ -4049,24 +4056,24 @@ var styledFeatureGenerator = (mapTheme) => {
|
|
|
4049
4056
|
const { category, unit, kiosk } = properties;
|
|
4050
4057
|
const amenityLocation = kiosk || unit;
|
|
4051
4058
|
const locationConfig = getExtrudeConfigByFeature(config, amenityLocation);
|
|
4052
|
-
const coordinates =
|
|
4059
|
+
const coordinates = import_lodash18.default.get(geometry, "coordinates");
|
|
4053
4060
|
const markerProperties = {
|
|
4054
4061
|
...properties,
|
|
4055
4062
|
coordinates,
|
|
4056
4063
|
id,
|
|
4057
4064
|
feature_type
|
|
4058
4065
|
};
|
|
4059
|
-
const material =
|
|
4066
|
+
const material = import_lodash18.default.get(
|
|
4060
4067
|
spriteMarkerMaterialObj,
|
|
4061
4068
|
`${feature_type}.${category}`
|
|
4062
4069
|
);
|
|
4063
|
-
const highlightOptions =
|
|
4070
|
+
const highlightOptions = import_lodash18.default.get(
|
|
4064
4071
|
spriteHighlightMarkerOptionObj,
|
|
4065
4072
|
`${PREFIX_HIGHLIGHTED_SYMBOL_KEY}-${feature_type}.${category}`
|
|
4066
4073
|
);
|
|
4067
4074
|
const options = {
|
|
4068
4075
|
scale: 0.05,
|
|
4069
|
-
altitude:
|
|
4076
|
+
altitude: import_lodash18.default.get(locationConfig, "height", 0),
|
|
4070
4077
|
highlight: highlightOptions
|
|
4071
4078
|
};
|
|
4072
4079
|
return create3DMarker(
|
|
@@ -4078,13 +4085,13 @@ var styledFeatureGenerator = (mapTheme) => {
|
|
|
4078
4085
|
);
|
|
4079
4086
|
},
|
|
4080
4087
|
createExtrudedUnit: (unit, threeLayer, options) => {
|
|
4081
|
-
const extrudeHeight =
|
|
4088
|
+
const extrudeHeight = import_lodash18.default.get(options, "height");
|
|
4082
4089
|
if (!extrudeHeight) return;
|
|
4083
4090
|
const unitProperty = getFeatureProperties(unit);
|
|
4084
4091
|
const options3d = {
|
|
4085
4092
|
// TODO: Move to extrude config later
|
|
4086
4093
|
offset: -0.1,
|
|
4087
|
-
altitude:
|
|
4094
|
+
altitude: import_lodash18.default.get(options, "altitude", 0)
|
|
4088
4095
|
};
|
|
4089
4096
|
const color = unitProperty.defaultColor;
|
|
4090
4097
|
if (color === "transparent") return;
|
|
@@ -4127,14 +4134,14 @@ var EXCEPT_AMENITY_LOCATION_CATEGORIES = [
|
|
|
4127
4134
|
"unspecified"
|
|
4128
4135
|
];
|
|
4129
4136
|
var getLocationByAmenity = (feature2) => {
|
|
4130
|
-
const unit =
|
|
4131
|
-
const unitCategory =
|
|
4137
|
+
const unit = import_lodash18.default.get(feature2, "properties.units[0]", null);
|
|
4138
|
+
const unitCategory = import_lodash18.default.get(unit, "properties.category");
|
|
4132
4139
|
if (!unit) return feature2.id;
|
|
4133
4140
|
return EXCEPT_AMENITY_LOCATION_CATEGORIES.includes(unitCategory) ? feature2 : unit;
|
|
4134
4141
|
};
|
|
4135
4142
|
var getLocationByOccupant = (feature2) => {
|
|
4136
|
-
const kiosk =
|
|
4137
|
-
const unit =
|
|
4143
|
+
const kiosk = import_lodash18.default.get(feature2, "properties.kiosk", null);
|
|
4144
|
+
const unit = import_lodash18.default.get(feature2, "properties.anchor.properties.unit", null);
|
|
4138
4145
|
return kiosk || unit;
|
|
4139
4146
|
};
|
|
4140
4147
|
var getLocationIdByFeature = (feature2) => {
|
|
@@ -4162,10 +4169,10 @@ var getFeatureByLocationId = (id, features = []) => {
|
|
|
4162
4169
|
});
|
|
4163
4170
|
};
|
|
4164
4171
|
var isClickableFeature = (feature2) => {
|
|
4165
|
-
const isClickable =
|
|
4172
|
+
const isClickable = import_lodash18.default.get(feature2, "properties.is_clickable");
|
|
4166
4173
|
switch (feature2?.feature_type) {
|
|
4167
4174
|
case "amenity":
|
|
4168
|
-
return
|
|
4175
|
+
return import_lodash18.default.isNull(isClickable) ? true : isClickable;
|
|
4169
4176
|
case "occupant":
|
|
4170
4177
|
return true;
|
|
4171
4178
|
default:
|
|
@@ -4183,15 +4190,15 @@ var getLocationByFeature = (feature2) => {
|
|
|
4183
4190
|
}
|
|
4184
4191
|
};
|
|
4185
4192
|
var getRelatedLocationsByOccupant = (feature2) => {
|
|
4186
|
-
const kiosks =
|
|
4187
|
-
const units =
|
|
4193
|
+
const kiosks = import_lodash18.default.get(feature2, "properties.kiosks", []);
|
|
4194
|
+
const units = import_lodash18.default.get(feature2, "properties.units", []);
|
|
4188
4195
|
return [...kiosks, ...units];
|
|
4189
4196
|
};
|
|
4190
4197
|
var getRelatedLocationsByAmenity = (feature2) => {
|
|
4191
|
-
const units =
|
|
4198
|
+
const units = import_lodash18.default.get(feature2, "properties.units", []);
|
|
4192
4199
|
if (units.length === 0) return [feature2];
|
|
4193
4200
|
return units.filter((unit) => {
|
|
4194
|
-
const unitCategory =
|
|
4201
|
+
const unitCategory = import_lodash18.default.get(unit, "properties.category");
|
|
4195
4202
|
return !EXCEPT_AMENITY_LOCATION_CATEGORIES.includes(unitCategory);
|
|
4196
4203
|
});
|
|
4197
4204
|
};
|
|
@@ -4217,8 +4224,8 @@ var getRelatedLocationsByFeature = (feature2) => {
|
|
|
4217
4224
|
};
|
|
4218
4225
|
var getOrdinalByLocationId = (locationId, feature2) => {
|
|
4219
4226
|
if (!feature2) return null;
|
|
4220
|
-
const mainUnit =
|
|
4221
|
-
const mainKiosk =
|
|
4227
|
+
const mainUnit = import_lodash18.default.get(feature2, "properties.unit");
|
|
4228
|
+
const mainKiosk = import_lodash18.default.get(feature2, "properties.kiosk");
|
|
4222
4229
|
const relatedLocations = getRelatedLocationsByFeature(feature2);
|
|
4223
4230
|
const allLocations = [mainUnit, mainKiosk, ...relatedLocations].filter(
|
|
4224
4231
|
Boolean
|
|
@@ -4226,7 +4233,7 @@ var getOrdinalByLocationId = (locationId, feature2) => {
|
|
|
4226
4233
|
const targetLocation = allLocations.find(
|
|
4227
4234
|
(location) => location.id === locationId
|
|
4228
4235
|
);
|
|
4229
|
-
return targetLocation ?
|
|
4236
|
+
return targetLocation ? import_lodash18.default.get(targetLocation, "properties.level.properties.ordinal") || import_lodash18.default.get(targetLocation, "properties.ordinal") : null;
|
|
4230
4237
|
};
|
|
4231
4238
|
|
|
4232
4239
|
// src/IndoorMap/utils/math.ts
|
|
@@ -4311,7 +4318,7 @@ var CameraManager = class {
|
|
|
4311
4318
|
};
|
|
4312
4319
|
|
|
4313
4320
|
// src/IndoorMap/renderer/RendererManager.ts
|
|
4314
|
-
var
|
|
4321
|
+
var import_lodash21 = require("lodash");
|
|
4315
4322
|
var import_center12 = require("@turf/center");
|
|
4316
4323
|
var THREE4 = __toESM(require("three"));
|
|
4317
4324
|
|
|
@@ -4332,7 +4339,7 @@ var maptalks3 = __toESM(require("maptalks-gl"));
|
|
|
4332
4339
|
var import_maptalks6 = require("maptalks.three");
|
|
4333
4340
|
var import_three5 = require("three");
|
|
4334
4341
|
var import_d3plus_shape = require("d3plus-shape");
|
|
4335
|
-
var
|
|
4342
|
+
var import_lodash19 = require("lodash");
|
|
4336
4343
|
var OPTIONS3 = {
|
|
4337
4344
|
// Allowing click through and prevent interaction
|
|
4338
4345
|
interactive: false,
|
|
@@ -4350,9 +4357,9 @@ var defaultFlatLabelOptions = {
|
|
|
4350
4357
|
textBaseline: "middle",
|
|
4351
4358
|
fillStyle: "#000"
|
|
4352
4359
|
};
|
|
4353
|
-
var defaultRectAngleToCalc = (0,
|
|
4360
|
+
var defaultRectAngleToCalc = (0, import_lodash19.range)(-90, 92, 2);
|
|
4354
4361
|
var getMaterial = (text, flatLabelOptions) => {
|
|
4355
|
-
const options = (0,
|
|
4362
|
+
const options = (0, import_lodash19.merge)({}, defaultFlatLabelOptions, flatLabelOptions);
|
|
4356
4363
|
const {
|
|
4357
4364
|
fontSize: initialFontSize,
|
|
4358
4365
|
fontFamily,
|
|
@@ -4405,12 +4412,12 @@ var getMaterial = (text, flatLabelOptions) => {
|
|
|
4405
4412
|
const maxWidth = SIZE - 2 * margin;
|
|
4406
4413
|
texts = wrapText(ctx, text, maxWidth);
|
|
4407
4414
|
}
|
|
4408
|
-
let textWidth = (0,
|
|
4415
|
+
let textWidth = (0, import_lodash19.max)(texts.map((text2) => ctx.measureText(text2).width));
|
|
4409
4416
|
let scale3 = 1;
|
|
4410
4417
|
while (scale3 > 0 && textWidth + 2 * margin > SIZE) {
|
|
4411
4418
|
scale3 -= scaleStep;
|
|
4412
4419
|
ctx.font = `${fontWeight} ${scale3 * fontSize}px "${fontFamily}", Arial`;
|
|
4413
|
-
textWidth = (0,
|
|
4420
|
+
textWidth = (0, import_lodash19.max)(texts.map((text2) => ctx.measureText(text2).width));
|
|
4414
4421
|
}
|
|
4415
4422
|
const center8 = { x: 0.5 * SIZE, y: 0.5 * SIZE };
|
|
4416
4423
|
if (scale3 > scaleMin) {
|
|
@@ -4478,7 +4485,7 @@ var GroundLabel = class extends import_maptalks6.BaseObject {
|
|
|
4478
4485
|
strokeStyle,
|
|
4479
4486
|
lineWidth
|
|
4480
4487
|
});
|
|
4481
|
-
const rectAngles = (0,
|
|
4488
|
+
const rectAngles = (0, import_lodash19.isArray)(angle) ? angle : [angle];
|
|
4482
4489
|
material.needsUpdate = true;
|
|
4483
4490
|
const rect = (0, import_d3plus_shape.largestRect)(bound, {
|
|
4484
4491
|
cache: true,
|
|
@@ -4551,32 +4558,32 @@ var GroundLabel = class extends import_maptalks6.BaseObject {
|
|
|
4551
4558
|
return { x: this.#offsetX, y: this.#offsetY };
|
|
4552
4559
|
}
|
|
4553
4560
|
set offsetX(value) {
|
|
4554
|
-
if ((0,
|
|
4561
|
+
if ((0, import_lodash19.isNumber)(value)) {
|
|
4555
4562
|
this.#offsetX = value;
|
|
4556
4563
|
this.#updatePosition();
|
|
4557
4564
|
}
|
|
4558
4565
|
}
|
|
4559
4566
|
set offsetY(value) {
|
|
4560
|
-
if ((0,
|
|
4567
|
+
if ((0, import_lodash19.isNumber)(value)) {
|
|
4561
4568
|
this.#offsetY = value;
|
|
4562
4569
|
this.#updatePosition();
|
|
4563
4570
|
}
|
|
4564
4571
|
}
|
|
4565
4572
|
set angle(newAngle) {
|
|
4566
|
-
if ((0,
|
|
4573
|
+
if ((0, import_lodash19.isNumber)(newAngle)) {
|
|
4567
4574
|
this.#angle = newAngle;
|
|
4568
4575
|
this.getObject3d().rotation.z = Math.PI / 180 * this.#angle;
|
|
4569
4576
|
}
|
|
4570
4577
|
}
|
|
4571
4578
|
setOffset(offsetX, offsetY) {
|
|
4572
|
-
if ((0,
|
|
4579
|
+
if ((0, import_lodash19.isNumber)(offsetX) && (0, import_lodash19.isNumber)(offsetY)) {
|
|
4573
4580
|
this.#offsetX = offsetX;
|
|
4574
4581
|
this.#offsetY = offsetY;
|
|
4575
4582
|
this.#updatePosition();
|
|
4576
4583
|
}
|
|
4577
4584
|
}
|
|
4578
4585
|
addOffset(deltaX, deltaY) {
|
|
4579
|
-
if ((0,
|
|
4586
|
+
if ((0, import_lodash19.isNumber)(deltaX) && (0, import_lodash19.isNumber)(deltaY)) {
|
|
4580
4587
|
this.#offsetX += deltaX;
|
|
4581
4588
|
this.#offsetY += deltaY;
|
|
4582
4589
|
this.#updatePosition();
|
|
@@ -5158,7 +5165,7 @@ var THREE3 = __toESM(require("three"));
|
|
|
5158
5165
|
var import_maptalks8 = require("maptalks");
|
|
5159
5166
|
var THREE2 = __toESM(require("three"));
|
|
5160
5167
|
var import_maptalks9 = require("maptalks.three");
|
|
5161
|
-
var
|
|
5168
|
+
var import_lodash20 = require("lodash");
|
|
5162
5169
|
|
|
5163
5170
|
// src/IndoorMap/renderer/utils/interpolateStops.ts
|
|
5164
5171
|
var interpolateStops = ({ stops }, zoom) => {
|
|
@@ -5253,7 +5260,7 @@ var TextSpriteMarker = class extends import_maptalks9.BaseObject {
|
|
|
5253
5260
|
const paragraphs = String(text).split("\n");
|
|
5254
5261
|
const wrappedLines = [];
|
|
5255
5262
|
paragraphs.forEach((paragraph) => {
|
|
5256
|
-
if ((0,
|
|
5263
|
+
if ((0, import_lodash20.isNil)(maxWidth) || isNaN(maxWidth)) {
|
|
5257
5264
|
wrappedLines.push(paragraph);
|
|
5258
5265
|
return;
|
|
5259
5266
|
}
|
|
@@ -5314,7 +5321,7 @@ var TextSpriteMarker = class extends import_maptalks9.BaseObject {
|
|
|
5314
5321
|
const altitude = (options.altitude || 0) + this.#altitudeOffset;
|
|
5315
5322
|
const z = layer.altitudeToVector3(altitude, altitude).x;
|
|
5316
5323
|
const position = layer.coordinateToVector3(this._coordinate, z);
|
|
5317
|
-
(0,
|
|
5324
|
+
(0, import_lodash20.set)(this.properties, "default.position", position);
|
|
5318
5325
|
this.getObject3d().position.copy(position);
|
|
5319
5326
|
}
|
|
5320
5327
|
_animation() {
|
|
@@ -5597,7 +5604,7 @@ var RendererManager = class extends EventTarget {
|
|
|
5597
5604
|
if (this.#isClicked) return;
|
|
5598
5605
|
this.#isClicked = true;
|
|
5599
5606
|
const onClickElement = this.#onClickElement;
|
|
5600
|
-
if (!(0,
|
|
5607
|
+
if (!(0, import_lodash21.isFunction)(onClickElement)) return;
|
|
5601
5608
|
this.#onClickElement(e);
|
|
5602
5609
|
this.#isClicked = false;
|
|
5603
5610
|
};
|
|
@@ -5650,7 +5657,7 @@ var RendererManager = class extends EventTarget {
|
|
|
5650
5657
|
});
|
|
5651
5658
|
units.filter((u) => u.properties.category === "room").forEach((unit) => {
|
|
5652
5659
|
const openingRelationships = relationships.filter((r) => r.properties.origin?.id === unit.id || r.properties.destination?.id === unit.id);
|
|
5653
|
-
const roomOpenings = (0,
|
|
5660
|
+
const roomOpenings = (0, import_lodash21.compact)(openingRelationships.map((rel) => {
|
|
5654
5661
|
const openingId = rel?.properties.intermediary[0].id;
|
|
5655
5662
|
return openings.find((o) => o.id === openingId);
|
|
5656
5663
|
}));
|
|
@@ -5732,7 +5739,7 @@ var RendererManager = class extends EventTarget {
|
|
|
5732
5739
|
this.markerRenderer.showMarkers(markers, ordinal - baseOrdinal);
|
|
5733
5740
|
}
|
|
5734
5741
|
} else {
|
|
5735
|
-
const baseOrdinal = Array.isArray(targetOrdinal) ? (0,
|
|
5742
|
+
const baseOrdinal = Array.isArray(targetOrdinal) ? (0, import_lodash21.min)(targetOrdinal) : targetOrdinal;
|
|
5736
5743
|
for (const [ordinal, elements] of this.elementsByOrdinal) {
|
|
5737
5744
|
const inOrdinal = Array.isArray(targetOrdinal) ? targetOrdinal.includes(ordinal) : ordinal === targetOrdinal;
|
|
5738
5745
|
if (inOrdinal) {
|
|
@@ -5759,7 +5766,7 @@ var RendererManager = class extends EventTarget {
|
|
|
5759
5766
|
const elements = elemIds.map((id) => this.elementsMap.get(id)).flat();
|
|
5760
5767
|
elements.forEach((element) => {
|
|
5761
5768
|
const controller = this.elementRenderer.createHighlightController(element);
|
|
5762
|
-
if (controller && (0,
|
|
5769
|
+
if (controller && (0, import_lodash21.isFunction)(controller.start)) {
|
|
5763
5770
|
controller.start();
|
|
5764
5771
|
this.highlightControllers.push(controller);
|
|
5765
5772
|
}
|
|
@@ -5767,7 +5774,7 @@ var RendererManager = class extends EventTarget {
|
|
|
5767
5774
|
};
|
|
5768
5775
|
clearHighlightElements = () => {
|
|
5769
5776
|
this.highlightControllers.forEach((controller) => {
|
|
5770
|
-
if ((0,
|
|
5777
|
+
if ((0, import_lodash21.isFunction)(controller?.clear)) controller.clear();
|
|
5771
5778
|
});
|
|
5772
5779
|
};
|
|
5773
5780
|
/**
|
|
@@ -5882,7 +5889,7 @@ var IndoorMap = class extends EventTarget {
|
|
|
5882
5889
|
};
|
|
5883
5890
|
constructor(elementId, options) {
|
|
5884
5891
|
super();
|
|
5885
|
-
const combinedOptions =
|
|
5892
|
+
const combinedOptions = import_lodash22.default.merge({}, defaultOptions, options);
|
|
5886
5893
|
this.options = combinedOptions;
|
|
5887
5894
|
const {
|
|
5888
5895
|
onMapReady,
|
|
@@ -5929,7 +5936,7 @@ var IndoorMap = class extends EventTarget {
|
|
|
5929
5936
|
this.dataClient = options.dataClient;
|
|
5930
5937
|
}
|
|
5931
5938
|
setOptions(options) {
|
|
5932
|
-
const combinedOptions =
|
|
5939
|
+
const combinedOptions = import_lodash22.default.merge({}, defaultOptions, options);
|
|
5933
5940
|
this.options = combinedOptions;
|
|
5934
5941
|
const maptalksOptions = parseMaptalksOptions(combinedOptions);
|
|
5935
5942
|
this.map.setOptions(maptalksOptions);
|
|
@@ -5955,7 +5962,7 @@ var IndoorMap = class extends EventTarget {
|
|
|
5955
5962
|
handleMapClick = ({ coordinate }) => {
|
|
5956
5963
|
const { x, y } = coordinate;
|
|
5957
5964
|
console.log(
|
|
5958
|
-
`[Coordinates]: x: ${
|
|
5965
|
+
`[Coordinates]: x: ${import_lodash22.default.round(x, 8)} y: ${import_lodash22.default.round(
|
|
5959
5966
|
y,
|
|
5960
5967
|
8
|
|
5961
5968
|
)}, [Bearing]: ${this.map.getBearing()}, [Pitch]: ${this.map.getPitch()}`
|
|
@@ -6041,7 +6048,7 @@ var IndoorMap = class extends EventTarget {
|
|
|
6041
6048
|
if (this.#isClicked) return;
|
|
6042
6049
|
this.#isClicked = true;
|
|
6043
6050
|
const onClickElement = this.#onClickElement;
|
|
6044
|
-
if (!
|
|
6051
|
+
if (!import_lodash22.default.isFunction(onClickElement)) return;
|
|
6045
6052
|
this.#onClickElement(e);
|
|
6046
6053
|
this.#isClicked = false;
|
|
6047
6054
|
};
|
|
@@ -6061,16 +6068,16 @@ var IndoorMap = class extends EventTarget {
|
|
|
6061
6068
|
for (const feature2 of this.#features) {
|
|
6062
6069
|
try {
|
|
6063
6070
|
const { feature_type: featureType, properties, id } = feature2;
|
|
6064
|
-
const layerName =
|
|
6071
|
+
const layerName = import_lodash22.default.get(
|
|
6065
6072
|
LAYER_FEATURE_TYPE_OBJ,
|
|
6066
6073
|
featureType,
|
|
6067
6074
|
featureType
|
|
6068
6075
|
);
|
|
6069
6076
|
const layer = this.map.getLayer(layerName);
|
|
6070
6077
|
let geometry;
|
|
6071
|
-
const category =
|
|
6072
|
-
const extrudeConfig =
|
|
6073
|
-
const textMarkerType =
|
|
6078
|
+
const category = import_lodash22.default.get(feature2, "properties.category");
|
|
6079
|
+
const extrudeConfig = import_lodash22.default.get(this.#mapConfig, "extrude");
|
|
6080
|
+
const textMarkerType = import_lodash22.default.get(
|
|
6074
6081
|
this.#mapConfig,
|
|
6075
6082
|
"text_marker_type",
|
|
6076
6083
|
"ui-marker"
|
|
@@ -6237,15 +6244,15 @@ var IndoorMap = class extends EventTarget {
|
|
|
6237
6244
|
}
|
|
6238
6245
|
}
|
|
6239
6246
|
updateUserLocationSymbolByLocale(locale) {
|
|
6240
|
-
const userLocationGeometry =
|
|
6247
|
+
const userLocationGeometry = import_lodash22.default.get(
|
|
6241
6248
|
this.#elements,
|
|
6242
6249
|
`${USER_LOCATION_ELEMENT_ID}.geometry`
|
|
6243
6250
|
);
|
|
6244
6251
|
if (!userLocationGeometry) return;
|
|
6245
6252
|
const currentSymbol = userLocationGeometry.getSymbol();
|
|
6246
6253
|
const localeSymbolToUpdate = currentSymbol.map((symbol) => {
|
|
6247
|
-
const localeSymbol =
|
|
6248
|
-
if (!
|
|
6254
|
+
const localeSymbol = import_lodash22.default.get(symbol, `${LOCALE_SYMBOL_KEY}.${locale}`) || import_lodash22.default.get(symbol, `${LOCALE_SYMBOL_KEY}.default`);
|
|
6255
|
+
if (!import_lodash22.default.isPlainObject(localeSymbol)) return symbol;
|
|
6249
6256
|
return {
|
|
6250
6257
|
...symbol,
|
|
6251
6258
|
...localeSymbol
|
|
@@ -6319,14 +6326,14 @@ var IndoorMap = class extends EventTarget {
|
|
|
6319
6326
|
* END of User Location
|
|
6320
6327
|
****************************/
|
|
6321
6328
|
showGeometryByElementId = (elementId) => {
|
|
6322
|
-
const geometry =
|
|
6329
|
+
const geometry = import_lodash22.default.get(
|
|
6323
6330
|
this.#elements,
|
|
6324
6331
|
`${elementId}.geometry`
|
|
6325
6332
|
);
|
|
6326
6333
|
if (geometry) geometry.show();
|
|
6327
6334
|
};
|
|
6328
6335
|
hideGeometryByElementId = (elementId) => {
|
|
6329
|
-
const geometry =
|
|
6336
|
+
const geometry = import_lodash22.default.get(this.#elements, `${elementId}.geometry`);
|
|
6330
6337
|
if (geometry) geometry.hide();
|
|
6331
6338
|
};
|
|
6332
6339
|
setSpriteMarkersOpacity = (opacity = 1) => {
|
|
@@ -6373,13 +6380,13 @@ var IndoorMap = class extends EventTarget {
|
|
|
6373
6380
|
const line = lineStrings[i];
|
|
6374
6381
|
const coords = line.geometry.coordinates;
|
|
6375
6382
|
const prevLine = lineStrings[i - 1];
|
|
6376
|
-
const firstCoord =
|
|
6383
|
+
const firstCoord = import_lodash22.default.first(coords);
|
|
6377
6384
|
const isFirstLine = i === 0;
|
|
6378
6385
|
if (isFirstLine) {
|
|
6379
6386
|
accLine.push(...coords);
|
|
6380
6387
|
continue;
|
|
6381
6388
|
}
|
|
6382
|
-
const prevLastCoord =
|
|
6389
|
+
const prevLastCoord = import_lodash22.default.last(prevLine.geometry.coordinates);
|
|
6383
6390
|
const isNearby = (0, import_distance6.default)(point(firstCoord), point(prevLastCoord)) < distance5;
|
|
6384
6391
|
if (!isNearby) {
|
|
6385
6392
|
const remainingLines = lineStrings.slice(i);
|
|
@@ -6400,8 +6407,8 @@ var IndoorMap = class extends EventTarget {
|
|
|
6400
6407
|
create3DStepPath
|
|
6401
6408
|
} = this.#styler;
|
|
6402
6409
|
const routeMarkerLayer = this.map.getLayer(HIGHLIGHT_LAYER_NAME);
|
|
6403
|
-
const linesByOrdinal = (0,
|
|
6404
|
-
const joinedLines = (0,
|
|
6410
|
+
const linesByOrdinal = (0, import_lodash22.default)(stepGeometries).filter(({ geometry }) => geometry.type === "LineString").groupBy("properties.ordinal").value();
|
|
6411
|
+
const joinedLines = (0, import_lodash22.default)(linesByOrdinal).reduce((acc, lines, key) => {
|
|
6405
6412
|
const joined = this.combineNearbyLineStrings(lines, {
|
|
6406
6413
|
properties: { ordinal: +key }
|
|
6407
6414
|
});
|
|
@@ -6429,14 +6436,14 @@ var IndoorMap = class extends EventTarget {
|
|
|
6429
6436
|
stepElement = createOriginMarker(stepGeometry).addTo(routeMarkerLayer);
|
|
6430
6437
|
break;
|
|
6431
6438
|
case "destination-marker":
|
|
6432
|
-
const extrudeConfig =
|
|
6439
|
+
const extrudeConfig = import_lodash22.default.get(this.#mapConfig, "extrude");
|
|
6433
6440
|
if (destinationFeature.feature_type === "occupant") {
|
|
6434
|
-
const stepId =
|
|
6441
|
+
const stepId = import_lodash22.default.get(stepGeometry, "id");
|
|
6435
6442
|
const normalizedDestinationFeature = {
|
|
6436
6443
|
...destinationFeature,
|
|
6437
6444
|
id: stepId
|
|
6438
6445
|
};
|
|
6439
|
-
const logoUrl =
|
|
6446
|
+
const logoUrl = import_lodash22.default.get(
|
|
6440
6447
|
normalizedDestinationFeature,
|
|
6441
6448
|
"properties.logo.url"
|
|
6442
6449
|
);
|
|
@@ -6481,15 +6488,15 @@ var IndoorMap = class extends EventTarget {
|
|
|
6481
6488
|
const routeMarkerLayer = this.map.getLayer(
|
|
6482
6489
|
HIGHLIGHT_LAYER_NAME
|
|
6483
6490
|
);
|
|
6484
|
-
const originMarkerGeometry =
|
|
6491
|
+
const originMarkerGeometry = import_lodash22.default.get(
|
|
6485
6492
|
this.#elements,
|
|
6486
6493
|
`${ORIGIN_MARKER_ID}.geometry`
|
|
6487
6494
|
);
|
|
6488
|
-
const destinationMarkerGeometry =
|
|
6495
|
+
const destinationMarkerGeometry = import_lodash22.default.get(
|
|
6489
6496
|
this.#elements,
|
|
6490
6497
|
`${DESTINATION_MARKER_ID}.geometry`
|
|
6491
6498
|
);
|
|
6492
|
-
const geometriesToRemove =
|
|
6499
|
+
const geometriesToRemove = import_lodash22.default.compact([
|
|
6493
6500
|
originMarkerGeometry,
|
|
6494
6501
|
destinationMarkerGeometry
|
|
6495
6502
|
]);
|
|
@@ -6500,7 +6507,7 @@ var IndoorMap = class extends EventTarget {
|
|
|
6500
6507
|
(obj) => !(obj instanceof NavigationPath)
|
|
6501
6508
|
);
|
|
6502
6509
|
const objects = this.#navigationGeometries || {};
|
|
6503
|
-
|
|
6510
|
+
import_lodash22.default.forEach(objects, (obj) => {
|
|
6504
6511
|
if (!obj) return;
|
|
6505
6512
|
this.#navigationGeometries[obj.properties.id] = null;
|
|
6506
6513
|
obj.remove();
|
|
@@ -6537,7 +6544,7 @@ var IndoorMap = class extends EventTarget {
|
|
|
6537
6544
|
}
|
|
6538
6545
|
if (this.threeLayer) {
|
|
6539
6546
|
const currentView = this.camera.getView();
|
|
6540
|
-
const objectOpacity =
|
|
6547
|
+
const objectOpacity = import_lodash22.default.clamp(38 - 2 * currentView.zoom, 0, 1);
|
|
6541
6548
|
this.#objects.forEach((object) => {
|
|
6542
6549
|
object.getObject3d().traverse((child) => {
|
|
6543
6550
|
if (child.isMesh) child.material.opacity = objectOpacity;
|
|
@@ -6547,7 +6554,7 @@ var IndoorMap = class extends EventTarget {
|
|
|
6547
6554
|
});
|
|
6548
6555
|
if (this.#billboardObjects) {
|
|
6549
6556
|
this.#billboardObjects.forEach((object) => {
|
|
6550
|
-
const objectScale =
|
|
6557
|
+
const objectScale = import_lodash22.default.clamp(
|
|
6551
6558
|
20 - 1 * currentView.zoom,
|
|
6552
6559
|
1,
|
|
6553
6560
|
1.05
|
|
@@ -6556,7 +6563,7 @@ var IndoorMap = class extends EventTarget {
|
|
|
6556
6563
|
});
|
|
6557
6564
|
}
|
|
6558
6565
|
if (this.#isLayersFadingOnZoom) {
|
|
6559
|
-
const layerOpacity =
|
|
6566
|
+
const layerOpacity = import_lodash22.default.clamp(1 - objectOpacity, 0, 1);
|
|
6560
6567
|
LAYERS.forEach((layerKey) => {
|
|
6561
6568
|
const layer = this.map.getLayer(layerKey);
|
|
6562
6569
|
if (layer) layer.setOpacity(layerOpacity);
|