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 +24 -24
- package/dist/index.d.ts +24 -24
- package/dist/index.js +5 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -6
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
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
|
|
7
|
-
import {
|
|
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) =>
|
|
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) =>
|
|
875
|
-
getExtentCenter: (extent: Extent) =>
|
|
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
|
-
}) =>
|
|
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: () =>
|
|
946
|
-
disableClick: () =>
|
|
947
|
-
freeze: () =>
|
|
948
|
-
unfreeze: () =>
|
|
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
|
-
}) =>
|
|
960
|
-
setMaxExtent(extent: Extent):
|
|
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) =>
|
|
1042
|
-
createOriginMarker: (feature: any) =>
|
|
1043
|
-
createDestinationPinMarker: (feature: any, mapConfig: any) =>
|
|
1044
|
-
createDestinationLogoMarker: (feature: any, mapConfig?: {}) =>
|
|
1045
|
-
createUserLocationMarker: (feature: any) =>
|
|
1046
|
-
createLastUserLocationMarker: (feature: any) =>
|
|
1047
|
-
createHighlightOccupantMarker: (feature: any, mapConfig: any) =>
|
|
1048
|
-
createHighlight2DAmenityMarkerFrom3DMarker: (feature: any, mapConfig: any) =>
|
|
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) =>
|
|
1052
|
-
createOpening: (feature: any) =>
|
|
1051
|
+
createOccupant: (feature: any, location: any, mapConfig: any) => any;
|
|
1052
|
+
createOpening: (feature: any) => any;
|
|
1053
1053
|
createFixture: (feature: any) => any;
|
|
1054
|
-
createLineStringFromGeometries: (geometries: any) =>
|
|
1054
|
+
createLineStringFromGeometries: (geometries: any) => any;
|
|
1055
1055
|
create3DStepPath: (feature: any, threeLayer: any, option?: {}) => NavigationPath;
|
|
1056
|
-
createDecoration: (decoration: any, options: any) =>
|
|
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
|
|
7
|
-
import {
|
|
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) =>
|
|
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) =>
|
|
875
|
-
getExtentCenter: (extent: Extent) =>
|
|
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
|
-
}) =>
|
|
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: () =>
|
|
946
|
-
disableClick: () =>
|
|
947
|
-
freeze: () =>
|
|
948
|
-
unfreeze: () =>
|
|
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
|
-
}) =>
|
|
960
|
-
setMaxExtent(extent: Extent):
|
|
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) =>
|
|
1042
|
-
createOriginMarker: (feature: any) =>
|
|
1043
|
-
createDestinationPinMarker: (feature: any, mapConfig: any) =>
|
|
1044
|
-
createDestinationLogoMarker: (feature: any, mapConfig?: {}) =>
|
|
1045
|
-
createUserLocationMarker: (feature: any) =>
|
|
1046
|
-
createLastUserLocationMarker: (feature: any) =>
|
|
1047
|
-
createHighlightOccupantMarker: (feature: any, mapConfig: any) =>
|
|
1048
|
-
createHighlight2DAmenityMarkerFrom3DMarker: (feature: any, mapConfig: any) =>
|
|
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) =>
|
|
1052
|
-
createOpening: (feature: any) =>
|
|
1051
|
+
createOccupant: (feature: any, location: any, mapConfig: any) => any;
|
|
1052
|
+
createOpening: (feature: any) => any;
|
|
1053
1053
|
createFixture: (feature: any) => any;
|
|
1054
|
-
createLineStringFromGeometries: (geometries: any) =>
|
|
1054
|
+
createLineStringFromGeometries: (geometries: any) => any;
|
|
1055
1055
|
create3DStepPath: (feature: any, threeLayer: any, option?: {}) => NavigationPath;
|
|
1056
|
-
createDecoration: (decoration: any, options: any) =>
|
|
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: "
|
|
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",
|