venue-js 1.0.0-3 → 1.0.0

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 CHANGED
@@ -3,8 +3,8 @@ export { QueryObserver } from '@tanstack/query-core';
3
3
  import * as geojson from 'geojson';
4
4
  import { Position, Geometry, GeoJsonProperties, Feature, Point, Polygon, MultiPolygon, LineString, GeometryCollection } from 'geojson';
5
5
  import * as maptalks from 'maptalks';
6
- import { Coordinate, Map, MapViewType, MapAnimationOptionsType, HandlerFn, EventParams, MapPaddingType, Extent, Marker, ui, LineString as LineString$1, Polygon as Polygon$1, MultiPolygon as MultiPolygon$1, MultiLineString } from 'maptalks';
7
- import { BaseObject, ThreeLayer } from 'maptalks.three';
6
+ import { Coordinate, Map, MapViewType, MapAnimationOptionsType, HandlerFn, EventParams, MapPaddingType, Extent } from 'maptalks';
7
+ import { ThreeLayer, BaseObject } from 'maptalks.three';
8
8
  import { ExtrudePolygonOptionType } from 'maptalks.three/dist/type';
9
9
  import { SpriteMaterial, AmbientLight, DirectionalLight } from 'three';
10
10
 
@@ -715,7 +715,7 @@ declare class RendererManager extends EventTarget {
715
715
  private elementsByOrdinal;
716
716
  constructor(map: maptalks.Map, options: RendererManagerOptions);
717
717
  set dataClient(value: any);
718
- getElementsByOrdinal: (ordinal: number) => (BaseObject | maptalks.Geometry | maptalks.ui.UIMarker)[];
718
+ getElementsByOrdinal: (ordinal: number) => any[];
719
719
  changeLevelByOrdinal(targetOrdinal: null | number | number[]): void;
720
720
  createMarker(coordinate: Position, ordinal: number, label: string): void;
721
721
  }
@@ -871,12 +871,12 @@ declare class IndoorMap extends EventTarget {
871
871
  * Change Level & animate to path / geometry / view / etc.
872
872
  * ================================== */
873
873
  changeLevelByOrdinal(ordinal: number | number[]): void;
874
- getFeatureExtent: (feature: any, scaleFactor?: number) => Extent;
875
- getExtentCenter: (extent: Extent) => maptalks.PositionType;
874
+ getFeatureExtent: (feature: any, scaleFactor?: number) => any;
875
+ getExtentCenter: (extent: Extent) => any;
876
876
  getExtentZoom: (extent: Extent, options?: {
877
877
  isFraction?: boolean;
878
878
  padding?: MapPaddingType;
879
- }) => number;
879
+ }) => any;
880
880
  findVenueInView: () => {
881
881
  venueId: string;
882
882
  distance: number;
@@ -942,10 +942,10 @@ declare class IndoorMap extends EventTarget {
942
942
  /**
943
943
  * Other functions
944
944
  */
945
- enableClick: () => Map | maptalks.ClassOptions;
946
- disableClick: () => Map | maptalks.ClassOptions;
947
- freeze: () => Map | maptalks.ClassOptions;
948
- unfreeze: () => Map | maptalks.ClassOptions;
945
+ enableClick: () => any;
946
+ disableClick: () => any;
947
+ freeze: () => any;
948
+ unfreeze: () => any;
949
949
  /**
950
950
  * render (frame)
951
951
  */
@@ -956,8 +956,8 @@ declare class IndoorMap extends EventTarget {
956
956
  right: number;
957
957
  bottom: number;
958
958
  };
959
- }) => Coordinate;
960
- setMaxExtent(extent: Extent): Map;
959
+ }) => any;
960
+ setMaxExtent(extent: Extent): any;
961
961
  render(): void;
962
962
  }
963
963
 
@@ -1038,22 +1038,22 @@ declare function styledFeatureGenerator(mapTheme: any): {
1038
1038
  createVenue: (feature: any) => any;
1039
1039
  createLevel: (feature: any) => any;
1040
1040
  createUnit: (feature: any) => any;
1041
- createMarker: (feature: any) => Marker;
1042
- createOriginMarker: (feature: any) => Marker;
1043
- createDestinationPinMarker: (feature: any, mapConfig: any) => Marker;
1044
- createDestinationLogoMarker: (feature: any, mapConfig?: {}) => Marker;
1045
- createUserLocationMarker: (feature: any) => Marker;
1046
- createLastUserLocationMarker: (feature: any) => Marker;
1047
- createHighlightOccupantMarker: (feature: any, mapConfig: any) => Marker;
1048
- createHighlight2DAmenityMarkerFrom3DMarker: (feature: any, mapConfig: any) => Marker;
1041
+ createMarker: (feature: any) => any;
1042
+ createOriginMarker: (feature: any) => any;
1043
+ createDestinationPinMarker: (feature: any, mapConfig: any) => any;
1044
+ createDestinationLogoMarker: (feature: any, mapConfig?: {}) => any;
1045
+ createUserLocationMarker: (feature: any) => any;
1046
+ createLastUserLocationMarker: (feature: any) => any;
1047
+ createHighlightOccupantMarker: (feature: any, mapConfig: any) => any;
1048
+ createHighlight2DAmenityMarkerFrom3DMarker: (feature: any, mapConfig: any) => any;
1049
1049
  createKiosk: (feature: any) => any;
1050
1050
  createSection: (feature: any) => any;
1051
- createOccupant: (feature: any, location: any, mapConfig: any) => ui.UIMarker | Marker;
1052
- createOpening: (feature: any) => LineString$1;
1051
+ createOccupant: (feature: any, location: any, mapConfig: any) => any;
1052
+ createOpening: (feature: any) => any;
1053
1053
  createFixture: (feature: any) => any;
1054
- createLineStringFromGeometries: (geometries: any) => LineString$1;
1054
+ createLineStringFromGeometries: (geometries: any) => any;
1055
1055
  create3DStepPath: (feature: any, threeLayer: any, option?: {}) => NavigationPath;
1056
- createDecoration: (decoration: any, options: any) => Polygon$1 | MultiPolygon$1 | LineString$1 | MultiLineString;
1056
+ createDecoration: (decoration: any, options: any) => any;
1057
1057
  /** Three JS */
1058
1058
  create3DFootprint: (feature: any, threeLayer: any, options: any) => Promise<any[]>;
1059
1059
  create3DGroundLabel: (label: any, threeLayer: any) => GroundLabel;
package/dist/index.d.ts CHANGED
@@ -3,8 +3,8 @@ export { QueryObserver } from '@tanstack/query-core';
3
3
  import * as geojson from 'geojson';
4
4
  import { Position, Geometry, GeoJsonProperties, Feature, Point, Polygon, MultiPolygon, LineString, GeometryCollection } from 'geojson';
5
5
  import * as maptalks from 'maptalks';
6
- import { Coordinate, Map, MapViewType, MapAnimationOptionsType, HandlerFn, EventParams, MapPaddingType, Extent, Marker, ui, LineString as LineString$1, Polygon as Polygon$1, MultiPolygon as MultiPolygon$1, MultiLineString } from 'maptalks';
7
- import { BaseObject, ThreeLayer } from 'maptalks.three';
6
+ import { Coordinate, Map, MapViewType, MapAnimationOptionsType, HandlerFn, EventParams, MapPaddingType, Extent } from 'maptalks';
7
+ import { ThreeLayer, BaseObject } from 'maptalks.three';
8
8
  import { ExtrudePolygonOptionType } from 'maptalks.three/dist/type';
9
9
  import { SpriteMaterial, AmbientLight, DirectionalLight } from 'three';
10
10
 
@@ -715,7 +715,7 @@ declare class RendererManager extends EventTarget {
715
715
  private elementsByOrdinal;
716
716
  constructor(map: maptalks.Map, options: RendererManagerOptions);
717
717
  set dataClient(value: any);
718
- getElementsByOrdinal: (ordinal: number) => (BaseObject | maptalks.Geometry | maptalks.ui.UIMarker)[];
718
+ getElementsByOrdinal: (ordinal: number) => any[];
719
719
  changeLevelByOrdinal(targetOrdinal: null | number | number[]): void;
720
720
  createMarker(coordinate: Position, ordinal: number, label: string): void;
721
721
  }
@@ -871,12 +871,12 @@ declare class IndoorMap extends EventTarget {
871
871
  * Change Level & animate to path / geometry / view / etc.
872
872
  * ================================== */
873
873
  changeLevelByOrdinal(ordinal: number | number[]): void;
874
- getFeatureExtent: (feature: any, scaleFactor?: number) => Extent;
875
- getExtentCenter: (extent: Extent) => maptalks.PositionType;
874
+ getFeatureExtent: (feature: any, scaleFactor?: number) => any;
875
+ getExtentCenter: (extent: Extent) => any;
876
876
  getExtentZoom: (extent: Extent, options?: {
877
877
  isFraction?: boolean;
878
878
  padding?: MapPaddingType;
879
- }) => number;
879
+ }) => any;
880
880
  findVenueInView: () => {
881
881
  venueId: string;
882
882
  distance: number;
@@ -942,10 +942,10 @@ declare class IndoorMap extends EventTarget {
942
942
  /**
943
943
  * Other functions
944
944
  */
945
- enableClick: () => Map | maptalks.ClassOptions;
946
- disableClick: () => Map | maptalks.ClassOptions;
947
- freeze: () => Map | maptalks.ClassOptions;
948
- unfreeze: () => Map | maptalks.ClassOptions;
945
+ enableClick: () => any;
946
+ disableClick: () => any;
947
+ freeze: () => any;
948
+ unfreeze: () => any;
949
949
  /**
950
950
  * render (frame)
951
951
  */
@@ -956,8 +956,8 @@ declare class IndoorMap extends EventTarget {
956
956
  right: number;
957
957
  bottom: number;
958
958
  };
959
- }) => Coordinate;
960
- setMaxExtent(extent: Extent): Map;
959
+ }) => any;
960
+ setMaxExtent(extent: Extent): any;
961
961
  render(): void;
962
962
  }
963
963
 
@@ -1038,22 +1038,22 @@ declare function styledFeatureGenerator(mapTheme: any): {
1038
1038
  createVenue: (feature: any) => any;
1039
1039
  createLevel: (feature: any) => any;
1040
1040
  createUnit: (feature: any) => any;
1041
- createMarker: (feature: any) => Marker;
1042
- createOriginMarker: (feature: any) => Marker;
1043
- createDestinationPinMarker: (feature: any, mapConfig: any) => Marker;
1044
- createDestinationLogoMarker: (feature: any, mapConfig?: {}) => Marker;
1045
- createUserLocationMarker: (feature: any) => Marker;
1046
- createLastUserLocationMarker: (feature: any) => Marker;
1047
- createHighlightOccupantMarker: (feature: any, mapConfig: any) => Marker;
1048
- createHighlight2DAmenityMarkerFrom3DMarker: (feature: any, mapConfig: any) => Marker;
1041
+ createMarker: (feature: any) => any;
1042
+ createOriginMarker: (feature: any) => any;
1043
+ createDestinationPinMarker: (feature: any, mapConfig: any) => any;
1044
+ createDestinationLogoMarker: (feature: any, mapConfig?: {}) => any;
1045
+ createUserLocationMarker: (feature: any) => any;
1046
+ createLastUserLocationMarker: (feature: any) => any;
1047
+ createHighlightOccupantMarker: (feature: any, mapConfig: any) => any;
1048
+ createHighlight2DAmenityMarkerFrom3DMarker: (feature: any, mapConfig: any) => any;
1049
1049
  createKiosk: (feature: any) => any;
1050
1050
  createSection: (feature: any) => any;
1051
- createOccupant: (feature: any, location: any, mapConfig: any) => ui.UIMarker | Marker;
1052
- createOpening: (feature: any) => LineString$1;
1051
+ createOccupant: (feature: any, location: any, mapConfig: any) => any;
1052
+ createOpening: (feature: any) => any;
1053
1053
  createFixture: (feature: any) => any;
1054
- createLineStringFromGeometries: (geometries: any) => LineString$1;
1054
+ createLineStringFromGeometries: (geometries: any) => any;
1055
1055
  create3DStepPath: (feature: any, threeLayer: any, option?: {}) => NavigationPath;
1056
- createDecoration: (decoration: any, options: any) => Polygon$1 | MultiPolygon$1 | LineString$1 | MultiLineString;
1056
+ createDecoration: (decoration: any, options: any) => any;
1057
1057
  /** Three JS */
1058
1058
  create3DFootprint: (feature: any, threeLayer: any, options: any) => Promise<any[]>;
1059
1059
  create3DGroundLabel: (label: any, threeLayer: any) => GroundLabel;
package/dist/index.js CHANGED
@@ -3382,9 +3382,11 @@ var createSVGPathFromMarkerSymbol2 = (style) => {
3382
3382
  fill = "#000000"
3383
3383
  } = style;
3384
3384
  const scale2 = markerWidth / 24;
3385
+ const strokeWidth = 2;
3386
+ const halfStrokeWidth = 0.5 * strokeWidth;
3385
3387
  if (Array.isArray(markerPath)) {
3386
3388
  return markerPath.map(
3387
- ({ path, fill: fill2 }) => `<path d="${path}" style="transform:translate(${markerDx}px, ${markerDy}px) scale(${scale2})" fill="${fill2}"/>`
3389
+ ({ path, fill: fill2 }) => `<path d="${path}" style="transform:translate(${markerDx}px, ${markerDy}px) scale(${scale2})" fill="${fill2}" stroke="#ffffff" stroke-width="${strokeWidth}" />`
3388
3390
  );
3389
3391
  }
3390
3392
  return `<path d="${markerPath}" style="transform:translate(${markerDx}px, ${markerDy}px) scale(${scale2})" fill="${fill}" />`;
@@ -3399,7 +3401,6 @@ var createSpriteMaterialByLabelSymbol2 = (labelSymbol) => {
3399
3401
  const baseSVG = createSVGPathFromMarkerSymbol2(base);
3400
3402
  const iconSVG = icon ? createSVGPathFromMarkerSymbol2(icon) : "";
3401
3403
  const svg = `<svg xmlns="http://www.w3.org/2000/svg" width="${viewBoxDimension}" height="${viewBoxDimension}">${baseSVG}${iconSVG}</svg>`;
3402
- console.log(svg);
3403
3404
  const textureLoader = new import_three7.TextureLoader();
3404
3405
  const scaleFactor = 200 / 24;
3405
3406
  svgToDataURL(svg, scaleFactor).then((png) => {
@@ -3489,14 +3490,12 @@ var Element3DRenderer = class extends EventTarget {
3489
3490
  markerType: "path",
3490
3491
  markerPath: [
3491
3492
  {
3492
- path: "M21.75 0H0.25V21.5H8.35L11.3 24L14.2 21.5H21.75V0Z",
3493
+ path: "M20.775 1.2H1.225V20.35H8.215L11.3 22.8L14.385 20.35H20.775V1.2Z",
3493
3494
  fill: "#ff0000"
3494
3495
  }
3495
3496
  ],
3496
3497
  markerPathWidth: 24,
3497
- markerPathHeight: 24,
3498
- markerWidth: 30,
3499
- markerHeight: 30
3498
+ markerPathHeight: 24
3500
3499
  };
3501
3500
  const markerSymbol = {
3502
3501
  markerType: "path",