venue-js 1.2.0-next.7 → 1.2.0-next.8

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.mjs CHANGED
@@ -1,3 +1,9 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __export = (target, all) => {
3
+ for (var name in all)
4
+ __defProp(target, name, { get: all[name], enumerable: true });
5
+ };
6
+
1
7
  // src/data/index.ts
2
8
  import { QueryObserver as QueryObserver2 } from "@tanstack/query-core";
3
9
 
@@ -191,6 +197,115 @@ var safeFetchFeature = async (featureType, params) => {
191
197
  }
192
198
  };
193
199
 
200
+ // src/data/utils/geometry-validator.ts
201
+ var isValidCoordinate = (point2) => {
202
+ return point2.length === 2 && point2.every((coord) => typeof coord === "number");
203
+ };
204
+ function isValidLinearRingCoordinates(ring) {
205
+ if (ring.length < 4) {
206
+ return false;
207
+ }
208
+ return ring.every(isValidCoordinate) && ring[0][0] === ring[ring.length - 1][0] && ring[0][1] === ring[ring.length - 1][1];
209
+ }
210
+ var isValidPolygonCoordinates = (polygon) => {
211
+ if (Array.isArray(polygon[0]) && (polygon[0].length === 0 || typeof polygon[0][0] === "number")) {
212
+ return isValidLinearRingCoordinates(polygon);
213
+ }
214
+ if (Array.isArray(polygon) && polygon.length > 0 && Array.isArray(polygon[0])) {
215
+ if (!isValidLinearRingCoordinates(polygon[0])) {
216
+ return false;
217
+ }
218
+ for (let i = 1; i < polygon.length; i++) {
219
+ if (!isValidLinearRingCoordinates(polygon[i])) {
220
+ return false;
221
+ }
222
+ }
223
+ return true;
224
+ }
225
+ return false;
226
+ };
227
+ var isValidMultiPolygonCoordinates = (multipolygon) => {
228
+ return multipolygon.every(isValidPolygonCoordinates);
229
+ };
230
+ var isValidLineStringCoordinates = (lineString2) => {
231
+ if (!Array.isArray(lineString2) || lineString2.length < 2) {
232
+ return false;
233
+ }
234
+ const firstPoint = lineString2[0];
235
+ const lastPoint = lineString2[lineString2.length - 1];
236
+ if (firstPoint[0] === lastPoint[0] && firstPoint[1] === lastPoint[1]) {
237
+ return false;
238
+ }
239
+ return lineString2.every(isValidCoordinate);
240
+ };
241
+ var isValidMultiPolygon = (geometry) => {
242
+ const { type, coordinates } = geometry;
243
+ return type === "MultiPolygon" && isValidMultiPolygonCoordinates(coordinates);
244
+ };
245
+ var isValidPolygon = (geometry) => {
246
+ const { type, coordinates } = geometry;
247
+ return type === "Polygon" && isValidPolygonCoordinates(coordinates);
248
+ };
249
+ var isValidLineString = (geometry) => {
250
+ const { type, coordinates } = geometry;
251
+ return type === "LineString" && isValidLineStringCoordinates(coordinates);
252
+ };
253
+ var isValidPoint = (geometry) => {
254
+ const { type, coordinates } = geometry;
255
+ return type === "Point" && isValidCoordinate(coordinates);
256
+ };
257
+
258
+ // src/data/utils/match-filters.ts
259
+ function isInFilter(filter) {
260
+ return typeof filter === "object" && filter !== null && "$in" in filter && Array.isArray(filter.$in);
261
+ }
262
+ var someIntersect = (a, b) => a.some((v) => b.includes(v));
263
+ function matchFilter(value, filter) {
264
+ if (Array.isArray(value)) {
265
+ if (isInFilter(filter)) return someIntersect(value, filter.$in);
266
+ return value.includes(filter);
267
+ } else {
268
+ if (isInFilter(filter)) return filter.$in.includes(value);
269
+ return value === filter;
270
+ }
271
+ }
272
+ function matchFilters(item, filters) {
273
+ return Object.entries(filters).every(([key, filter]) => {
274
+ return matchFilter(item.properties[key], filter);
275
+ });
276
+ }
277
+
278
+ // src/data/utils/occupant-helper.ts
279
+ var occupant_helper_exports = {};
280
+ __export(occupant_helper_exports, {
281
+ getOccupantCorrelatedLocations: () => getOccupantCorrelatedLocations,
282
+ getOccupantMainLocation: () => getOccupantMainLocation,
283
+ getOccupantMarkerLocations: () => getOccupantMarkerLocations
284
+ });
285
+ import _compact from "lodash/compact";
286
+ var getOccupantMainLocation = (occupant) => {
287
+ return occupant.properties.kiosk || occupant.properties.unit;
288
+ };
289
+ var getOccupantCorrelatedLocations = (occupant) => {
290
+ const allCorrelatedLocations = [
291
+ ...occupant.properties.units,
292
+ ...occupant.properties.kiosks
293
+ ];
294
+ return _compact(allCorrelatedLocations);
295
+ };
296
+ var getOccupantMarkerLocations = (occupant, options) => {
297
+ const placementType = options?.type ? options.type : occupant.properties.show_name_on_all_units ? "ALL_LOCATIONS" : "ONCE_PER_LEVEL";
298
+ const mainLocation = getOccupantMainLocation(occupant);
299
+ const mainLocationLevel = mainLocation?.properties?.level_id;
300
+ const allCorrelatedLocations = getOccupantCorrelatedLocations(occupant);
301
+ if (placementType === "ALL_LOCATIONS") {
302
+ return _compact([mainLocation, ...allCorrelatedLocations]);
303
+ }
304
+ const otherLevelLocations = allCorrelatedLocations.filter((f) => f.properties.level_id !== mainLocationLevel);
305
+ const onePerLevelLocations = [...new Map(otherLevelLocations.map((loc) => [loc.properties.level_id, loc])).values()];
306
+ return _compact([mainLocation, ...onePerLevelLocations]);
307
+ };
308
+
194
309
  // src/data/getDataClient.ts
195
310
  import {
196
311
  QueryClient,
@@ -349,8 +464,8 @@ var createPopulator = ({
349
464
  venue,
350
465
  promotions,
351
466
  privileges,
352
- kiosk,
353
- unit,
467
+ kiosk: kiosk ? await populateKiosk(kiosk) : null,
468
+ unit: unit ? await populateUnit(unit) : null,
354
469
  kiosks: await Promise.all(kiosks.map(populateKiosk)),
355
470
  units: await Promise.all(units.map(populateUnit))
356
471
  }
@@ -442,26 +557,6 @@ var createPopulator = ({
442
557
  };
443
558
  };
444
559
 
445
- // src/data/utils/match-filters.ts
446
- function isInFilter(filter) {
447
- return typeof filter === "object" && filter !== null && "$in" in filter && Array.isArray(filter.$in);
448
- }
449
- var someIntersect = (a, b) => a.some((v) => b.includes(v));
450
- function matchFilter(value, filter) {
451
- if (Array.isArray(value)) {
452
- if (isInFilter(filter)) return someIntersect(value, filter.$in);
453
- return value.includes(filter);
454
- } else {
455
- if (isInFilter(filter)) return filter.$in.includes(value);
456
- return value === filter;
457
- }
458
- }
459
- function matchFilters(item, filters) {
460
- return Object.entries(filters).every(([key, filter]) => {
461
- return matchFilter(item.properties[key], filter);
462
- });
463
- }
464
-
465
560
  // src/data/getDataClient.ts
466
561
  var getDataClient = (options) => {
467
562
  const observers = /* @__PURE__ */ new Map();
@@ -1704,18 +1799,6 @@ var loadModel3d = (model3d, coordinate, threeLayer) => {
1704
1799
  );
1705
1800
  });
1706
1801
  };
1707
- var create3DModels = async (models, defaultCoordinate, properties, threeLayer) => {
1708
- let modelObjs = [];
1709
- for (let j = 0; j < models.length; j++) {
1710
- const model = models[j];
1711
- const positionCoord = _4.get(model, "properties.position");
1712
- const coord = positionCoord || defaultCoordinate;
1713
- const object = await loadModel3d(model, coord, threeLayer);
1714
- object.properties = properties;
1715
- modelObjs.push(object);
1716
- }
1717
- return modelObjs;
1718
- };
1719
1802
  var createExtrudePolygon = (geometry, threeLayer, material, height, properties = {}, options) => {
1720
1803
  const { offset = 0, altitude = 0 } = options;
1721
1804
  const offsetGeometry = turfBuffer(geometry, offset, { units: "meters" });
@@ -2623,44 +2706,6 @@ var styledFeatureGenerator = (mapTheme) => {
2623
2706
  markerProperties
2624
2707
  );
2625
2708
  },
2626
- createVenue3DModel: async (venue, threeLayer) => {
2627
- const { id, feature_type, properties } = venue;
2628
- const { category, model3d } = properties;
2629
- const modelProperty = {
2630
- id,
2631
- feature_type,
2632
- category
2633
- };
2634
- const center2 = turfCenter(venue);
2635
- const centerCoord = _4.get(center2, "geometry.coordinates");
2636
- const modelPosition = _4.get(model3d, "properties.position", centerCoord);
2637
- const models = await create3DModels(
2638
- model3d,
2639
- modelPosition,
2640
- modelProperty,
2641
- threeLayer
2642
- );
2643
- return models;
2644
- },
2645
- create3DFixture: async (fixture, threeLayer) => {
2646
- const { id, feature_type, properties } = fixture;
2647
- const { category, ordinal, model3d } = properties;
2648
- const modelProperty = {
2649
- id,
2650
- feature_type,
2651
- category,
2652
- ordinal
2653
- };
2654
- const center2 = turfCenter(fixture);
2655
- const coordinate = _4.get(center2, "geometry.coordinates");
2656
- const models = await create3DModels(
2657
- model3d,
2658
- coordinate,
2659
- modelProperty,
2660
- threeLayer
2661
- );
2662
- return models;
2663
- },
2664
2709
  createExtrudedUnit: (unit, threeLayer, options) => {
2665
2710
  const extrudeHeight = _4.get(options, "height");
2666
2711
  if (!extrudeHeight) return;
@@ -2700,24 +2745,6 @@ var styledFeatureGenerator = (mapTheme) => {
2700
2745
  options3d
2701
2746
  );
2702
2747
  return object;
2703
- },
2704
- createAmbientLight: (config) => {
2705
- const { color: colorString = "0xffffff", intensity = 1 } = config;
2706
- const color = parseInt(colorString, 16);
2707
- const ambientLight = new AmbientLight(color, intensity);
2708
- return ambientLight;
2709
- },
2710
- createDirectionalLight: (config) => {
2711
- const {
2712
- color: colorString = "0xffffff",
2713
- intensity = 1,
2714
- position: positionString = [0, 0, 0]
2715
- } = config;
2716
- const color = parseInt(colorString, 16);
2717
- const [x, y, z] = positionString;
2718
- const light = new DirectionalLight(color, intensity);
2719
- light.position.set(x, y, z).normalize();
2720
- return light;
2721
2748
  }
2722
2749
  };
2723
2750
  };
@@ -3095,6 +3122,7 @@ var element3DRendererOptions = {
3095
3122
  unenclosedarea: { color: "#cccccc", height: 0.2 },
3096
3123
  nonpublic: { color: "#999999", height: 0.3 },
3097
3124
  escalator: { height: 0.2 },
3125
+ parking: { height: 0.1 },
3098
3126
  room: { color: "#ffffff", height: 2, bottomHeight: 0.12 }
3099
3127
  }
3100
3128
  },
@@ -3421,6 +3449,7 @@ var Marker2DRenderer = class extends EventTarget {
3421
3449
  markerLayer;
3422
3450
  constructor(map) {
3423
3451
  super();
3452
+ this.map = map;
3424
3453
  }
3425
3454
  createMarker = (coordinates, ordinal, content) => {
3426
3455
  const marker = new maptalks6.ui.UIMarker(coordinates, {
@@ -3442,74 +3471,7 @@ var Marker2DRenderer = class extends EventTarget {
3442
3471
  };
3443
3472
 
3444
3473
  // src/IndoorMap/renderer/3d/Marker3DRenderer.ts
3445
- import * as maptalks7 from "maptalks";
3446
-
3447
- // src/IndoorMap/renderer/utils/svg2material.ts
3448
- import { SpriteMaterial as SpriteMaterial4, TextureLoader as TextureLoader3 } from "three";
3449
- var svgToDataURL = (svgString, scaleFactor = 1) => {
3450
- const svgBlob = new Blob([svgString], { type: "image/svg+xml" });
3451
- const url = URL.createObjectURL(svgBlob);
3452
- const img = new Image();
3453
- return new Promise((resolve, reject) => {
3454
- img.onload = function() {
3455
- const newWidth = img.width * scaleFactor;
3456
- const newHeight = img.height * scaleFactor;
3457
- const canvas = document.createElement("canvas");
3458
- canvas.width = newWidth;
3459
- canvas.height = newHeight;
3460
- const ctx = canvas.getContext("2d");
3461
- ctx.drawImage(img, 0, 0, newWidth, newHeight);
3462
- const pngDataUrl = canvas.toDataURL("image/png");
3463
- resolve(pngDataUrl);
3464
- };
3465
- img.onerror = function(error) {
3466
- reject(error);
3467
- };
3468
- img.src = url;
3469
- });
3470
- };
3471
- var createSVGPathFromMarkerSymbol2 = (style) => {
3472
- const {
3473
- markerWidth = 24,
3474
- markerDx = 0,
3475
- markerDy = 0,
3476
- // markerFill,
3477
- markerPath,
3478
- fill = "#000000"
3479
- } = style;
3480
- const scale2 = markerWidth / 24;
3481
- const strokeWidth = 2;
3482
- const halfStrokeWidth = 0.5 * strokeWidth;
3483
- if (Array.isArray(markerPath)) {
3484
- return markerPath.map(
3485
- ({ path, fill: fill2 }) => `<path d="${path}" style="transform:translate(${markerDx}px, ${markerDy}px) scale(${scale2})" fill="${fill2}" stroke="#ffffff" stroke-width="${strokeWidth}" />`
3486
- );
3487
- }
3488
- return `<path d="${markerPath}" style="transform:translate(${markerDx}px, ${markerDy}px) scale(${scale2})" fill="${fill}" />`;
3489
- };
3490
- var createSpriteMaterialByLabelSymbol2 = (labelSymbol) => {
3491
- const material = new SpriteMaterial4();
3492
- try {
3493
- const [base, icon] = labelSymbol ?? [{}, {}];
3494
- const { markerWidth: baseWidth = 24 } = base;
3495
- const { markerWidth: iconWidth = 24 } = icon;
3496
- const viewBoxDimension = Math.max(baseWidth, iconWidth);
3497
- const baseSVG = createSVGPathFromMarkerSymbol2(base);
3498
- const iconSVG = icon ? createSVGPathFromMarkerSymbol2(icon) : "";
3499
- const svg = `<svg xmlns="http://www.w3.org/2000/svg" width="${viewBoxDimension}" height="${viewBoxDimension}">${baseSVG}${iconSVG}</svg>`;
3500
- const textureLoader = new TextureLoader3();
3501
- const scaleFactor = 200 / 24;
3502
- svgToDataURL(svg, scaleFactor).then((png) => {
3503
- const texture = textureLoader.load(png, () => {
3504
- material.map = texture;
3505
- material.needsUpdate = true;
3506
- });
3507
- });
3508
- } catch (error) {
3509
- console.warn(`Error createSpriteMaterialByLabelSymbol: `, labelSymbol);
3510
- }
3511
- return material;
3512
- };
3474
+ import * as maptalks7 from "maptalks-gl";
3513
3475
 
3514
3476
  // src/IndoorMap/renderer/3d/objects/TextSpriteMarker.ts
3515
3477
  import { Coordinate as Coordinate2, Util as Util4 } from "maptalks";
@@ -3540,11 +3502,11 @@ var OPTIONS4 = {
3540
3502
  fontFamily: "sans-serif",
3541
3503
  fontSize: 28,
3542
3504
  fontWeight: 400,
3543
- background: "rgba(0, 0, 0, 0.2)",
3505
+ background: "transparent",
3544
3506
  lineHeight: 32,
3545
3507
  padding: 8,
3546
3508
  strokeColor: "#000000",
3547
- strokeWidth: 6,
3509
+ strokeWidth: 3,
3548
3510
  strokeStyle: "round",
3549
3511
  // Sprite options
3550
3512
  /* Overall scale multiplier */
@@ -3756,40 +3718,41 @@ var Marker3DRenderer = class extends EventTarget {
3756
3718
  });
3757
3719
  }
3758
3720
  /** Marker */
3759
- getOrCreateIconMaterial(key) {
3760
- if (!this.materialByKey) this.materialByKey = /* @__PURE__ */ new Map();
3761
- const existingMaterial = this.materialByKey.get(key);
3762
- if (existingMaterial) return existingMaterial;
3763
- const baseSymbol = {
3764
- markerType: "path",
3765
- markerPath: [
3766
- {
3767
- path: "M20.775 1.2H1.225V20.35H8.215L11.3 22.8L14.385 20.35H20.775V1.2Z",
3768
- fill: "#ff0000"
3769
- }
3770
- ],
3771
- markerPathWidth: 24,
3772
- markerPathHeight: 24
3773
- };
3774
- const markerSymbol = {
3775
- markerType: "path",
3776
- markerPath: [],
3777
- // TODO: Get Path by featureType.category
3778
- // markerPath: [{ fill: "#FFFFFF", path: "M 19 3 H 5 c -1.1 0 -2 0.9 -2 2 v 14 c 0 1.1 0.9 2 2 2 h 14 c 1.1 0 2 -0.9 2 -2 V 5 c 0 -1.1 -0.9 -2 -2 -2 Z m -2 6 h -1.7 l -5 9 H 7 c -0.83 0 -1.5 -0.67 -1.5 -1.5 S 6.17 15 7 15 h 1.7 l 5 -9 H 17 c 0.83 0 1.5 0.67 1.5 1.5 S 17.83 9 17 9 Z" }],
3779
- markerPathWidth: 24,
3780
- markerPathHeight: 24,
3781
- markerWidth: 24,
3782
- markerHeight: 24,
3783
- markerDy: 1.5,
3784
- markerDx: 1.5
3785
- };
3786
- const created = createSpriteMaterialByLabelSymbol2([
3787
- baseSymbol,
3788
- markerSymbol
3789
- ]);
3790
- this.materialByKey.set(key, created);
3791
- return created;
3792
- }
3721
+ // getOrCreateIconMaterial(key) {
3722
+ // if (!this.materialByKey) this.materialByKey = new Map()
3723
+ // const existingMaterial = this.materialByKey.get(key)
3724
+ // if (existingMaterial) return existingMaterial
3725
+ // // Create new
3726
+ // const baseSymbol: maptalks.Path = {
3727
+ // markerType: "path",
3728
+ // markerPath: [
3729
+ // {
3730
+ // path: "M20.775 1.2H1.225V20.35H8.215L11.3 22.8L14.385 20.35H20.775V1.2Z",
3731
+ // fill: "#ff0000",
3732
+ // },
3733
+ // ],
3734
+ // markerPathWidth: 24,
3735
+ // markerPathHeight: 24
3736
+ // }
3737
+ // const markerSymbol: maptalks.PathMarkerSymbol = {
3738
+ // markerType: "path",
3739
+ // markerPath: [],
3740
+ // // TODO: Get Path by featureType.category
3741
+ // // markerPath: [{ fill: "#FFFFFF", path: "M 19 3 H 5 c -1.1 0 -2 0.9 -2 2 v 14 c 0 1.1 0.9 2 2 2 h 14 c 1.1 0 2 -0.9 2 -2 V 5 c 0 -1.1 -0.9 -2 -2 -2 Z m -2 6 h -1.7 l -5 9 H 7 c -0.83 0 -1.5 -0.67 -1.5 -1.5 S 6.17 15 7 15 h 1.7 l 5 -9 H 17 c 0.83 0 1.5 0.67 1.5 1.5 S 17.83 9 17 9 Z" }],
3742
+ // markerPathWidth: 24,
3743
+ // markerPathHeight: 24,
3744
+ // markerWidth: 24,
3745
+ // markerHeight: 24,
3746
+ // markerDy: 1.5,
3747
+ // markerDx: 1.5,
3748
+ // }
3749
+ // const created = createSpriteMaterialByLabelSymbol([
3750
+ // baseSymbol,
3751
+ // markerSymbol,
3752
+ // ])
3753
+ // this.materialByKey.set(key, created)
3754
+ // return created
3755
+ // }
3793
3756
  };
3794
3757
 
3795
3758
  // src/IndoorMap/renderer/utils/angleBetweenLineString.ts
@@ -4245,16 +4208,11 @@ var IndoorMap = class extends EventTarget {
4245
4208
  create3DFootprint,
4246
4209
  create3DGroundLabel,
4247
4210
  create3DBillboard,
4248
- createVenue3DModel,
4249
4211
  createExtrudedUnit,
4250
- create3DFixture,
4251
4212
  create3DAmenityMarker,
4252
4213
  create3DOccupantAmenityMarker,
4253
4214
  create3DOpeningMarker,
4254
- createOccupantGroundLabel,
4255
- // Light
4256
- createAmbientLight,
4257
- createDirectionalLight
4215
+ createOccupantGroundLabel
4258
4216
  } = this.#styler;
4259
4217
  let elements = {};
4260
4218
  let object3ds = [];
@@ -4281,16 +4239,6 @@ var IndoorMap = class extends EventTarget {
4281
4239
  feature2
4282
4240
  );
4283
4241
  switch (featureType) {
4284
- case "venue": {
4285
- geometry = createVenue(feature2).addTo(layer);
4286
- const models = await createVenue3DModel(feature2, this.threeLayer);
4287
- models.forEach((model) => {
4288
- model.on("click", this.handleClickElement);
4289
- object3ds.push(model);
4290
- this.#venueObjects.push(model);
4291
- });
4292
- break;
4293
- }
4294
4242
  case "amenity": {
4295
4243
  if (feature2.properties.is_featured) {
4296
4244
  const billboardObj = create3DBillboard(feature2, this.threeLayer);
@@ -4334,127 +4282,6 @@ var IndoorMap = class extends EventTarget {
4334
4282
  geometry = createSection(feature2)?.addTo(layer);
4335
4283
  break;
4336
4284
  }
4337
- case "occupant": {
4338
- switch (category) {
4339
- // Create only marker if it is amenity occupant
4340
- case "currencyexchange":
4341
- case "donationcenter":
4342
- case "postoffice":
4343
- const markerFeature = {
4344
- ...feature2,
4345
- geometry: feature2.properties?.anchor?.geometry
4346
- };
4347
- const marker3d = create3DOccupantAmenityMarker(
4348
- markerFeature,
4349
- this.threeLayer,
4350
- extrudeConfig
4351
- )?.on("click", this.handleClickElement);
4352
- object3ds.push(marker3d);
4353
- break;
4354
- default: {
4355
- const { kiosk, anchor } = feature2.properties;
4356
- const { unit } = anchor.properties;
4357
- let mainLocation = kiosk || unit || null;
4358
- const relatedLocations = [
4359
- ...feature2.properties.units,
4360
- ...feature2.properties.kiosks
4361
- ].filter((f) => f.properties.ordinal !== properties.ordinal);
4362
- const occupantLocations = [mainLocation, ...relatedLocations];
4363
- const renderType = feature2.properties.render_type;
4364
- occupantLocations.forEach((location, index) => {
4365
- const isMainLocation = index === 0;
4366
- if (renderType === "Label") {
4367
- const occupantGroundLabel = createOccupantGroundLabel(
4368
- feature2,
4369
- location,
4370
- { textMarkerType, extrudeConfig },
4371
- this.threeLayer
4372
- );
4373
- if (occupantGroundLabel instanceof GroundLabel) {
4374
- occupantGroundLabel.on("click", this.handleClickElement);
4375
- occupantGroundLabel.addTo(this.threeLayer);
4376
- object3ds.push(occupantGroundLabel);
4377
- this.#groundObjects.push(occupantGroundLabel);
4378
- }
4379
- } else {
4380
- const occupantMarker = createOccupant(feature2, location, {
4381
- textMarkerType,
4382
- extrudeConfig
4383
- });
4384
- if (occupantMarker instanceof ui3.UIMarker) {
4385
- occupantMarker.addTo(this.map);
4386
- } else {
4387
- occupantMarker?.on("click", this.handleClickElement);
4388
- occupantMarker?.addTo(layer);
4389
- }
4390
- if (isMainLocation) {
4391
- geometry = occupantMarker;
4392
- } else {
4393
- elements[`${feature2.id}_${index}`] = {
4394
- geometry: occupantMarker,
4395
- properties: location.properties,
4396
- featureType: "occupant",
4397
- feature: feature2
4398
- };
4399
- }
4400
- }
4401
- });
4402
- }
4403
- }
4404
- break;
4405
- }
4406
- case "fixture": {
4407
- const models = await create3DFixture(feature2, this.threeLayer);
4408
- models.forEach((model) => {
4409
- model.on("click", this.handleClickElement);
4410
- object3ds.push(model);
4411
- this.#glbObjects.push(model);
4412
- });
4413
- if (!featureExtrudeConfig) {
4414
- geometry = createFixture(feature2)?.addTo(layer);
4415
- } else {
4416
- const locatedLevel = feature2?.properties?.level;
4417
- const levelExtrudeConfig = getExtrudeConfigByFeature(
4418
- extrudeConfig,
4419
- locatedLevel
4420
- );
4421
- const levelHeight = _6.get(levelExtrudeConfig, "height", 0);
4422
- const option = { ...featureExtrudeConfig, altitude: levelHeight };
4423
- const extrudedFixture = createExtrudedUnit(
4424
- feature2,
4425
- this.threeLayer,
4426
- option
4427
- );
4428
- object3ds.push(extrudedFixture);
4429
- }
4430
- break;
4431
- }
4432
- case "footprint": {
4433
- const objects = await create3DFootprint(
4434
- feature2,
4435
- this.threeLayer,
4436
- featureExtrudeConfig
4437
- );
4438
- objects.forEach((object) => {
4439
- object.on("click", () => {
4440
- const {
4441
- geometry: { coordinates }
4442
- } = turfCenter3(feature2);
4443
- this.camera.animateTo({ center: coordinates, pitch: 45 });
4444
- });
4445
- object3ds.push(object);
4446
- this.#objects.push(object);
4447
- });
4448
- if (feature2.properties.logo) {
4449
- const footprintMarker = create3DBillboard(
4450
- feature2,
4451
- this.threeLayer
4452
- );
4453
- object3ds.push(footprintMarker);
4454
- this.#billboardObjects.push(footprintMarker);
4455
- }
4456
- break;
4457
- }
4458
4285
  default:
4459
4286
  break;
4460
4287
  }
@@ -5122,6 +4949,7 @@ export {
5122
4949
  MARKER_LAYER_NAME,
5123
4950
  NONIMDF_FEATURE_TYPES,
5124
4951
  ORIGIN_MARKER_ID,
4952
+ occupant_helper_exports as OccupantHelpers,
5125
4953
  POI_MARKER_LAYER_NAME,
5126
4954
  QueryObserver2 as QueryObserver,
5127
4955
  USER_LOCATION_ELEMENT_ID,
@@ -5149,6 +4977,16 @@ export {
5149
4977
  getRelatedLocationsByOccupant,
5150
4978
  getSuitablyValueBetweenBearings,
5151
4979
  isClickableFeature,
4980
+ isValidCoordinate,
4981
+ isValidLineString,
4982
+ isValidLineStringCoordinates,
4983
+ isValidMultiPolygon,
4984
+ isValidMultiPolygonCoordinates,
4985
+ isValidPoint,
4986
+ isValidPolygon,
4987
+ isValidPolygonCoordinates,
4988
+ matchFilter,
4989
+ matchFilters,
5152
4990
  safeFetchFeature,
5153
4991
  styledFeatureGenerator
5154
4992
  };