venue-js 1.4.0-next.11 → 1.4.0-next.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +6 -1
- package/dist/index.d.ts +6 -1
- package/dist/index.js +174 -175
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +16 -18
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -73,6 +73,7 @@ __export(index_exports, {
|
|
|
73
73
|
getRelatedLocationsByAmenity: () => getRelatedLocationsByAmenity,
|
|
74
74
|
getRelatedLocationsByFeature: () => getRelatedLocationsByFeature,
|
|
75
75
|
getRelatedLocationsByOccupant: () => getRelatedLocationsByOccupant,
|
|
76
|
+
getSearchClient: () => getSearchClient,
|
|
76
77
|
getSuitablyValueBetweenBearings: () => getSuitablyValueBetweenBearings,
|
|
77
78
|
isClickableFeature: () => isClickableFeature,
|
|
78
79
|
isValidCoordinate: () => isValidCoordinate,
|
|
@@ -377,7 +378,7 @@ __export(occupant_helper_exports, {
|
|
|
377
378
|
getOccupantMainLocation: () => getOccupantMainLocation,
|
|
378
379
|
getOccupantMarkerLocations: () => getOccupantMarkerLocations
|
|
379
380
|
});
|
|
380
|
-
var
|
|
381
|
+
var import_lodash = require("lodash");
|
|
381
382
|
var getOccupantMainLocation = (occupant) => {
|
|
382
383
|
return occupant.properties.kiosk || occupant.properties.unit;
|
|
383
384
|
};
|
|
@@ -386,7 +387,7 @@ var getOccupantCorrelatedLocations = (occupant) => {
|
|
|
386
387
|
...occupant.properties.units,
|
|
387
388
|
...occupant.properties.kiosks
|
|
388
389
|
];
|
|
389
|
-
return (0,
|
|
390
|
+
return (0, import_lodash.compact)(allCorrelatedLocations);
|
|
390
391
|
};
|
|
391
392
|
var getOccupantMarkerLocations = (occupant, options) => {
|
|
392
393
|
const placementType = options?.type ? options.type : occupant.properties.show_name_on_all_units ? "ALL_LOCATIONS" : "ONCE_PER_LEVEL";
|
|
@@ -394,18 +395,18 @@ var getOccupantMarkerLocations = (occupant, options) => {
|
|
|
394
395
|
const mainLocationLevel = mainLocation?.properties?.level_id;
|
|
395
396
|
const allCorrelatedLocations = getOccupantCorrelatedLocations(occupant);
|
|
396
397
|
if (placementType === "ALL_LOCATIONS") {
|
|
397
|
-
return (0,
|
|
398
|
+
return (0, import_lodash.compact)([mainLocation, ...allCorrelatedLocations]);
|
|
398
399
|
}
|
|
399
400
|
const otherLevelLocations = allCorrelatedLocations.filter((f) => f.properties.level_id !== mainLocationLevel);
|
|
400
401
|
const onePerLevelLocations = [...new Map(otherLevelLocations.map((loc) => [loc.properties.level_id, loc])).values()];
|
|
401
|
-
return (0,
|
|
402
|
+
return (0, import_lodash.compact)([mainLocation, ...onePerLevelLocations]);
|
|
402
403
|
};
|
|
403
404
|
|
|
404
405
|
// src/data/getDataClient.ts
|
|
405
406
|
var import_query_core = require("@tanstack/query-core");
|
|
406
407
|
|
|
407
408
|
// src/data/populator/index.ts
|
|
408
|
-
var
|
|
409
|
+
var import_lodash2 = require("lodash");
|
|
409
410
|
var import_boolean_within = require("@turf/boolean-within");
|
|
410
411
|
var createPopulator = ({
|
|
411
412
|
internalFindById,
|
|
@@ -563,7 +564,7 @@ var createPopulator = ({
|
|
|
563
564
|
...occupant.properties,
|
|
564
565
|
anchor: anchor ? await populateAnchor(anchor) : null,
|
|
565
566
|
local_categories: await Promise.all(
|
|
566
|
-
(0,
|
|
567
|
+
(0, import_lodash2.compact)(localCategories).map(populateTaxonomy)
|
|
567
568
|
),
|
|
568
569
|
venue,
|
|
569
570
|
promotions,
|
|
@@ -2000,11 +2001,18 @@ var sanitizeInput = (str) => str.replace(/[\u200E\u200F\u202A-\u202E\u2066-\u206
|
|
|
2000
2001
|
|
|
2001
2002
|
// src/data/search/getSearchClient.ts
|
|
2002
2003
|
var getSearchClient = ({ occupants, amenities }) => {
|
|
2003
|
-
const fuseAmenities = new Fuse(amenities, {
|
|
2004
|
+
const fuseAmenities = new Fuse(amenities, {
|
|
2005
|
+
threshold: 0.2,
|
|
2006
|
+
keys: [
|
|
2007
|
+
{ name: "properties.name", "weight": 1, getFn: (obj) => Object.values(obj.properties.name) },
|
|
2008
|
+
{ name: "properties.category", "weight": 1 }
|
|
2009
|
+
]
|
|
2010
|
+
});
|
|
2004
2011
|
const fuseOccupants = new Fuse(occupants, {
|
|
2005
|
-
threshold: 0.
|
|
2012
|
+
threshold: 0.25,
|
|
2006
2013
|
// 0.2 is too strict (can't find Mo-Mo Paradise with "momo" search string)
|
|
2007
2014
|
includeScore: true,
|
|
2015
|
+
shouldSort: true,
|
|
2008
2016
|
keys: [
|
|
2009
2017
|
{ name: "properties.name", "weight": 4, getFn: (obj) => Object.values(obj.properties.name) },
|
|
2010
2018
|
{ name: "properties.category", "weight": 0.25 },
|
|
@@ -2013,27 +2021,17 @@ var getSearchClient = ({ occupants, amenities }) => {
|
|
|
2013
2021
|
"weight": 0.25,
|
|
2014
2022
|
getFn: (occ) => occ.properties.local_categories.map((cat3) => Object.values(cat3.properties.name)).flat()
|
|
2015
2023
|
},
|
|
2016
|
-
{ name: "properties.keywords", "weight": 0.
|
|
2024
|
+
{ name: "properties.keywords", "weight": 0.5 },
|
|
2017
2025
|
{ name: "properties.description", "weight": 0.25, getFn: (occ) => Object.values(occ.properties.description || {}) },
|
|
2018
2026
|
{ name: "properties.unit.properties.name", "weight": 0.25, getFn: (obj) => Object.values(obj.properties.unit?.properties.name || {}) },
|
|
2019
2027
|
{ name: "properties.kiosk.properties.name", "weight": 0.25, getFn: (obj) => Object.values(obj.properties.kiosk?.properties.name || {}) }
|
|
2020
2028
|
]
|
|
2021
2029
|
});
|
|
2022
|
-
const fuseFuzzyAmenities = new Fuse(amenities, {
|
|
2023
|
-
threshold: 0.2,
|
|
2024
|
-
keys: [
|
|
2025
|
-
{ name: "properties.category", weight: 4 }
|
|
2026
|
-
]
|
|
2027
|
-
});
|
|
2028
2030
|
const search2 = (value) => {
|
|
2029
2031
|
const sanitizedValue = sanitizeInput(value);
|
|
2030
2032
|
const matchedAmenities = fuseAmenities.search(sanitizedValue);
|
|
2031
|
-
if (matchedAmenities.length > 0) return matchedAmenities;
|
|
2032
2033
|
const matchedOccupants = fuseOccupants.search(sanitizedValue);
|
|
2033
|
-
|
|
2034
|
-
const matchedFuzzyAmenities = fuseFuzzyAmenities.search(sanitizedValue);
|
|
2035
|
-
if (matchedFuzzyAmenities.length > 0) return matchedFuzzyAmenities;
|
|
2036
|
-
return [];
|
|
2034
|
+
return [...matchedAmenities, ...matchedOccupants];
|
|
2037
2035
|
};
|
|
2038
2036
|
return {
|
|
2039
2037
|
search: search2
|
|
@@ -2183,7 +2181,7 @@ var getDataClient = (options) => {
|
|
|
2183
2181
|
var import_maptalks_gl = require("maptalks-gl");
|
|
2184
2182
|
var import_transcoders = require("@maptalks/transcoders.draco");
|
|
2185
2183
|
var import_tween = __toESM(require("@tweenjs/tween.js"));
|
|
2186
|
-
var
|
|
2184
|
+
var import_lodash10 = __toESM(require("lodash"));
|
|
2187
2185
|
|
|
2188
2186
|
// ../../node_modules/@turf/helpers/dist/esm/index.js
|
|
2189
2187
|
var earthRadius = 63710088e-1;
|
|
@@ -2370,7 +2368,7 @@ var VENUE_EVENTS = {
|
|
|
2370
2368
|
};
|
|
2371
2369
|
|
|
2372
2370
|
// src/IndoorMap/utils/createElements.js
|
|
2373
|
-
var
|
|
2371
|
+
var import_lodash6 = __toESM(require("lodash"));
|
|
2374
2372
|
var import_maptalks4 = require("maptalks");
|
|
2375
2373
|
var import_center2 = __toESM(require("@turf/center"));
|
|
2376
2374
|
var import_buffer = __toESM(require("@turf/buffer"));
|
|
@@ -2380,7 +2378,7 @@ var import_three4 = require("three");
|
|
|
2380
2378
|
var maptalks = __toESM(require("maptalks"));
|
|
2381
2379
|
var import_maptalks = require("maptalks.three");
|
|
2382
2380
|
var import_three = require("three");
|
|
2383
|
-
var
|
|
2381
|
+
var import_lodash3 = __toESM(require("lodash"));
|
|
2384
2382
|
var OPTIONS = {
|
|
2385
2383
|
altitude: 25,
|
|
2386
2384
|
scale: 15e-5,
|
|
@@ -2413,7 +2411,7 @@ var Billboard = class extends import_maptalks.BaseObject {
|
|
|
2413
2411
|
} = options;
|
|
2414
2412
|
this.properties = { ...properties };
|
|
2415
2413
|
this._createGroup();
|
|
2416
|
-
const divider =
|
|
2414
|
+
const divider = import_lodash3.default.clamp(window.innerWidth / 375 / 1.75, 1, 1.7);
|
|
2417
2415
|
if (showLeg) {
|
|
2418
2416
|
const lineMaterial = new import_three.LineBasicMaterial({
|
|
2419
2417
|
color: legColor,
|
|
@@ -2448,9 +2446,9 @@ var Billboard = class extends import_maptalks.BaseObject {
|
|
|
2448
2446
|
});
|
|
2449
2447
|
const z = layer.altitudeToVector3(altitude, altitude).x;
|
|
2450
2448
|
const position = layer.coordinateToVector3(coordinate, z);
|
|
2451
|
-
|
|
2452
|
-
|
|
2453
|
-
|
|
2449
|
+
import_lodash3.default.set(this.properties, "default.position", position);
|
|
2450
|
+
import_lodash3.default.set(this.properties, "default.altitude", altitude);
|
|
2451
|
+
import_lodash3.default.set(this.properties, "default.scale", scale3);
|
|
2454
2452
|
this.getObject3d().position.copy(position);
|
|
2455
2453
|
}
|
|
2456
2454
|
setLineHeight(altitude) {
|
|
@@ -2466,7 +2464,7 @@ var Billboard = class extends import_maptalks.BaseObject {
|
|
|
2466
2464
|
// src/IndoorMap/object3d/SpriteMarker.ts
|
|
2467
2465
|
var import_maptalks2 = require("maptalks.three");
|
|
2468
2466
|
var import_three2 = require("three");
|
|
2469
|
-
var
|
|
2467
|
+
var import_lodash4 = __toESM(require("lodash"));
|
|
2470
2468
|
var DEFAULT_SCALE = 0.05;
|
|
2471
2469
|
var DEFAULT_ALTITUDE = 0;
|
|
2472
2470
|
var DEFAULT_ALPHATEST = 0.3;
|
|
@@ -2497,7 +2495,7 @@ var SpriteMarker = class extends import_maptalks2.BaseObject {
|
|
|
2497
2495
|
this.properties = { ...properties };
|
|
2498
2496
|
const modifiedAltitude = altitude + 2;
|
|
2499
2497
|
this.#default = { options: { scale: scale3, altitude: modifiedAltitude }, material };
|
|
2500
|
-
this.#highlight =
|
|
2498
|
+
this.#highlight = import_lodash4.default.merge({}, DEFAULT_OPTIONS.highlight, highlight);
|
|
2501
2499
|
if (material && material instanceof import_three2.SpriteMaterial)
|
|
2502
2500
|
material.alphaTest = alphaTest;
|
|
2503
2501
|
const sprite = new import_three2.Sprite(material);
|
|
@@ -2506,7 +2504,7 @@ var SpriteMarker = class extends import_maptalks2.BaseObject {
|
|
|
2506
2504
|
obj3d.add(sprite);
|
|
2507
2505
|
const z = layer.altitudeToVector3(modifiedAltitude, modifiedAltitude).x;
|
|
2508
2506
|
const position = layer.coordinateToVector3(coordinate, z);
|
|
2509
|
-
|
|
2507
|
+
import_lodash4.default.set(this.properties, "default.position", position);
|
|
2510
2508
|
this.getObject3d().position.copy(position);
|
|
2511
2509
|
}
|
|
2512
2510
|
// Different objects need to implement their own methods
|
|
@@ -2648,14 +2646,14 @@ var NavigationPath = class extends import_maptalks3.BaseObject {
|
|
|
2648
2646
|
|
|
2649
2647
|
// src/IndoorMap/utils/geometry.ts
|
|
2650
2648
|
var import_center = __toESM(require("@turf/center"));
|
|
2651
|
-
var
|
|
2649
|
+
var import_lodash5 = __toESM(require("lodash"));
|
|
2652
2650
|
var import_line_offset = __toESM(require("@turf/line-offset"));
|
|
2653
2651
|
var getCenterFromGeometry = (geometry) => {
|
|
2654
2652
|
try {
|
|
2655
2653
|
const { type = null, coordinates = null } = geometry;
|
|
2656
2654
|
if (!type || !coordinates) return null;
|
|
2657
2655
|
const centerPoint = (0, import_center.default)(geometry);
|
|
2658
|
-
return
|
|
2656
|
+
return import_lodash5.default.get(centerPoint, "geometry.coordinates");
|
|
2659
2657
|
} catch (error) {
|
|
2660
2658
|
return null;
|
|
2661
2659
|
}
|
|
@@ -2806,7 +2804,7 @@ var createWaterFixture = (feature2, style, options = {}) => {
|
|
|
2806
2804
|
const { geometry, properties } = feature2;
|
|
2807
2805
|
const { allowOverride, inheritFillColorToLine, zIndex } = options;
|
|
2808
2806
|
const symbolStyle = { ...style };
|
|
2809
|
-
if (allowOverride)
|
|
2807
|
+
if (allowOverride) import_lodash6.default.merge(symbolStyle, properties.style);
|
|
2810
2808
|
if (inheritFillColorToLine) symbolStyle.lineColor = symbolStyle.polygonFill;
|
|
2811
2809
|
return new GeometryType[geometry.type](geometry.coordinates, {
|
|
2812
2810
|
properties: {
|
|
@@ -2822,7 +2820,7 @@ var createVegetationFixture = (feature2, style, options = {}) => {
|
|
|
2822
2820
|
const { geometry, properties } = feature2;
|
|
2823
2821
|
const { allowOverride, inheritFillColorToLine, zIndex } = options;
|
|
2824
2822
|
const symbolStyle = { ...style };
|
|
2825
|
-
if (allowOverride)
|
|
2823
|
+
if (allowOverride) import_lodash6.default.merge(symbolStyle, properties.style);
|
|
2826
2824
|
if (inheritFillColorToLine) symbolStyle.lineColor = symbolStyle.polygonFill;
|
|
2827
2825
|
return new GeometryType[geometry.type](geometry.coordinates, {
|
|
2828
2826
|
properties: {
|
|
@@ -2839,8 +2837,8 @@ var createObstructionalFixture = (feature2, style = {}, options = {}) => {
|
|
|
2839
2837
|
const { model3d } = properties;
|
|
2840
2838
|
const { allowOverride, inheritFillColorToLine, zIndex } = options;
|
|
2841
2839
|
const symbolStyle = { ...style };
|
|
2842
|
-
if (!
|
|
2843
|
-
if (allowOverride)
|
|
2840
|
+
if (!import_lodash6.default.isEmpty(model3d)) return;
|
|
2841
|
+
if (allowOverride) import_lodash6.default.merge(symbolStyle, properties.style);
|
|
2844
2842
|
if (inheritFillColorToLine) symbolStyle.lineColor = symbolStyle.polygonFill;
|
|
2845
2843
|
if (geometry.type === "LineString") {
|
|
2846
2844
|
const polygon2 = createPolygonFromLineString(geometry);
|
|
@@ -2910,7 +2908,7 @@ var createPrincipalOpening = (feature2, style, options = {}) => {
|
|
|
2910
2908
|
const { geometry, properties } = feature2;
|
|
2911
2909
|
const { allowOverride, zIndex } = options;
|
|
2912
2910
|
const symbolStyle = { ...style };
|
|
2913
|
-
if (allowOverride)
|
|
2911
|
+
if (allowOverride) import_lodash6.default.merge(symbolStyle, properties.style);
|
|
2914
2912
|
try {
|
|
2915
2913
|
return new import_maptalks4.LineString(geometry.coordinates, {
|
|
2916
2914
|
properties: {
|
|
@@ -2927,7 +2925,7 @@ var createEmergencyExitOpening = (feature2, style, options = {}) => {
|
|
|
2927
2925
|
const { geometry, properties } = feature2;
|
|
2928
2926
|
const { allowOverride, zIndex } = options;
|
|
2929
2927
|
const symbolStyle = { ...style };
|
|
2930
|
-
if (allowOverride)
|
|
2928
|
+
if (allowOverride) import_lodash6.default.merge(symbolStyle, properties.style);
|
|
2931
2929
|
try {
|
|
2932
2930
|
return new import_maptalks4.LineString(geometry.coordinates, {
|
|
2933
2931
|
properties: {
|
|
@@ -2944,7 +2942,7 @@ var createPedestrianOpening = (feature2, style, options = {}) => {
|
|
|
2944
2942
|
const { geometry, properties, id } = feature2;
|
|
2945
2943
|
const { allowOverride, zIndex } = options;
|
|
2946
2944
|
const symbolStyle = { ...style };
|
|
2947
|
-
if (allowOverride)
|
|
2945
|
+
if (allowOverride) import_lodash6.default.merge(symbolStyle, properties.style);
|
|
2948
2946
|
try {
|
|
2949
2947
|
return new import_maptalks4.LineString(geometry.coordinates, {
|
|
2950
2948
|
properties: {
|
|
@@ -2982,9 +2980,9 @@ var create3DMarker = (coordinates, options, material, threeLayer, markerProperti
|
|
|
2982
2980
|
};
|
|
2983
2981
|
var getExtrudeConfigByFeature = (baseExtrudeConfig, feature2 = {}) => {
|
|
2984
2982
|
const { feature_type: featureType } = feature2;
|
|
2985
|
-
const featureExtrudeConfig =
|
|
2986
|
-
const featureCategory =
|
|
2987
|
-
const baseFeatureExtrudeConfig =
|
|
2983
|
+
const featureExtrudeConfig = import_lodash6.default.get(feature2, "properties.extrude");
|
|
2984
|
+
const featureCategory = import_lodash6.default.get(feature2, "properties.category");
|
|
2985
|
+
const baseFeatureExtrudeConfig = import_lodash6.default.get(
|
|
2988
2986
|
baseExtrudeConfig,
|
|
2989
2987
|
`${featureType}.${featureCategory || featureType}`
|
|
2990
2988
|
);
|
|
@@ -3042,50 +3040,50 @@ var createStyledUIMarkerElement = ({
|
|
|
3042
3040
|
var styledFeatureGenerator = (mapTheme) => {
|
|
3043
3041
|
const getElementSymbol = (key) => {
|
|
3044
3042
|
const [featureType] = key.split(".");
|
|
3045
|
-
const featureTypeTheme =
|
|
3043
|
+
const featureTypeTheme = import_lodash6.default.get(mapTheme, `${featureType}.geometry.symbol`);
|
|
3046
3044
|
if (featureType === key) return featureTypeTheme;
|
|
3047
|
-
const categoryTheme =
|
|
3048
|
-
return
|
|
3045
|
+
const categoryTheme = import_lodash6.default.get(mapTheme, `${key}.geometry.symbol`);
|
|
3046
|
+
return import_lodash6.default.merge({}, featureTypeTheme, categoryTheme);
|
|
3049
3047
|
};
|
|
3050
3048
|
const getLabelSymbol = (key) => {
|
|
3051
3049
|
const [featureType] = key.split(".");
|
|
3052
|
-
const featureTypeTheme =
|
|
3053
|
-
const categoryTheme =
|
|
3054
|
-
const mergedSymbol =
|
|
3055
|
-
let symbols =
|
|
3050
|
+
const featureTypeTheme = import_lodash6.default.get(mapTheme, `${featureType}.label`);
|
|
3051
|
+
const categoryTheme = import_lodash6.default.get(mapTheme, `${key}.label`);
|
|
3052
|
+
const mergedSymbol = import_lodash6.default.merge({}, featureTypeTheme, categoryTheme);
|
|
3053
|
+
let symbols = import_lodash6.default.values(import_lodash6.default.map(mergedSymbol, "symbol"));
|
|
3056
3054
|
const markerIndexToMove = symbols.findIndex(
|
|
3057
3055
|
({ elementType }) => elementType === "label.marker"
|
|
3058
3056
|
);
|
|
3059
3057
|
if (markerIndexToMove >= 0) {
|
|
3060
|
-
const markerSymbolToMove =
|
|
3058
|
+
const markerSymbolToMove = import_lodash6.default.pullAt(symbols, markerIndexToMove)[0];
|
|
3061
3059
|
symbols.push(markerSymbolToMove);
|
|
3062
3060
|
}
|
|
3063
3061
|
return symbols;
|
|
3064
3062
|
};
|
|
3065
3063
|
const getUIMarkerSymbol = (key) => {
|
|
3066
3064
|
const [featureType] = key.split(".");
|
|
3067
|
-
const featureTypeTheme =
|
|
3068
|
-
const categoryTheme =
|
|
3069
|
-
const mergedSymbol =
|
|
3070
|
-
const symbol =
|
|
3065
|
+
const featureTypeTheme = import_lodash6.default.get(mapTheme, `${featureType}.ui.marker`);
|
|
3066
|
+
const categoryTheme = import_lodash6.default.get(mapTheme, `${key}.ui.marker`);
|
|
3067
|
+
const mergedSymbol = import_lodash6.default.merge({}, featureTypeTheme, categoryTheme);
|
|
3068
|
+
const symbol = import_lodash6.default.get(mergedSymbol, "symbol");
|
|
3071
3069
|
return symbol;
|
|
3072
3070
|
};
|
|
3073
3071
|
const getUIMarkerOptions = (key) => {
|
|
3074
3072
|
const [featureType] = key.split(".");
|
|
3075
|
-
const featureTypeTheme =
|
|
3076
|
-
const categoryTheme =
|
|
3077
|
-
const mergedSymbol =
|
|
3078
|
-
const options =
|
|
3073
|
+
const featureTypeTheme = import_lodash6.default.get(mapTheme, `${featureType}.ui.marker`);
|
|
3074
|
+
const categoryTheme = import_lodash6.default.get(mapTheme, `${key}.ui.marker`);
|
|
3075
|
+
const mergedSymbol = import_lodash6.default.merge({}, featureTypeTheme, categoryTheme);
|
|
3076
|
+
const options = import_lodash6.default.get(mergedSymbol, "options");
|
|
3079
3077
|
return options;
|
|
3080
3078
|
};
|
|
3081
3079
|
const getLabelOptions = (key) => {
|
|
3082
3080
|
const [featureType] = key.split(".");
|
|
3083
|
-
const featureTypeSymbol =
|
|
3084
|
-
const categorySymbol =
|
|
3085
|
-
const mergedSymbol =
|
|
3086
|
-
return
|
|
3081
|
+
const featureTypeSymbol = import_lodash6.default.get(mapTheme, `${featureType}.label`);
|
|
3082
|
+
const categorySymbol = import_lodash6.default.get(mapTheme, `${key}.label`);
|
|
3083
|
+
const mergedSymbol = import_lodash6.default.merge({}, featureTypeSymbol, categorySymbol);
|
|
3084
|
+
return import_lodash6.default.reduce(
|
|
3087
3085
|
mergedSymbol,
|
|
3088
|
-
(acc, symbol) => ({ ...acc, ...
|
|
3086
|
+
(acc, symbol) => ({ ...acc, ...import_lodash6.default.get(symbol, "options", {}) }),
|
|
3089
3087
|
{}
|
|
3090
3088
|
);
|
|
3091
3089
|
};
|
|
@@ -3100,13 +3098,13 @@ var styledFeatureGenerator = (mapTheme) => {
|
|
|
3100
3098
|
};
|
|
3101
3099
|
const generateSpriteHighlightMarkerOption = () => {
|
|
3102
3100
|
return SPRITE_HIGHLIGHT_MARKER_FEATURE.reduce((acc, featCate) => {
|
|
3103
|
-
const categoryKey =
|
|
3101
|
+
const categoryKey = import_lodash6.default.last(featCate.split("-"));
|
|
3104
3102
|
const defaultLabelSymbol = getLabelSymbol(categoryKey);
|
|
3105
3103
|
const highlightLabelSymbol = getLabelSymbol(featCate);
|
|
3106
3104
|
const [defaultBase, defaultIcon] = defaultLabelSymbol;
|
|
3107
3105
|
const [highlightBase, highlightIcon] = highlightLabelSymbol;
|
|
3108
|
-
const base =
|
|
3109
|
-
const icon =
|
|
3106
|
+
const base = import_lodash6.default.merge({}, defaultBase, highlightBase);
|
|
3107
|
+
const icon = import_lodash6.default.merge({}, defaultIcon, highlightIcon);
|
|
3110
3108
|
const material = createSpriteMaterialByLabelSymbol([base, icon]);
|
|
3111
3109
|
const options = getLabelOptions(featCate);
|
|
3112
3110
|
return { ...acc, [featCate]: { material, options } };
|
|
@@ -3116,22 +3114,22 @@ var styledFeatureGenerator = (mapTheme) => {
|
|
|
3116
3114
|
const spriteHighlightMarkerOptionObj = generateSpriteHighlightMarkerOption();
|
|
3117
3115
|
const getElementOptions = (key) => {
|
|
3118
3116
|
const [featureType] = key.split(".");
|
|
3119
|
-
const featureTypeOptions =
|
|
3117
|
+
const featureTypeOptions = import_lodash6.default.get(
|
|
3120
3118
|
mapTheme,
|
|
3121
3119
|
`${featureType}.geometry.options`
|
|
3122
3120
|
);
|
|
3123
|
-
const categoryOptions =
|
|
3124
|
-
return
|
|
3121
|
+
const categoryOptions = import_lodash6.default.get(mapTheme, `${key}.geometry.options`);
|
|
3122
|
+
return import_lodash6.default.merge({}, featureTypeOptions, categoryOptions);
|
|
3125
3123
|
};
|
|
3126
3124
|
const createOccupantMarker = (feature2, locatedFeature, mapConfig) => {
|
|
3127
3125
|
const { textMarkerType, featureExtrudeConfig } = getFeatureMarkerConfig(
|
|
3128
3126
|
feature2,
|
|
3129
3127
|
mapConfig
|
|
3130
3128
|
);
|
|
3131
|
-
const markerHeight =
|
|
3129
|
+
const markerHeight = import_lodash6.default.get(featureExtrudeConfig, "height", 0);
|
|
3132
3130
|
const { properties, id, feature_type } = feature2;
|
|
3133
3131
|
if (!properties.anchor) return;
|
|
3134
|
-
const mainLocationId =
|
|
3132
|
+
const mainLocationId = import_lodash6.default.get(properties, "unit.id") || import_lodash6.default.get(properties, "kiosk.id");
|
|
3135
3133
|
const isMainLocationFeature = mainLocationId === locatedFeature?.id;
|
|
3136
3134
|
const { geometry: mainLocationGeometry } = properties?.anchor;
|
|
3137
3135
|
const geometry = isMainLocationFeature ? mainLocationGeometry : (0, import_center2.default)(locatedFeature)?.geometry;
|
|
@@ -3141,7 +3139,7 @@ var styledFeatureGenerator = (mapTheme) => {
|
|
|
3141
3139
|
category: properties.category,
|
|
3142
3140
|
altitude: getAltitude(properties)
|
|
3143
3141
|
};
|
|
3144
|
-
const occupantName =
|
|
3142
|
+
const occupantName = import_lodash6.default.isEmpty(properties.short_name) ? properties.name : properties.short_name;
|
|
3145
3143
|
if (locatedFeature) {
|
|
3146
3144
|
const { feature_type: feature_type2, properties: properties2 } = locatedFeature;
|
|
3147
3145
|
const { category } = properties2;
|
|
@@ -3155,21 +3153,21 @@ var styledFeatureGenerator = (mapTheme) => {
|
|
|
3155
3153
|
}
|
|
3156
3154
|
return requestedType;
|
|
3157
3155
|
};
|
|
3158
|
-
const logoUrl =
|
|
3159
|
-
const requestedRenderType =
|
|
3156
|
+
const logoUrl = import_lodash6.default.get(properties, "logo.url");
|
|
3157
|
+
const requestedRenderType = import_lodash6.default.get(properties, "render_type", "Name");
|
|
3160
3158
|
const renderType = getValidatedRenderType(requestedRenderType, logoUrl);
|
|
3161
3159
|
if (renderType === "Label") return null;
|
|
3162
3160
|
const renderPriority = properties.render_priority || 3;
|
|
3163
|
-
const labelSymbol = getLabelSymbol(`occupant-${
|
|
3164
|
-
const markerSymbol =
|
|
3165
|
-
const coordinates =
|
|
3161
|
+
const labelSymbol = getLabelSymbol(`occupant-${import_lodash6.default.toLower(renderType)}`);
|
|
3162
|
+
const markerSymbol = import_lodash6.default.last(labelSymbol);
|
|
3163
|
+
const coordinates = import_lodash6.default.get(geometry, "coordinates");
|
|
3166
3164
|
const priorityLabelSymbol = getLabelSymbol(
|
|
3167
|
-
`occupant-${
|
|
3165
|
+
`occupant-${import_lodash6.default.toLower(renderType)}-${renderPriority}`
|
|
3168
3166
|
);
|
|
3169
|
-
const priorityMarkerSymbol =
|
|
3167
|
+
const priorityMarkerSymbol = import_lodash6.default.last(priorityLabelSymbol) || {};
|
|
3170
3168
|
switch (renderType) {
|
|
3171
3169
|
case "Logo":
|
|
3172
|
-
|
|
3170
|
+
import_lodash6.default.set(priorityMarkerSymbol, "markerFile", logoUrl);
|
|
3173
3171
|
return new import_maptalks4.Marker(coordinates, {
|
|
3174
3172
|
properties: {
|
|
3175
3173
|
altitude: getAltitude(properties) + markerHeight,
|
|
@@ -3230,13 +3228,13 @@ var styledFeatureGenerator = (mapTheme) => {
|
|
|
3230
3228
|
});
|
|
3231
3229
|
}
|
|
3232
3230
|
const uiMarkerSymbol = getUIMarkerSymbol(
|
|
3233
|
-
`occupant-${
|
|
3231
|
+
`occupant-${import_lodash6.default.toLower(renderType)}`
|
|
3234
3232
|
);
|
|
3235
3233
|
const uiMarkerPrioritySymbol = getUIMarkerSymbol(
|
|
3236
|
-
`occupant-${
|
|
3234
|
+
`occupant-${import_lodash6.default.toLower(renderType)}-${renderPriority}`
|
|
3237
3235
|
);
|
|
3238
3236
|
const uiMarkerPriorityOptions = getUIMarkerOptions(
|
|
3239
|
-
`occupant-${
|
|
3237
|
+
`occupant-${import_lodash6.default.toLower(renderType)}-${renderPriority}`
|
|
3240
3238
|
);
|
|
3241
3239
|
const style = { ...uiMarkerSymbol, ...uiMarkerPrioritySymbol };
|
|
3242
3240
|
return new import_maptalks4.ui.UIMarker(coordinates, {
|
|
@@ -3258,7 +3256,7 @@ var styledFeatureGenerator = (mapTheme) => {
|
|
|
3258
3256
|
const { category, ordinal, style = {} } = properties;
|
|
3259
3257
|
const elementStyle = getElementSymbol(`${feature_type}.${category}`);
|
|
3260
3258
|
const { allowOverride } = getElementOptions(`${feature_type}.${category}`);
|
|
3261
|
-
if (allowOverride)
|
|
3259
|
+
if (allowOverride) import_lodash6.default.merge(elementStyle, style);
|
|
3262
3260
|
const { polygonFill: color } = elementStyle;
|
|
3263
3261
|
const featureProperty = {
|
|
3264
3262
|
id,
|
|
@@ -3347,9 +3345,9 @@ var styledFeatureGenerator = (mapTheme) => {
|
|
|
3347
3345
|
feature2,
|
|
3348
3346
|
mapConfig
|
|
3349
3347
|
);
|
|
3350
|
-
const markerHeight =
|
|
3348
|
+
const markerHeight = import_lodash6.default.get(featureExtrudeConfig, "height");
|
|
3351
3349
|
const { id, properties } = feature2;
|
|
3352
|
-
const geometry =
|
|
3350
|
+
const geometry = import_lodash6.default.get(feature2, "geometry") || import_lodash6.default.get(feature2, "properties.anchor.geometry");
|
|
3353
3351
|
const coordinates = getCenterFromGeometry(geometry);
|
|
3354
3352
|
const symbol = getElementSymbol("pin-marker");
|
|
3355
3353
|
try {
|
|
@@ -3369,10 +3367,10 @@ var styledFeatureGenerator = (mapTheme) => {
|
|
|
3369
3367
|
feature2,
|
|
3370
3368
|
mapConfig
|
|
3371
3369
|
);
|
|
3372
|
-
const markerHeight =
|
|
3370
|
+
const markerHeight = import_lodash6.default.get(featureExtrudeConfig, "height", 0);
|
|
3373
3371
|
const { properties, id } = feature2;
|
|
3374
3372
|
const { geometry } = properties.anchor;
|
|
3375
|
-
const logoUrl =
|
|
3373
|
+
const logoUrl = import_lodash6.default.get(properties, "logo.url");
|
|
3376
3374
|
const coordinates = getCenterFromGeometry(geometry);
|
|
3377
3375
|
const [markerBase, markerLabel] = getLabelSymbol(
|
|
3378
3376
|
"highlighted-logo-marker"
|
|
@@ -3442,7 +3440,7 @@ var styledFeatureGenerator = (mapTheme) => {
|
|
|
3442
3440
|
feature2,
|
|
3443
3441
|
mapConfig
|
|
3444
3442
|
);
|
|
3445
|
-
const markerHeight =
|
|
3443
|
+
const markerHeight = import_lodash6.default.get(featureExtrudeConfig, "height");
|
|
3446
3444
|
const { id, feature_type, properties } = feature2;
|
|
3447
3445
|
if (!properties.anchor) return;
|
|
3448
3446
|
const markerProperties = {
|
|
@@ -3452,8 +3450,8 @@ var styledFeatureGenerator = (mapTheme) => {
|
|
|
3452
3450
|
altitude: getAltitude(properties) + markerHeight
|
|
3453
3451
|
};
|
|
3454
3452
|
const { geometry } = properties?.anchor;
|
|
3455
|
-
const coordinates =
|
|
3456
|
-
const logoUrl =
|
|
3453
|
+
const coordinates = import_lodash6.default.get(geometry, "coordinates");
|
|
3454
|
+
const logoUrl = import_lodash6.default.get(properties, "logo.url");
|
|
3457
3455
|
if (markerSymbol) {
|
|
3458
3456
|
return new import_maptalks4.Marker(coordinates, {
|
|
3459
3457
|
properties: markerProperties,
|
|
@@ -3468,8 +3466,8 @@ var styledFeatureGenerator = (mapTheme) => {
|
|
|
3468
3466
|
});
|
|
3469
3467
|
}
|
|
3470
3468
|
const labelSymbol = getLabelSymbol("highlight-occupant-logo");
|
|
3471
|
-
const priorityMarkerSymbol =
|
|
3472
|
-
|
|
3469
|
+
const priorityMarkerSymbol = import_lodash6.default.last(labelSymbol) || {};
|
|
3470
|
+
import_lodash6.default.set(priorityMarkerSymbol, "markerFile", logoUrl);
|
|
3473
3471
|
return new import_maptalks4.Marker(coordinates, {
|
|
3474
3472
|
properties: markerProperties,
|
|
3475
3473
|
symbol: labelSymbol
|
|
@@ -3477,14 +3475,14 @@ var styledFeatureGenerator = (mapTheme) => {
|
|
|
3477
3475
|
},
|
|
3478
3476
|
createHighlight2DAmenityMarkerFrom3DMarker: (feature2, mapConfig) => {
|
|
3479
3477
|
const { coordinates, units, kiosk } = feature2;
|
|
3480
|
-
const amenityLocatedUnit =
|
|
3478
|
+
const amenityLocatedUnit = import_lodash6.default.first(units);
|
|
3481
3479
|
const unitConfig = getExtrudeConfigByFeature(
|
|
3482
3480
|
mapConfig,
|
|
3483
3481
|
amenityLocatedUnit
|
|
3484
3482
|
);
|
|
3485
|
-
const unitHeight =
|
|
3483
|
+
const unitHeight = import_lodash6.default.get(unitConfig, "height", 0);
|
|
3486
3484
|
const kioskConfig = getExtrudeConfigByFeature(mapConfig, kiosk);
|
|
3487
|
-
const kioskHeight =
|
|
3485
|
+
const kioskHeight = import_lodash6.default.get(kioskConfig, "height", 0);
|
|
3488
3486
|
const markerHeight = unitHeight + kioskHeight;
|
|
3489
3487
|
const symbol = getElementSymbol("highlight-amenity-marker");
|
|
3490
3488
|
return new import_maptalks4.Marker(coordinates, {
|
|
@@ -3560,7 +3558,7 @@ var styledFeatureGenerator = (mapTheme) => {
|
|
|
3560
3558
|
}
|
|
3561
3559
|
},
|
|
3562
3560
|
createLineStringFromGeometries: (geometries) => {
|
|
3563
|
-
const mergedCoordinates = (0,
|
|
3561
|
+
const mergedCoordinates = (0, import_lodash6.default)(geometries).map((geometry) => {
|
|
3564
3562
|
switch (geometry.type) {
|
|
3565
3563
|
case "Point":
|
|
3566
3564
|
return [
|
|
@@ -3669,29 +3667,29 @@ var styledFeatureGenerator = (mapTheme) => {
|
|
|
3669
3667
|
create3DAmenityMarker: (feature2, threeLayer, config) => {
|
|
3670
3668
|
const { geometry, properties, feature_type, id } = feature2;
|
|
3671
3669
|
const { category, units, kiosk, is_clickable } = properties;
|
|
3672
|
-
const amenityLocatedUnit =
|
|
3673
|
-
const isLocatedUnitModel3dAvailable = !
|
|
3670
|
+
const amenityLocatedUnit = import_lodash6.default.first(units);
|
|
3671
|
+
const isLocatedUnitModel3dAvailable = !import_lodash6.default.isEmpty(
|
|
3674
3672
|
amenityLocatedUnit?.properties?.model3d
|
|
3675
3673
|
);
|
|
3676
|
-
const isLocatedKioskModel3dAvailable = !
|
|
3674
|
+
const isLocatedKioskModel3dAvailable = !import_lodash6.default.isEmpty(
|
|
3677
3675
|
kiosk?.properties?.model3d
|
|
3678
3676
|
);
|
|
3679
3677
|
const unitConfig = getExtrudeConfigByFeature(config, amenityLocatedUnit);
|
|
3680
|
-
const unitHeight = isLocatedUnitModel3dAvailable ? 0 :
|
|
3678
|
+
const unitHeight = isLocatedUnitModel3dAvailable ? 0 : import_lodash6.default.get(unitConfig, "height", 0);
|
|
3681
3679
|
const kioskConfig = getExtrudeConfigByFeature(config, kiosk);
|
|
3682
|
-
const kioskHeight = isLocatedKioskModel3dAvailable ? 0 :
|
|
3683
|
-
const coordinates =
|
|
3680
|
+
const kioskHeight = isLocatedKioskModel3dAvailable ? 0 : import_lodash6.default.get(kioskConfig, "height", 0);
|
|
3681
|
+
const coordinates = import_lodash6.default.get(geometry, "coordinates");
|
|
3684
3682
|
const markerProperties = {
|
|
3685
3683
|
...properties,
|
|
3686
3684
|
coordinates,
|
|
3687
3685
|
id,
|
|
3688
3686
|
feature_type
|
|
3689
3687
|
};
|
|
3690
|
-
const material =
|
|
3688
|
+
const material = import_lodash6.default.get(
|
|
3691
3689
|
spriteMarkerMaterialObj,
|
|
3692
3690
|
`${feature_type}.${category}`
|
|
3693
3691
|
);
|
|
3694
|
-
const highlightOptions =
|
|
3692
|
+
const highlightOptions = import_lodash6.default.get(
|
|
3695
3693
|
spriteHighlightMarkerOptionObj,
|
|
3696
3694
|
`${PREFIX_HIGHLIGHTED_SYMBOL_KEY}-${feature_type}.${category}`
|
|
3697
3695
|
);
|
|
@@ -3714,24 +3712,24 @@ var styledFeatureGenerator = (mapTheme) => {
|
|
|
3714
3712
|
const { category, unit, kiosk } = properties;
|
|
3715
3713
|
const amenityLocation = kiosk || unit;
|
|
3716
3714
|
const locationConfig = getExtrudeConfigByFeature(config, amenityLocation);
|
|
3717
|
-
const coordinates =
|
|
3715
|
+
const coordinates = import_lodash6.default.get(geometry, "coordinates");
|
|
3718
3716
|
const markerProperties = {
|
|
3719
3717
|
...properties,
|
|
3720
3718
|
coordinates,
|
|
3721
3719
|
id,
|
|
3722
3720
|
feature_type
|
|
3723
3721
|
};
|
|
3724
|
-
const material =
|
|
3722
|
+
const material = import_lodash6.default.get(
|
|
3725
3723
|
spriteMarkerMaterialObj,
|
|
3726
3724
|
`${feature_type}.${category}`
|
|
3727
3725
|
);
|
|
3728
|
-
const highlightOptions =
|
|
3726
|
+
const highlightOptions = import_lodash6.default.get(
|
|
3729
3727
|
spriteHighlightMarkerOptionObj,
|
|
3730
3728
|
`${PREFIX_HIGHLIGHTED_SYMBOL_KEY}-${feature_type}.${category}`
|
|
3731
3729
|
);
|
|
3732
3730
|
const options = {
|
|
3733
3731
|
scale: 0.05,
|
|
3734
|
-
altitude:
|
|
3732
|
+
altitude: import_lodash6.default.get(locationConfig, "height", 0),
|
|
3735
3733
|
highlight: highlightOptions
|
|
3736
3734
|
};
|
|
3737
3735
|
return create3DMarker(
|
|
@@ -3747,24 +3745,24 @@ var styledFeatureGenerator = (mapTheme) => {
|
|
|
3747
3745
|
const { category, unit, kiosk } = properties;
|
|
3748
3746
|
const amenityLocation = kiosk || unit;
|
|
3749
3747
|
const locationConfig = getExtrudeConfigByFeature(config, amenityLocation);
|
|
3750
|
-
const coordinates =
|
|
3748
|
+
const coordinates = import_lodash6.default.get(geometry, "coordinates");
|
|
3751
3749
|
const markerProperties = {
|
|
3752
3750
|
...properties,
|
|
3753
3751
|
coordinates,
|
|
3754
3752
|
id,
|
|
3755
3753
|
feature_type
|
|
3756
3754
|
};
|
|
3757
|
-
const material =
|
|
3755
|
+
const material = import_lodash6.default.get(
|
|
3758
3756
|
spriteMarkerMaterialObj,
|
|
3759
3757
|
`${feature_type}.${category}`
|
|
3760
3758
|
);
|
|
3761
|
-
const highlightOptions =
|
|
3759
|
+
const highlightOptions = import_lodash6.default.get(
|
|
3762
3760
|
spriteHighlightMarkerOptionObj,
|
|
3763
3761
|
`${PREFIX_HIGHLIGHTED_SYMBOL_KEY}-${feature_type}.${category}`
|
|
3764
3762
|
);
|
|
3765
3763
|
const options = {
|
|
3766
3764
|
scale: 0.05,
|
|
3767
|
-
altitude:
|
|
3765
|
+
altitude: import_lodash6.default.get(locationConfig, "height", 0),
|
|
3768
3766
|
highlight: highlightOptions
|
|
3769
3767
|
};
|
|
3770
3768
|
return create3DMarker(
|
|
@@ -3776,13 +3774,13 @@ var styledFeatureGenerator = (mapTheme) => {
|
|
|
3776
3774
|
);
|
|
3777
3775
|
},
|
|
3778
3776
|
createExtrudedUnit: (unit, threeLayer, options) => {
|
|
3779
|
-
const extrudeHeight =
|
|
3777
|
+
const extrudeHeight = import_lodash6.default.get(options, "height");
|
|
3780
3778
|
if (!extrudeHeight) return;
|
|
3781
3779
|
const unitProperty = getFeatureProperties(unit);
|
|
3782
3780
|
const options3d = {
|
|
3783
3781
|
// TODO: Move to extrude config later
|
|
3784
3782
|
offset: -0.1,
|
|
3785
|
-
altitude:
|
|
3783
|
+
altitude: import_lodash6.default.get(options, "altitude", 0)
|
|
3786
3784
|
};
|
|
3787
3785
|
const color = unitProperty.defaultColor;
|
|
3788
3786
|
if (color === "transparent") return;
|
|
@@ -3825,14 +3823,14 @@ var EXCEPT_AMENITY_LOCATION_CATEGORIES = [
|
|
|
3825
3823
|
"unspecified"
|
|
3826
3824
|
];
|
|
3827
3825
|
var getLocationByAmenity = (feature2) => {
|
|
3828
|
-
const unit =
|
|
3829
|
-
const unitCategory =
|
|
3826
|
+
const unit = import_lodash6.default.get(feature2, "properties.units[0]", null);
|
|
3827
|
+
const unitCategory = import_lodash6.default.get(unit, "properties.category");
|
|
3830
3828
|
if (!unit) return feature2.id;
|
|
3831
3829
|
return EXCEPT_AMENITY_LOCATION_CATEGORIES.includes(unitCategory) ? feature2 : unit;
|
|
3832
3830
|
};
|
|
3833
3831
|
var getLocationByOccupant = (feature2) => {
|
|
3834
|
-
const kiosk =
|
|
3835
|
-
const unit =
|
|
3832
|
+
const kiosk = import_lodash6.default.get(feature2, "properties.kiosk", null);
|
|
3833
|
+
const unit = import_lodash6.default.get(feature2, "properties.anchor.properties.unit", null);
|
|
3836
3834
|
return kiosk || unit;
|
|
3837
3835
|
};
|
|
3838
3836
|
var getLocationIdByFeature = (feature2) => {
|
|
@@ -3860,10 +3858,10 @@ var getFeatureByLocationId = (id, features = []) => {
|
|
|
3860
3858
|
});
|
|
3861
3859
|
};
|
|
3862
3860
|
var isClickableFeature = (feature2) => {
|
|
3863
|
-
const isClickable =
|
|
3861
|
+
const isClickable = import_lodash6.default.get(feature2, "properties.is_clickable");
|
|
3864
3862
|
switch (feature2?.feature_type) {
|
|
3865
3863
|
case "amenity":
|
|
3866
|
-
return
|
|
3864
|
+
return import_lodash6.default.isNull(isClickable) ? true : isClickable;
|
|
3867
3865
|
case "occupant":
|
|
3868
3866
|
return true;
|
|
3869
3867
|
default:
|
|
@@ -3881,15 +3879,15 @@ var getLocationByFeature = (feature2) => {
|
|
|
3881
3879
|
}
|
|
3882
3880
|
};
|
|
3883
3881
|
var getRelatedLocationsByOccupant = (feature2) => {
|
|
3884
|
-
const kiosks =
|
|
3885
|
-
const units =
|
|
3882
|
+
const kiosks = import_lodash6.default.get(feature2, "properties.kiosks", []);
|
|
3883
|
+
const units = import_lodash6.default.get(feature2, "properties.units", []);
|
|
3886
3884
|
return [...kiosks, ...units];
|
|
3887
3885
|
};
|
|
3888
3886
|
var getRelatedLocationsByAmenity = (feature2) => {
|
|
3889
|
-
const units =
|
|
3887
|
+
const units = import_lodash6.default.get(feature2, "properties.units", []);
|
|
3890
3888
|
if (units.length === 0) return [feature2];
|
|
3891
3889
|
return units.filter((unit) => {
|
|
3892
|
-
const unitCategory =
|
|
3890
|
+
const unitCategory = import_lodash6.default.get(unit, "properties.category");
|
|
3893
3891
|
return !EXCEPT_AMENITY_LOCATION_CATEGORIES.includes(unitCategory);
|
|
3894
3892
|
});
|
|
3895
3893
|
};
|
|
@@ -3915,8 +3913,8 @@ var getRelatedLocationsByFeature = (feature2) => {
|
|
|
3915
3913
|
};
|
|
3916
3914
|
var getOrdinalByLocationId = (locationId, feature2) => {
|
|
3917
3915
|
if (!feature2) return null;
|
|
3918
|
-
const mainUnit =
|
|
3919
|
-
const mainKiosk =
|
|
3916
|
+
const mainUnit = import_lodash6.default.get(feature2, "properties.unit");
|
|
3917
|
+
const mainKiosk = import_lodash6.default.get(feature2, "properties.kiosk");
|
|
3920
3918
|
const relatedLocations = getRelatedLocationsByFeature(feature2);
|
|
3921
3919
|
const allLocations = [mainUnit, mainKiosk, ...relatedLocations].filter(
|
|
3922
3920
|
Boolean
|
|
@@ -3924,7 +3922,7 @@ var getOrdinalByLocationId = (locationId, feature2) => {
|
|
|
3924
3922
|
const targetLocation = allLocations.find(
|
|
3925
3923
|
(location) => location.id === locationId
|
|
3926
3924
|
);
|
|
3927
|
-
return targetLocation ?
|
|
3925
|
+
return targetLocation ? import_lodash6.default.get(targetLocation, "properties.level.properties.ordinal") || import_lodash6.default.get(targetLocation, "properties.ordinal") : null;
|
|
3928
3926
|
};
|
|
3929
3927
|
|
|
3930
3928
|
// src/IndoorMap/utils/math.ts
|
|
@@ -4133,7 +4131,7 @@ var CameraManager = class {
|
|
|
4133
4131
|
};
|
|
4134
4132
|
|
|
4135
4133
|
// src/IndoorMap/renderer/RendererManager.ts
|
|
4136
|
-
var
|
|
4134
|
+
var import_lodash9 = require("lodash");
|
|
4137
4135
|
var import_center3 = require("@turf/center");
|
|
4138
4136
|
var THREE4 = __toESM(require("three"));
|
|
4139
4137
|
|
|
@@ -4154,7 +4152,7 @@ var maptalks3 = __toESM(require("maptalks-gl"));
|
|
|
4154
4152
|
var import_maptalks6 = require("maptalks.three");
|
|
4155
4153
|
var import_three5 = require("three");
|
|
4156
4154
|
var import_d3plus_shape = require("d3plus-shape");
|
|
4157
|
-
var
|
|
4155
|
+
var import_lodash7 = require("lodash");
|
|
4158
4156
|
var OPTIONS3 = {
|
|
4159
4157
|
// Allowing click through and prevent interaction
|
|
4160
4158
|
interactive: false,
|
|
@@ -4172,9 +4170,9 @@ var defaultFlatLabelOptions = {
|
|
|
4172
4170
|
textBaseline: "middle",
|
|
4173
4171
|
fillStyle: "#000"
|
|
4174
4172
|
};
|
|
4175
|
-
var defaultRectAngleToCalc = (0,
|
|
4173
|
+
var defaultRectAngleToCalc = (0, import_lodash7.range)(-90, 92, 2);
|
|
4176
4174
|
var getMaterial = (text, flatLabelOptions) => {
|
|
4177
|
-
const options = (0,
|
|
4175
|
+
const options = (0, import_lodash7.merge)({}, defaultFlatLabelOptions, flatLabelOptions);
|
|
4178
4176
|
const {
|
|
4179
4177
|
fontSize: initialFontSize,
|
|
4180
4178
|
fontFamily,
|
|
@@ -4227,12 +4225,12 @@ var getMaterial = (text, flatLabelOptions) => {
|
|
|
4227
4225
|
const maxWidth = SIZE - 2 * margin;
|
|
4228
4226
|
texts = wrapText(ctx, text, maxWidth);
|
|
4229
4227
|
}
|
|
4230
|
-
let textWidth = (0,
|
|
4228
|
+
let textWidth = (0, import_lodash7.max)(texts.map((text2) => ctx.measureText(text2).width));
|
|
4231
4229
|
let scale3 = 1;
|
|
4232
4230
|
while (scale3 > 0 && textWidth + 2 * margin > SIZE) {
|
|
4233
4231
|
scale3 -= scaleStep;
|
|
4234
4232
|
ctx.font = `${fontWeight} ${scale3 * fontSize}px "${fontFamily}", Arial`;
|
|
4235
|
-
textWidth = (0,
|
|
4233
|
+
textWidth = (0, import_lodash7.max)(texts.map((text2) => ctx.measureText(text2).width));
|
|
4236
4234
|
}
|
|
4237
4235
|
const center2 = { x: 0.5 * SIZE, y: 0.5 * SIZE };
|
|
4238
4236
|
if (scale3 > scaleMin) {
|
|
@@ -4300,7 +4298,7 @@ var GroundLabel = class extends import_maptalks6.BaseObject {
|
|
|
4300
4298
|
strokeStyle,
|
|
4301
4299
|
lineWidth
|
|
4302
4300
|
});
|
|
4303
|
-
const rectAngles = (0,
|
|
4301
|
+
const rectAngles = (0, import_lodash7.isArray)(angle) ? angle : [angle];
|
|
4304
4302
|
material.needsUpdate = true;
|
|
4305
4303
|
const rect = (0, import_d3plus_shape.largestRect)(bound, {
|
|
4306
4304
|
cache: true,
|
|
@@ -4373,32 +4371,32 @@ var GroundLabel = class extends import_maptalks6.BaseObject {
|
|
|
4373
4371
|
return { x: this.#offsetX, y: this.#offsetY };
|
|
4374
4372
|
}
|
|
4375
4373
|
set offsetX(value) {
|
|
4376
|
-
if ((0,
|
|
4374
|
+
if ((0, import_lodash7.isNumber)(value)) {
|
|
4377
4375
|
this.#offsetX = value;
|
|
4378
4376
|
this.#updatePosition();
|
|
4379
4377
|
}
|
|
4380
4378
|
}
|
|
4381
4379
|
set offsetY(value) {
|
|
4382
|
-
if ((0,
|
|
4380
|
+
if ((0, import_lodash7.isNumber)(value)) {
|
|
4383
4381
|
this.#offsetY = value;
|
|
4384
4382
|
this.#updatePosition();
|
|
4385
4383
|
}
|
|
4386
4384
|
}
|
|
4387
4385
|
set angle(newAngle) {
|
|
4388
|
-
if ((0,
|
|
4386
|
+
if ((0, import_lodash7.isNumber)(newAngle)) {
|
|
4389
4387
|
this.#angle = newAngle;
|
|
4390
4388
|
this.getObject3d().rotation.z = Math.PI / 180 * this.#angle;
|
|
4391
4389
|
}
|
|
4392
4390
|
}
|
|
4393
4391
|
setOffset(offsetX, offsetY) {
|
|
4394
|
-
if ((0,
|
|
4392
|
+
if ((0, import_lodash7.isNumber)(offsetX) && (0, import_lodash7.isNumber)(offsetY)) {
|
|
4395
4393
|
this.#offsetX = offsetX;
|
|
4396
4394
|
this.#offsetY = offsetY;
|
|
4397
4395
|
this.#updatePosition();
|
|
4398
4396
|
}
|
|
4399
4397
|
}
|
|
4400
4398
|
addOffset(deltaX, deltaY) {
|
|
4401
|
-
if ((0,
|
|
4399
|
+
if ((0, import_lodash7.isNumber)(deltaX) && (0, import_lodash7.isNumber)(deltaY)) {
|
|
4402
4400
|
this.#offsetX += deltaX;
|
|
4403
4401
|
this.#offsetY += deltaY;
|
|
4404
4402
|
this.#updatePosition();
|
|
@@ -4964,7 +4962,7 @@ var THREE3 = __toESM(require("three"));
|
|
|
4964
4962
|
var import_maptalks8 = require("maptalks");
|
|
4965
4963
|
var THREE2 = __toESM(require("three"));
|
|
4966
4964
|
var import_maptalks9 = require("maptalks.three");
|
|
4967
|
-
var
|
|
4965
|
+
var import_lodash8 = require("lodash");
|
|
4968
4966
|
|
|
4969
4967
|
// src/IndoorMap/renderer/utils/interpolateStops.ts
|
|
4970
4968
|
var interpolateStops = ({ stops }, zoom) => {
|
|
@@ -5059,7 +5057,7 @@ var TextSpriteMarker = class extends import_maptalks9.BaseObject {
|
|
|
5059
5057
|
const paragraphs = String(text).split("\n");
|
|
5060
5058
|
const wrappedLines = [];
|
|
5061
5059
|
paragraphs.forEach((paragraph) => {
|
|
5062
|
-
if ((0,
|
|
5060
|
+
if ((0, import_lodash8.isNil)(maxWidth) || isNaN(maxWidth)) {
|
|
5063
5061
|
wrappedLines.push(paragraph);
|
|
5064
5062
|
return;
|
|
5065
5063
|
}
|
|
@@ -5120,7 +5118,7 @@ var TextSpriteMarker = class extends import_maptalks9.BaseObject {
|
|
|
5120
5118
|
const altitude = (options.altitude || 0) + this.#altitudeOffset;
|
|
5121
5119
|
const z = layer.altitudeToVector3(altitude, altitude).x;
|
|
5122
5120
|
const position = layer.coordinateToVector3(this._coordinate, z);
|
|
5123
|
-
(0,
|
|
5121
|
+
(0, import_lodash8.set)(this.properties, "default.position", position);
|
|
5124
5122
|
this.getObject3d().position.copy(position);
|
|
5125
5123
|
}
|
|
5126
5124
|
_animation() {
|
|
@@ -5869,7 +5867,7 @@ var RendererManager = class extends EventTarget {
|
|
|
5869
5867
|
if (this.#isClicked) return;
|
|
5870
5868
|
this.#isClicked = true;
|
|
5871
5869
|
const onClickElement = this.#onClickElement;
|
|
5872
|
-
if (!(0,
|
|
5870
|
+
if (!(0, import_lodash9.isFunction)(onClickElement)) return;
|
|
5873
5871
|
this.#onClickElement(e);
|
|
5874
5872
|
this.#isClicked = false;
|
|
5875
5873
|
};
|
|
@@ -5922,7 +5920,7 @@ var RendererManager = class extends EventTarget {
|
|
|
5922
5920
|
});
|
|
5923
5921
|
units.filter((u4) => u4.properties.category === "room").forEach((unit) => {
|
|
5924
5922
|
const openingRelationships = relationships.filter((r) => r.properties.origin?.id === unit.id || r.properties.destination?.id === unit.id);
|
|
5925
|
-
const roomOpenings = (0,
|
|
5923
|
+
const roomOpenings = (0, import_lodash9.compact)(openingRelationships.map((rel) => {
|
|
5926
5924
|
const openingId = rel?.properties.intermediary[0].id;
|
|
5927
5925
|
return openings.find((o) => o.id === openingId);
|
|
5928
5926
|
}));
|
|
@@ -6010,7 +6008,7 @@ var RendererManager = class extends EventTarget {
|
|
|
6010
6008
|
this.markerRenderer.showMarkers(markers, ordinal - baseOrdinal);
|
|
6011
6009
|
}
|
|
6012
6010
|
} else {
|
|
6013
|
-
const baseOrdinal = Array.isArray(targetOrdinal) ? (0,
|
|
6011
|
+
const baseOrdinal = Array.isArray(targetOrdinal) ? (0, import_lodash9.min)(targetOrdinal) : targetOrdinal;
|
|
6014
6012
|
for (const [ordinal, elements] of this.elementsByOrdinal) {
|
|
6015
6013
|
const inOrdinal = Array.isArray(targetOrdinal) ? targetOrdinal.includes(ordinal) : ordinal === targetOrdinal;
|
|
6016
6014
|
if (inOrdinal) {
|
|
@@ -6037,7 +6035,7 @@ var RendererManager = class extends EventTarget {
|
|
|
6037
6035
|
const elements = elemIds.map((id) => this.elementsMap.get(id)).flat();
|
|
6038
6036
|
elements.forEach((element) => {
|
|
6039
6037
|
const controller = this.elementRenderer.createHighlightController(element);
|
|
6040
|
-
if (controller && (0,
|
|
6038
|
+
if (controller && (0, import_lodash9.isFunction)(controller.start)) {
|
|
6041
6039
|
controller.start();
|
|
6042
6040
|
this.highlightControllers.push(controller);
|
|
6043
6041
|
}
|
|
@@ -6045,7 +6043,7 @@ var RendererManager = class extends EventTarget {
|
|
|
6045
6043
|
};
|
|
6046
6044
|
clearHighlightElements = () => {
|
|
6047
6045
|
this.highlightControllers.forEach((controller) => {
|
|
6048
|
-
if ((0,
|
|
6046
|
+
if ((0, import_lodash9.isFunction)(controller?.clear)) controller.clear();
|
|
6049
6047
|
});
|
|
6050
6048
|
};
|
|
6051
6049
|
/**
|
|
@@ -6157,7 +6155,7 @@ var IndoorMap = class extends EventTarget {
|
|
|
6157
6155
|
};
|
|
6158
6156
|
constructor(elementId, options) {
|
|
6159
6157
|
super();
|
|
6160
|
-
const combinedOptions =
|
|
6158
|
+
const combinedOptions = import_lodash10.default.merge({}, defaultOptions, options);
|
|
6161
6159
|
this.options = combinedOptions;
|
|
6162
6160
|
const {
|
|
6163
6161
|
onMapReady,
|
|
@@ -6204,7 +6202,7 @@ var IndoorMap = class extends EventTarget {
|
|
|
6204
6202
|
this.dataClient = options.dataClient;
|
|
6205
6203
|
}
|
|
6206
6204
|
setOptions(options) {
|
|
6207
|
-
const combinedOptions =
|
|
6205
|
+
const combinedOptions = import_lodash10.default.merge({}, defaultOptions, options);
|
|
6208
6206
|
this.options = combinedOptions;
|
|
6209
6207
|
const maptalksOptions = parseMaptalksOptions(combinedOptions);
|
|
6210
6208
|
this.map.setOptions(maptalksOptions);
|
|
@@ -6230,7 +6228,7 @@ var IndoorMap = class extends EventTarget {
|
|
|
6230
6228
|
handleMapClick = ({ coordinate }) => {
|
|
6231
6229
|
const { x, y } = coordinate;
|
|
6232
6230
|
console.log(
|
|
6233
|
-
`[Coordinates]: x: ${
|
|
6231
|
+
`[Coordinates]: x: ${import_lodash10.default.round(x, 8)} y: ${import_lodash10.default.round(
|
|
6234
6232
|
y,
|
|
6235
6233
|
8
|
|
6236
6234
|
)}, [Bearing]: ${this.map.getBearing()}, [Pitch]: ${this.map.getPitch()}`
|
|
@@ -6316,7 +6314,7 @@ var IndoorMap = class extends EventTarget {
|
|
|
6316
6314
|
if (this.#isClicked) return;
|
|
6317
6315
|
this.#isClicked = true;
|
|
6318
6316
|
const onClickElement = this.#onClickElement;
|
|
6319
|
-
if (!
|
|
6317
|
+
if (!import_lodash10.default.isFunction(onClickElement)) return;
|
|
6320
6318
|
this.#onClickElement(e);
|
|
6321
6319
|
this.#isClicked = false;
|
|
6322
6320
|
};
|
|
@@ -6336,16 +6334,16 @@ var IndoorMap = class extends EventTarget {
|
|
|
6336
6334
|
for (const feature2 of this.#features) {
|
|
6337
6335
|
try {
|
|
6338
6336
|
const { feature_type: featureType, properties, id } = feature2;
|
|
6339
|
-
const layerName =
|
|
6337
|
+
const layerName = import_lodash10.default.get(
|
|
6340
6338
|
LAYER_FEATURE_TYPE_OBJ,
|
|
6341
6339
|
featureType,
|
|
6342
6340
|
featureType
|
|
6343
6341
|
);
|
|
6344
6342
|
const layer = this.map.getLayer(layerName);
|
|
6345
6343
|
let geometry;
|
|
6346
|
-
const category =
|
|
6347
|
-
const extrudeConfig =
|
|
6348
|
-
const textMarkerType =
|
|
6344
|
+
const category = import_lodash10.default.get(feature2, "properties.category");
|
|
6345
|
+
const extrudeConfig = import_lodash10.default.get(this.#mapConfig, "extrude");
|
|
6346
|
+
const textMarkerType = import_lodash10.default.get(
|
|
6349
6347
|
this.#mapConfig,
|
|
6350
6348
|
"text_marker_type",
|
|
6351
6349
|
"ui-marker"
|
|
@@ -6512,15 +6510,15 @@ var IndoorMap = class extends EventTarget {
|
|
|
6512
6510
|
}
|
|
6513
6511
|
}
|
|
6514
6512
|
updateUserLocationSymbolByLocale(locale) {
|
|
6515
|
-
const userLocationGeometry =
|
|
6513
|
+
const userLocationGeometry = import_lodash10.default.get(
|
|
6516
6514
|
this.#elements,
|
|
6517
6515
|
`${USER_LOCATION_ELEMENT_ID}.geometry`
|
|
6518
6516
|
);
|
|
6519
6517
|
if (!userLocationGeometry) return;
|
|
6520
6518
|
const currentSymbol = userLocationGeometry.getSymbol();
|
|
6521
6519
|
const localeSymbolToUpdate = currentSymbol.map((symbol) => {
|
|
6522
|
-
const localeSymbol =
|
|
6523
|
-
if (!
|
|
6520
|
+
const localeSymbol = import_lodash10.default.get(symbol, `${LOCALE_SYMBOL_KEY}.${locale}`) || import_lodash10.default.get(symbol, `${LOCALE_SYMBOL_KEY}.default`);
|
|
6521
|
+
if (!import_lodash10.default.isPlainObject(localeSymbol)) return symbol;
|
|
6524
6522
|
return {
|
|
6525
6523
|
...symbol,
|
|
6526
6524
|
...localeSymbol
|
|
@@ -6594,14 +6592,14 @@ var IndoorMap = class extends EventTarget {
|
|
|
6594
6592
|
* END of User Location
|
|
6595
6593
|
****************************/
|
|
6596
6594
|
showGeometryByElementId = (elementId) => {
|
|
6597
|
-
const geometry =
|
|
6595
|
+
const geometry = import_lodash10.default.get(
|
|
6598
6596
|
this.#elements,
|
|
6599
6597
|
`${elementId}.geometry`
|
|
6600
6598
|
);
|
|
6601
6599
|
if (geometry) geometry.show();
|
|
6602
6600
|
};
|
|
6603
6601
|
hideGeometryByElementId = (elementId) => {
|
|
6604
|
-
const geometry =
|
|
6602
|
+
const geometry = import_lodash10.default.get(this.#elements, `${elementId}.geometry`);
|
|
6605
6603
|
if (geometry) geometry.hide();
|
|
6606
6604
|
};
|
|
6607
6605
|
setSpriteMarkersOpacity = (opacity = 1) => {
|
|
@@ -6648,13 +6646,13 @@ var IndoorMap = class extends EventTarget {
|
|
|
6648
6646
|
const line = lineStrings[i];
|
|
6649
6647
|
const coords = line.geometry.coordinates;
|
|
6650
6648
|
const prevLine = lineStrings[i - 1];
|
|
6651
|
-
const firstCoord =
|
|
6649
|
+
const firstCoord = import_lodash10.default.first(coords);
|
|
6652
6650
|
const isFirstLine = i === 0;
|
|
6653
6651
|
if (isFirstLine) {
|
|
6654
6652
|
accLine.push(...coords);
|
|
6655
6653
|
continue;
|
|
6656
6654
|
}
|
|
6657
|
-
const prevLastCoord =
|
|
6655
|
+
const prevLastCoord = import_lodash10.default.last(prevLine.geometry.coordinates);
|
|
6658
6656
|
const isNearby = (0, import_distance.default)(point(firstCoord), point(prevLastCoord)) < distance;
|
|
6659
6657
|
if (!isNearby) {
|
|
6660
6658
|
const remainingLines = lineStrings.slice(i);
|
|
@@ -6675,8 +6673,8 @@ var IndoorMap = class extends EventTarget {
|
|
|
6675
6673
|
create3DStepPath
|
|
6676
6674
|
} = this.#styler;
|
|
6677
6675
|
const routeMarkerLayer = this.map.getLayer(HIGHLIGHT_LAYER_NAME);
|
|
6678
|
-
const linesByOrdinal = (0,
|
|
6679
|
-
const joinedLines = (0,
|
|
6676
|
+
const linesByOrdinal = (0, import_lodash10.default)(stepGeometries).filter(({ geometry }) => geometry.type === "LineString").groupBy("properties.ordinal").value();
|
|
6677
|
+
const joinedLines = (0, import_lodash10.default)(linesByOrdinal).reduce((acc, lines, key) => {
|
|
6680
6678
|
const joined = this.combineNearbyLineStrings(lines, {
|
|
6681
6679
|
properties: { ordinal: +key }
|
|
6682
6680
|
});
|
|
@@ -6704,14 +6702,14 @@ var IndoorMap = class extends EventTarget {
|
|
|
6704
6702
|
stepElement = createOriginMarker(stepGeometry).addTo(routeMarkerLayer);
|
|
6705
6703
|
break;
|
|
6706
6704
|
case "destination-marker":
|
|
6707
|
-
const extrudeConfig =
|
|
6705
|
+
const extrudeConfig = import_lodash10.default.get(this.#mapConfig, "extrude");
|
|
6708
6706
|
if (destinationFeature.feature_type === "occupant") {
|
|
6709
|
-
const stepId =
|
|
6707
|
+
const stepId = import_lodash10.default.get(stepGeometry, "id");
|
|
6710
6708
|
const normalizedDestinationFeature = {
|
|
6711
6709
|
...destinationFeature,
|
|
6712
6710
|
id: stepId
|
|
6713
6711
|
};
|
|
6714
|
-
const logoUrl =
|
|
6712
|
+
const logoUrl = import_lodash10.default.get(
|
|
6715
6713
|
normalizedDestinationFeature,
|
|
6716
6714
|
"properties.logo.url"
|
|
6717
6715
|
);
|
|
@@ -6756,15 +6754,15 @@ var IndoorMap = class extends EventTarget {
|
|
|
6756
6754
|
const routeMarkerLayer = this.map.getLayer(
|
|
6757
6755
|
HIGHLIGHT_LAYER_NAME
|
|
6758
6756
|
);
|
|
6759
|
-
const originMarkerGeometry =
|
|
6757
|
+
const originMarkerGeometry = import_lodash10.default.get(
|
|
6760
6758
|
this.#elements,
|
|
6761
6759
|
`${ORIGIN_MARKER_ID}.geometry`
|
|
6762
6760
|
);
|
|
6763
|
-
const destinationMarkerGeometry =
|
|
6761
|
+
const destinationMarkerGeometry = import_lodash10.default.get(
|
|
6764
6762
|
this.#elements,
|
|
6765
6763
|
`${DESTINATION_MARKER_ID}.geometry`
|
|
6766
6764
|
);
|
|
6767
|
-
const geometriesToRemove =
|
|
6765
|
+
const geometriesToRemove = import_lodash10.default.compact([
|
|
6768
6766
|
originMarkerGeometry,
|
|
6769
6767
|
destinationMarkerGeometry
|
|
6770
6768
|
]);
|
|
@@ -6775,7 +6773,7 @@ var IndoorMap = class extends EventTarget {
|
|
|
6775
6773
|
(obj) => !(obj instanceof NavigationPath)
|
|
6776
6774
|
);
|
|
6777
6775
|
const objects = this.#navigationGeometries || {};
|
|
6778
|
-
|
|
6776
|
+
import_lodash10.default.forEach(objects, (obj) => {
|
|
6779
6777
|
if (!obj) return;
|
|
6780
6778
|
this.#navigationGeometries[obj.properties.id] = null;
|
|
6781
6779
|
obj.remove();
|
|
@@ -6812,7 +6810,7 @@ var IndoorMap = class extends EventTarget {
|
|
|
6812
6810
|
}
|
|
6813
6811
|
if (this.threeLayer) {
|
|
6814
6812
|
const currentView = this.camera.getView();
|
|
6815
|
-
const objectOpacity =
|
|
6813
|
+
const objectOpacity = import_lodash10.default.clamp(38 - 2 * currentView.zoom, 0, 1);
|
|
6816
6814
|
this.#objects.forEach((object) => {
|
|
6817
6815
|
object.getObject3d().traverse((child) => {
|
|
6818
6816
|
if (child.isMesh) child.material.opacity = objectOpacity;
|
|
@@ -6822,7 +6820,7 @@ var IndoorMap = class extends EventTarget {
|
|
|
6822
6820
|
});
|
|
6823
6821
|
if (this.#billboardObjects) {
|
|
6824
6822
|
this.#billboardObjects.forEach((object) => {
|
|
6825
|
-
const objectScale =
|
|
6823
|
+
const objectScale = import_lodash10.default.clamp(
|
|
6826
6824
|
20 - 1 * currentView.zoom,
|
|
6827
6825
|
1,
|
|
6828
6826
|
1.05
|
|
@@ -6831,7 +6829,7 @@ var IndoorMap = class extends EventTarget {
|
|
|
6831
6829
|
});
|
|
6832
6830
|
}
|
|
6833
6831
|
if (this.#isLayersFadingOnZoom) {
|
|
6834
|
-
const layerOpacity =
|
|
6832
|
+
const layerOpacity = import_lodash10.default.clamp(1 - objectOpacity, 0, 1);
|
|
6835
6833
|
LAYERS.forEach((layerKey) => {
|
|
6836
6834
|
const layer = this.map.getLayer(layerKey);
|
|
6837
6835
|
if (layer) layer.setOpacity(layerOpacity);
|
|
@@ -6897,6 +6895,7 @@ var IndoorMap = class extends EventTarget {
|
|
|
6897
6895
|
getRelatedLocationsByAmenity,
|
|
6898
6896
|
getRelatedLocationsByFeature,
|
|
6899
6897
|
getRelatedLocationsByOccupant,
|
|
6898
|
+
getSearchClient,
|
|
6900
6899
|
getSuitablyValueBetweenBearings,
|
|
6901
6900
|
isClickableFeature,
|
|
6902
6901
|
isValidCoordinate,
|