venue-js 1.2.0-next.12 → 1.2.0-next.13
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 +23 -4
- package/dist/index.d.ts +23 -4
- package/dist/index.js +61 -13
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +59 -13
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -4,14 +4,15 @@ import * as geojson from 'geojson';
|
|
|
4
4
|
import { Position, Geometry, GeoJsonProperties, Feature, Point, Polygon, MultiPolygon, LineString, GeometryCollection } from 'geojson';
|
|
5
5
|
import * as maptalks_dist_core_Class from 'maptalks/dist/core/Class';
|
|
6
6
|
import * as maptalks$1 from 'maptalks-gl';
|
|
7
|
-
import { Map, Coordinate } from 'maptalks-gl';
|
|
7
|
+
import { Map, Coordinate as Coordinate$1 } from 'maptalks-gl';
|
|
8
8
|
import { BaseObject, ThreeLayer } from 'maptalks.three';
|
|
9
9
|
import * as maptalks from 'maptalks';
|
|
10
|
-
import { Extent, Marker, ui, LineString as LineString$1, Polygon as Polygon$1, MultiPolygon as MultiPolygon$1, MultiLineString } from 'maptalks';
|
|
10
|
+
import { Coordinate, Extent, Marker, ui, LineString as LineString$1, Polygon as Polygon$1, MultiPolygon as MultiPolygon$1, MultiLineString } from 'maptalks';
|
|
11
11
|
import { BaseObjectOptionType, ExtrudePolygonOptionType, ExtrudeLineOptionType } from 'maptalks.three/dist/type';
|
|
12
12
|
import { PolygonOptionsType } from 'maptalks/dist/geometry/Polygon';
|
|
13
13
|
import { LineStringOptionsType } from 'maptalks/dist/geometry/LineString';
|
|
14
14
|
import { MapViewType, MapAnimationOptionsType, MapPaddingType } from 'maptalks/dist/map/Map';
|
|
15
|
+
import * as THREE from 'three';
|
|
15
16
|
import { SpriteMaterial } from 'three';
|
|
16
17
|
|
|
17
18
|
type Id = string;
|
|
@@ -795,6 +796,18 @@ type TextMarkerOptions = BaseObjectOptionType & {
|
|
|
795
796
|
stops: Stop[];
|
|
796
797
|
};
|
|
797
798
|
};
|
|
799
|
+
declare class TextSpriteMarker extends BaseObject {
|
|
800
|
+
#private;
|
|
801
|
+
options: TextMarkerOptions;
|
|
802
|
+
constructor(coordinate: Coordinate, options: TextMarkerOptions, layer: ThreeLayer, properties?: Record<string, any>);
|
|
803
|
+
getOptions(): TextMarkerOptions;
|
|
804
|
+
_createSprite(): THREE.Sprite<THREE.Object3DEventMap>;
|
|
805
|
+
_createTextTexture(text: string, options?: TextMarkerOptions): THREE.CanvasTexture;
|
|
806
|
+
_updatePosition(): void;
|
|
807
|
+
_animation(): void;
|
|
808
|
+
setText(text: string): void;
|
|
809
|
+
setAltitude(altitude: number): this;
|
|
810
|
+
}
|
|
798
811
|
|
|
799
812
|
type Stop = [zoom: number, value: number];
|
|
800
813
|
type MapElement = maptalks.Geometry | BaseObject;
|
|
@@ -942,7 +955,7 @@ interface IShortestPathConfig {
|
|
|
942
955
|
interface IAllVenuesViewConfig {
|
|
943
956
|
zoom?: number;
|
|
944
957
|
pitch?: number;
|
|
945
|
-
center?: Coordinate;
|
|
958
|
+
center?: Coordinate$1;
|
|
946
959
|
bearing?: number;
|
|
947
960
|
}
|
|
948
961
|
interface IMapAnimation {
|
|
@@ -997,6 +1010,7 @@ declare class IndoorMap extends EventTarget {
|
|
|
997
1010
|
onMapReady: () => void;
|
|
998
1011
|
onMapLoading: () => void;
|
|
999
1012
|
constructor(elementId: any, options: IndoorMapOptions);
|
|
1013
|
+
setOptions(options: any): void;
|
|
1000
1014
|
set dataClient(value: any);
|
|
1001
1015
|
/**
|
|
1002
1016
|
* Events
|
|
@@ -1090,6 +1104,11 @@ declare class IndoorMap extends EventTarget {
|
|
|
1090
1104
|
render(): void;
|
|
1091
1105
|
}
|
|
1092
1106
|
|
|
1107
|
+
declare class PulsingMarker extends BaseObject {
|
|
1108
|
+
constructor(coordinate: any, options: any, material: any, layer: any);
|
|
1109
|
+
_animation(): void;
|
|
1110
|
+
}
|
|
1111
|
+
|
|
1093
1112
|
declare class Billboard extends BaseObject {
|
|
1094
1113
|
constructor(coordinate: any, options: any, src: any, layer: any, properties: any);
|
|
1095
1114
|
properties: any;
|
|
@@ -1277,4 +1296,4 @@ declare const VENUE_EVENTS: {
|
|
|
1277
1296
|
VENUE_MOVEINTOVIEW: string;
|
|
1278
1297
|
};
|
|
1279
1298
|
|
|
1280
|
-
export { ALL_FEATURE_TYPES, type AmenityFeature, type AmenityFeaturePopulated, type AmenityGeometry, type AmenityProperties, type AnchorFeature, type AnchorFeaturePopulated, type AnchorGeometry, type AnchorProperties, BASE_LAYER_NAME, DEFAULT_BASE_URL, DEFAULT_LOCALE, DESTINATION_MARKER_ID, type DetailFeature, type DetailGeometry, type DetailProperties, type ElementFeature, type ElementGeometry, type ElementProperties, type EventFeature, type EventGeometry, type EventProperties, type FeaturePopulatedResponseMap, type FeatureQueryOptions, type FeatureResponseMap, type FeatureType, type FilterParams, type FindParams, type FixtureFeature, type FixtureFeaturePopulated, type FixtureGeometry, type FixtureProperties, GEOJSON_FEATURE_TYPES, HIGHLIGHT_LAYER_NAME, type IAllVenuesViewConfig, type IExtrudeConfig, type IGraphFeatureOptions, type IGraphOptions, type IHighlightOptions, IMDF_FEATURE_TYPES, type IMapAnimation, type IMapConfig, type IMapExtrudeConfig, type ISetHighlight2DElementIdsOptions, type IUnitDistanceModifier, type IVerticalGraphOptions, type Id, type ImdfFeature, IndoorMap, type IndoorMapOptions, type InternalFilterByType, type InternalFindById, type KioskFeature, type KioskFeaturePopulated, type KioskGeometry, type KioskProperties, LAST_USER_LOCATION_ELEMENT_ID_PREFIX, LAYERS, LAYER_FEATURE_TYPE_OBJ, LAYER_OPTIONS, LOCALE_SYMBOL_KEY, type LabelFeature, type LabelGeometry, type LabelProperties, type LevelFeature, type LevelFeaturePopulated, type LevelGeometry, type LevelProperties, MARKER_LAYER_NAME, type Media, type MediaFile, type Model3d, NONIMDF_FEATURE_TYPES, ORIGIN_MARKER_ID, type OccupantFeature, type OccupantFeaturePopulated, type OccupantGeometry, occupantHelper as OccupantHelpers, type OccupantProperties, type OpeningFeature, type OpeningFeaturePopulated, type OpeningGeometry, type OpeningProperties, POI_MARKER_LAYER_NAME, type Page, type PolygonalFeature, type PopulatableFeatureType, type PopulatedParams, type PrivilegeFeature, type PrivilegeGeometry, type PrivilegeProperties, type PromotionFeature, type PromotionProperties, type RelationshipFeature, type RelationshipGeometry, type RelationshipProperties, type SectionFeature, type SectionFeaturePopulated, type SectionGeometry, type SectionProperties, type SponsoredContentFeature, type SponsoredContentLegacyType, type SponsoredContentPlacementType, type SponsoredContentStrapiV4ApiResponse, type SymbolSet, type TaxonomyFeature, type TaxonomyFeaturePopulated, type TaxonomyGeometry, type TaxonomyProperties, USER_LOCATION_ELEMENT_ID, USER_LOCATION_LAYER_NAME, type UnitFeature, type UnitFeaturePopulated, type UnitGeometry, type UnitProperties, VENUE_EVENTS, type VenueClientOptions, type VenueDataClient, type VenueFeature, type VenueFeaturePopulated, type VenueGeometry, type VenueProperties, createPolygonFromLineString, createSpriteMaterialByLabelSymbol, createStyledUIMarkerElement, defaultFeatureQueryOptionsMap, fetchDeliveryApi, fetchPreviewApi, getBearingBetweenPoints, getCenterFromGeometry, getDataClient, getExtrudeConfigByFeature, getFeatureByLocationId, getLocationByAmenity, getLocationByFeature, getLocationByOccupant, getLocationIdByFeature, getOrdinalByLocationId, getRelatedLocationIdsByFeature, getRelatedLocationsByAmenity, getRelatedLocationsByFeature, getRelatedLocationsByOccupant, getSuitablyValueBetweenBearings, isClickableFeature, isValidCoordinate, isValidLineString, isValidLineStringCoordinates, isValidMultiPolygon, isValidMultiPolygonCoordinates, isValidPoint, isValidPolygon, isValidPolygonCoordinates, matchFilter, matchFilters, safeFetchFeature, styledFeatureGenerator };
|
|
1299
|
+
export { ALL_FEATURE_TYPES, type AmenityFeature, type AmenityFeaturePopulated, type AmenityGeometry, type AmenityProperties, type AnchorFeature, type AnchorFeaturePopulated, type AnchorGeometry, type AnchorProperties, BASE_LAYER_NAME, DEFAULT_BASE_URL, DEFAULT_LOCALE, DESTINATION_MARKER_ID, type DetailFeature, type DetailGeometry, type DetailProperties, type ElementFeature, type ElementGeometry, type ElementProperties, type EventFeature, type EventGeometry, type EventProperties, type FeaturePopulatedResponseMap, type FeatureQueryOptions, type FeatureResponseMap, type FeatureType, type FilterParams, type FindParams, type FixtureFeature, type FixtureFeaturePopulated, type FixtureGeometry, type FixtureProperties, GEOJSON_FEATURE_TYPES, HIGHLIGHT_LAYER_NAME, type IAllVenuesViewConfig, type IExtrudeConfig, type IGraphFeatureOptions, type IGraphOptions, type IHighlightOptions, IMDF_FEATURE_TYPES, type IMapAnimation, type IMapConfig, type IMapExtrudeConfig, type ISetHighlight2DElementIdsOptions, type IUnitDistanceModifier, type IVerticalGraphOptions, type Id, type ImdfFeature, IndoorMap, type IndoorMapOptions, type InternalFilterByType, type InternalFindById, type KioskFeature, type KioskFeaturePopulated, type KioskGeometry, type KioskProperties, LAST_USER_LOCATION_ELEMENT_ID_PREFIX, LAYERS, LAYER_FEATURE_TYPE_OBJ, LAYER_OPTIONS, LOCALE_SYMBOL_KEY, type LabelFeature, type LabelGeometry, type LabelProperties, type LevelFeature, type LevelFeaturePopulated, type LevelGeometry, type LevelProperties, MARKER_LAYER_NAME, type Media, type MediaFile, type Model3d, NONIMDF_FEATURE_TYPES, ORIGIN_MARKER_ID, type OccupantFeature, type OccupantFeaturePopulated, type OccupantGeometry, occupantHelper as OccupantHelpers, type OccupantProperties, type OpeningFeature, type OpeningFeaturePopulated, type OpeningGeometry, type OpeningProperties, POI_MARKER_LAYER_NAME, type Page, type PolygonalFeature, type PopulatableFeatureType, type PopulatedParams, type PrivilegeFeature, type PrivilegeGeometry, type PrivilegeProperties, type PromotionFeature, type PromotionProperties, PulsingMarker, type RelationshipFeature, type RelationshipGeometry, type RelationshipProperties, type SectionFeature, type SectionFeaturePopulated, type SectionGeometry, type SectionProperties, type SponsoredContentFeature, type SponsoredContentLegacyType, type SponsoredContentPlacementType, type SponsoredContentStrapiV4ApiResponse, type SymbolSet, type TaxonomyFeature, type TaxonomyFeaturePopulated, type TaxonomyGeometry, type TaxonomyProperties, type TextMarkerOptions, TextSpriteMarker, USER_LOCATION_ELEMENT_ID, USER_LOCATION_LAYER_NAME, type UnitFeature, type UnitFeaturePopulated, type UnitGeometry, type UnitProperties, VENUE_EVENTS, type VenueClientOptions, type VenueDataClient, type VenueFeature, type VenueFeaturePopulated, type VenueGeometry, type VenueProperties, createPolygonFromLineString, createSpriteMaterialByLabelSymbol, createStyledUIMarkerElement, defaultFeatureQueryOptionsMap, fetchDeliveryApi, fetchPreviewApi, getBearingBetweenPoints, getCenterFromGeometry, getDataClient, getExtrudeConfigByFeature, getFeatureByLocationId, getLocationByAmenity, getLocationByFeature, getLocationByOccupant, getLocationIdByFeature, getOrdinalByLocationId, getRelatedLocationIdsByFeature, getRelatedLocationsByAmenity, getRelatedLocationsByFeature, getRelatedLocationsByOccupant, getSuitablyValueBetweenBearings, isClickableFeature, isValidCoordinate, isValidLineString, isValidLineStringCoordinates, isValidMultiPolygon, isValidMultiPolygonCoordinates, isValidPoint, isValidPolygon, isValidPolygonCoordinates, matchFilter, matchFilters, safeFetchFeature, styledFeatureGenerator };
|
package/dist/index.d.ts
CHANGED
|
@@ -4,14 +4,15 @@ import * as geojson from 'geojson';
|
|
|
4
4
|
import { Position, Geometry, GeoJsonProperties, Feature, Point, Polygon, MultiPolygon, LineString, GeometryCollection } from 'geojson';
|
|
5
5
|
import * as maptalks_dist_core_Class from 'maptalks/dist/core/Class';
|
|
6
6
|
import * as maptalks$1 from 'maptalks-gl';
|
|
7
|
-
import { Map, Coordinate } from 'maptalks-gl';
|
|
7
|
+
import { Map, Coordinate as Coordinate$1 } from 'maptalks-gl';
|
|
8
8
|
import { BaseObject, ThreeLayer } from 'maptalks.three';
|
|
9
9
|
import * as maptalks from 'maptalks';
|
|
10
|
-
import { Extent, Marker, ui, LineString as LineString$1, Polygon as Polygon$1, MultiPolygon as MultiPolygon$1, MultiLineString } from 'maptalks';
|
|
10
|
+
import { Coordinate, Extent, Marker, ui, LineString as LineString$1, Polygon as Polygon$1, MultiPolygon as MultiPolygon$1, MultiLineString } from 'maptalks';
|
|
11
11
|
import { BaseObjectOptionType, ExtrudePolygonOptionType, ExtrudeLineOptionType } from 'maptalks.three/dist/type';
|
|
12
12
|
import { PolygonOptionsType } from 'maptalks/dist/geometry/Polygon';
|
|
13
13
|
import { LineStringOptionsType } from 'maptalks/dist/geometry/LineString';
|
|
14
14
|
import { MapViewType, MapAnimationOptionsType, MapPaddingType } from 'maptalks/dist/map/Map';
|
|
15
|
+
import * as THREE from 'three';
|
|
15
16
|
import { SpriteMaterial } from 'three';
|
|
16
17
|
|
|
17
18
|
type Id = string;
|
|
@@ -795,6 +796,18 @@ type TextMarkerOptions = BaseObjectOptionType & {
|
|
|
795
796
|
stops: Stop[];
|
|
796
797
|
};
|
|
797
798
|
};
|
|
799
|
+
declare class TextSpriteMarker extends BaseObject {
|
|
800
|
+
#private;
|
|
801
|
+
options: TextMarkerOptions;
|
|
802
|
+
constructor(coordinate: Coordinate, options: TextMarkerOptions, layer: ThreeLayer, properties?: Record<string, any>);
|
|
803
|
+
getOptions(): TextMarkerOptions;
|
|
804
|
+
_createSprite(): THREE.Sprite<THREE.Object3DEventMap>;
|
|
805
|
+
_createTextTexture(text: string, options?: TextMarkerOptions): THREE.CanvasTexture;
|
|
806
|
+
_updatePosition(): void;
|
|
807
|
+
_animation(): void;
|
|
808
|
+
setText(text: string): void;
|
|
809
|
+
setAltitude(altitude: number): this;
|
|
810
|
+
}
|
|
798
811
|
|
|
799
812
|
type Stop = [zoom: number, value: number];
|
|
800
813
|
type MapElement = maptalks.Geometry | BaseObject;
|
|
@@ -942,7 +955,7 @@ interface IShortestPathConfig {
|
|
|
942
955
|
interface IAllVenuesViewConfig {
|
|
943
956
|
zoom?: number;
|
|
944
957
|
pitch?: number;
|
|
945
|
-
center?: Coordinate;
|
|
958
|
+
center?: Coordinate$1;
|
|
946
959
|
bearing?: number;
|
|
947
960
|
}
|
|
948
961
|
interface IMapAnimation {
|
|
@@ -997,6 +1010,7 @@ declare class IndoorMap extends EventTarget {
|
|
|
997
1010
|
onMapReady: () => void;
|
|
998
1011
|
onMapLoading: () => void;
|
|
999
1012
|
constructor(elementId: any, options: IndoorMapOptions);
|
|
1013
|
+
setOptions(options: any): void;
|
|
1000
1014
|
set dataClient(value: any);
|
|
1001
1015
|
/**
|
|
1002
1016
|
* Events
|
|
@@ -1090,6 +1104,11 @@ declare class IndoorMap extends EventTarget {
|
|
|
1090
1104
|
render(): void;
|
|
1091
1105
|
}
|
|
1092
1106
|
|
|
1107
|
+
declare class PulsingMarker extends BaseObject {
|
|
1108
|
+
constructor(coordinate: any, options: any, material: any, layer: any);
|
|
1109
|
+
_animation(): void;
|
|
1110
|
+
}
|
|
1111
|
+
|
|
1093
1112
|
declare class Billboard extends BaseObject {
|
|
1094
1113
|
constructor(coordinate: any, options: any, src: any, layer: any, properties: any);
|
|
1095
1114
|
properties: any;
|
|
@@ -1277,4 +1296,4 @@ declare const VENUE_EVENTS: {
|
|
|
1277
1296
|
VENUE_MOVEINTOVIEW: string;
|
|
1278
1297
|
};
|
|
1279
1298
|
|
|
1280
|
-
export { ALL_FEATURE_TYPES, type AmenityFeature, type AmenityFeaturePopulated, type AmenityGeometry, type AmenityProperties, type AnchorFeature, type AnchorFeaturePopulated, type AnchorGeometry, type AnchorProperties, BASE_LAYER_NAME, DEFAULT_BASE_URL, DEFAULT_LOCALE, DESTINATION_MARKER_ID, type DetailFeature, type DetailGeometry, type DetailProperties, type ElementFeature, type ElementGeometry, type ElementProperties, type EventFeature, type EventGeometry, type EventProperties, type FeaturePopulatedResponseMap, type FeatureQueryOptions, type FeatureResponseMap, type FeatureType, type FilterParams, type FindParams, type FixtureFeature, type FixtureFeaturePopulated, type FixtureGeometry, type FixtureProperties, GEOJSON_FEATURE_TYPES, HIGHLIGHT_LAYER_NAME, type IAllVenuesViewConfig, type IExtrudeConfig, type IGraphFeatureOptions, type IGraphOptions, type IHighlightOptions, IMDF_FEATURE_TYPES, type IMapAnimation, type IMapConfig, type IMapExtrudeConfig, type ISetHighlight2DElementIdsOptions, type IUnitDistanceModifier, type IVerticalGraphOptions, type Id, type ImdfFeature, IndoorMap, type IndoorMapOptions, type InternalFilterByType, type InternalFindById, type KioskFeature, type KioskFeaturePopulated, type KioskGeometry, type KioskProperties, LAST_USER_LOCATION_ELEMENT_ID_PREFIX, LAYERS, LAYER_FEATURE_TYPE_OBJ, LAYER_OPTIONS, LOCALE_SYMBOL_KEY, type LabelFeature, type LabelGeometry, type LabelProperties, type LevelFeature, type LevelFeaturePopulated, type LevelGeometry, type LevelProperties, MARKER_LAYER_NAME, type Media, type MediaFile, type Model3d, NONIMDF_FEATURE_TYPES, ORIGIN_MARKER_ID, type OccupantFeature, type OccupantFeaturePopulated, type OccupantGeometry, occupantHelper as OccupantHelpers, type OccupantProperties, type OpeningFeature, type OpeningFeaturePopulated, type OpeningGeometry, type OpeningProperties, POI_MARKER_LAYER_NAME, type Page, type PolygonalFeature, type PopulatableFeatureType, type PopulatedParams, type PrivilegeFeature, type PrivilegeGeometry, type PrivilegeProperties, type PromotionFeature, type PromotionProperties, type RelationshipFeature, type RelationshipGeometry, type RelationshipProperties, type SectionFeature, type SectionFeaturePopulated, type SectionGeometry, type SectionProperties, type SponsoredContentFeature, type SponsoredContentLegacyType, type SponsoredContentPlacementType, type SponsoredContentStrapiV4ApiResponse, type SymbolSet, type TaxonomyFeature, type TaxonomyFeaturePopulated, type TaxonomyGeometry, type TaxonomyProperties, USER_LOCATION_ELEMENT_ID, USER_LOCATION_LAYER_NAME, type UnitFeature, type UnitFeaturePopulated, type UnitGeometry, type UnitProperties, VENUE_EVENTS, type VenueClientOptions, type VenueDataClient, type VenueFeature, type VenueFeaturePopulated, type VenueGeometry, type VenueProperties, createPolygonFromLineString, createSpriteMaterialByLabelSymbol, createStyledUIMarkerElement, defaultFeatureQueryOptionsMap, fetchDeliveryApi, fetchPreviewApi, getBearingBetweenPoints, getCenterFromGeometry, getDataClient, getExtrudeConfigByFeature, getFeatureByLocationId, getLocationByAmenity, getLocationByFeature, getLocationByOccupant, getLocationIdByFeature, getOrdinalByLocationId, getRelatedLocationIdsByFeature, getRelatedLocationsByAmenity, getRelatedLocationsByFeature, getRelatedLocationsByOccupant, getSuitablyValueBetweenBearings, isClickableFeature, isValidCoordinate, isValidLineString, isValidLineStringCoordinates, isValidMultiPolygon, isValidMultiPolygonCoordinates, isValidPoint, isValidPolygon, isValidPolygonCoordinates, matchFilter, matchFilters, safeFetchFeature, styledFeatureGenerator };
|
|
1299
|
+
export { ALL_FEATURE_TYPES, type AmenityFeature, type AmenityFeaturePopulated, type AmenityGeometry, type AmenityProperties, type AnchorFeature, type AnchorFeaturePopulated, type AnchorGeometry, type AnchorProperties, BASE_LAYER_NAME, DEFAULT_BASE_URL, DEFAULT_LOCALE, DESTINATION_MARKER_ID, type DetailFeature, type DetailGeometry, type DetailProperties, type ElementFeature, type ElementGeometry, type ElementProperties, type EventFeature, type EventGeometry, type EventProperties, type FeaturePopulatedResponseMap, type FeatureQueryOptions, type FeatureResponseMap, type FeatureType, type FilterParams, type FindParams, type FixtureFeature, type FixtureFeaturePopulated, type FixtureGeometry, type FixtureProperties, GEOJSON_FEATURE_TYPES, HIGHLIGHT_LAYER_NAME, type IAllVenuesViewConfig, type IExtrudeConfig, type IGraphFeatureOptions, type IGraphOptions, type IHighlightOptions, IMDF_FEATURE_TYPES, type IMapAnimation, type IMapConfig, type IMapExtrudeConfig, type ISetHighlight2DElementIdsOptions, type IUnitDistanceModifier, type IVerticalGraphOptions, type Id, type ImdfFeature, IndoorMap, type IndoorMapOptions, type InternalFilterByType, type InternalFindById, type KioskFeature, type KioskFeaturePopulated, type KioskGeometry, type KioskProperties, LAST_USER_LOCATION_ELEMENT_ID_PREFIX, LAYERS, LAYER_FEATURE_TYPE_OBJ, LAYER_OPTIONS, LOCALE_SYMBOL_KEY, type LabelFeature, type LabelGeometry, type LabelProperties, type LevelFeature, type LevelFeaturePopulated, type LevelGeometry, type LevelProperties, MARKER_LAYER_NAME, type Media, type MediaFile, type Model3d, NONIMDF_FEATURE_TYPES, ORIGIN_MARKER_ID, type OccupantFeature, type OccupantFeaturePopulated, type OccupantGeometry, occupantHelper as OccupantHelpers, type OccupantProperties, type OpeningFeature, type OpeningFeaturePopulated, type OpeningGeometry, type OpeningProperties, POI_MARKER_LAYER_NAME, type Page, type PolygonalFeature, type PopulatableFeatureType, type PopulatedParams, type PrivilegeFeature, type PrivilegeGeometry, type PrivilegeProperties, type PromotionFeature, type PromotionProperties, PulsingMarker, type RelationshipFeature, type RelationshipGeometry, type RelationshipProperties, type SectionFeature, type SectionFeaturePopulated, type SectionGeometry, type SectionProperties, type SponsoredContentFeature, type SponsoredContentLegacyType, type SponsoredContentPlacementType, type SponsoredContentStrapiV4ApiResponse, type SymbolSet, type TaxonomyFeature, type TaxonomyFeaturePopulated, type TaxonomyGeometry, type TaxonomyProperties, type TextMarkerOptions, TextSpriteMarker, USER_LOCATION_ELEMENT_ID, USER_LOCATION_LAYER_NAME, type UnitFeature, type UnitFeaturePopulated, type UnitGeometry, type UnitProperties, VENUE_EVENTS, type VenueClientOptions, type VenueDataClient, type VenueFeature, type VenueFeaturePopulated, type VenueGeometry, type VenueProperties, createPolygonFromLineString, createSpriteMaterialByLabelSymbol, createStyledUIMarkerElement, defaultFeatureQueryOptionsMap, fetchDeliveryApi, fetchPreviewApi, getBearingBetweenPoints, getCenterFromGeometry, getDataClient, getExtrudeConfigByFeature, getFeatureByLocationId, getLocationByAmenity, getLocationByFeature, getLocationByOccupant, getLocationIdByFeature, getOrdinalByLocationId, getRelatedLocationIdsByFeature, getRelatedLocationsByAmenity, getRelatedLocationsByFeature, getRelatedLocationsByOccupant, getSuitablyValueBetweenBearings, isClickableFeature, isValidCoordinate, isValidLineString, isValidLineStringCoordinates, isValidMultiPolygon, isValidMultiPolygonCoordinates, isValidPoint, isValidPolygon, isValidPolygonCoordinates, matchFilter, matchFilters, safeFetchFeature, styledFeatureGenerator };
|
package/dist/index.js
CHANGED
|
@@ -48,7 +48,9 @@ __export(index_exports, {
|
|
|
48
48
|
ORIGIN_MARKER_ID: () => ORIGIN_MARKER_ID,
|
|
49
49
|
OccupantHelpers: () => occupant_helper_exports,
|
|
50
50
|
POI_MARKER_LAYER_NAME: () => POI_MARKER_LAYER_NAME,
|
|
51
|
+
PulsingMarker: () => PulsingMarker,
|
|
51
52
|
QueryObserver: () => import_query_core2.QueryObserver,
|
|
53
|
+
TextSpriteMarker: () => TextSpriteMarker,
|
|
52
54
|
USER_LOCATION_ELEMENT_ID: () => USER_LOCATION_ELEMENT_ID,
|
|
53
55
|
USER_LOCATION_LAYER_NAME: () => USER_LOCATION_LAYER_NAME,
|
|
54
56
|
VENUE_EVENTS: () => VENUE_EVENTS,
|
|
@@ -4036,8 +4038,10 @@ var RendererManager = class extends EventTarget {
|
|
|
4036
4038
|
const elements = elemIds.map((id) => this.elementsMap.get(id)).flat();
|
|
4037
4039
|
elements.forEach((element) => {
|
|
4038
4040
|
const controller = this.elementRenderer.createHighlightController(element);
|
|
4039
|
-
controller.start
|
|
4040
|
-
|
|
4041
|
+
if (controller && (0, import_isFunction.default)(controller.start)) {
|
|
4042
|
+
controller.start();
|
|
4043
|
+
this.highlightControllers.push(controller);
|
|
4044
|
+
}
|
|
4041
4045
|
});
|
|
4042
4046
|
};
|
|
4043
4047
|
clearHighlightElements = () => {
|
|
@@ -4087,6 +4091,20 @@ var defaultOptions = {
|
|
|
4087
4091
|
interactions: true,
|
|
4088
4092
|
locale: DEFAULT_LOCALE
|
|
4089
4093
|
};
|
|
4094
|
+
var parseMaptalksOptions = (options) => {
|
|
4095
|
+
return {
|
|
4096
|
+
centerCross: options.centerCross ?? false,
|
|
4097
|
+
...options.interactions === false ? {
|
|
4098
|
+
draggable: false,
|
|
4099
|
+
dragPan: false,
|
|
4100
|
+
dragRotate: false,
|
|
4101
|
+
dragPitch: false,
|
|
4102
|
+
scrollWheelZoom: false,
|
|
4103
|
+
touchZoom: false,
|
|
4104
|
+
doubleClickZoom: false
|
|
4105
|
+
} : {}
|
|
4106
|
+
};
|
|
4107
|
+
};
|
|
4090
4108
|
var IndoorMap = class extends EventTarget {
|
|
4091
4109
|
options;
|
|
4092
4110
|
//TODO: refac functions; let them do only 1 thing in a function
|
|
@@ -4141,13 +4159,14 @@ var IndoorMap = class extends EventTarget {
|
|
|
4141
4159
|
constructor(elementId, options) {
|
|
4142
4160
|
super();
|
|
4143
4161
|
const combinedOptions = import_lodash6.default.merge({}, defaultOptions, options);
|
|
4144
|
-
this.options =
|
|
4162
|
+
this.options = combinedOptions;
|
|
4145
4163
|
const {
|
|
4146
4164
|
onMapReady,
|
|
4147
4165
|
onMapLoading,
|
|
4148
4166
|
pixelRatio,
|
|
4149
4167
|
locale
|
|
4150
4168
|
} = combinedOptions;
|
|
4169
|
+
const maptalksOptions = parseMaptalksOptions(combinedOptions);
|
|
4151
4170
|
this.map = new import_maptalks_gl.Map(elementId, {
|
|
4152
4171
|
attribution: false,
|
|
4153
4172
|
// Temporart set, not really default view
|
|
@@ -4155,16 +4174,7 @@ var IndoorMap = class extends EventTarget {
|
|
|
4155
4174
|
center: INITIAL_CENTER,
|
|
4156
4175
|
zoom: INITIAL_ZOOM,
|
|
4157
4176
|
clickTimeThreshold: 600,
|
|
4158
|
-
|
|
4159
|
-
...options.interactions === false ? {
|
|
4160
|
-
draggable: false,
|
|
4161
|
-
dragPan: false,
|
|
4162
|
-
dragRotate: false,
|
|
4163
|
-
dragPitch: false,
|
|
4164
|
-
scrollWheelZoom: false,
|
|
4165
|
-
touchZoom: false,
|
|
4166
|
-
doubleClickZoom: false
|
|
4167
|
-
} : {},
|
|
4177
|
+
...maptalksOptions,
|
|
4168
4178
|
baseLayer: new import_maptalks_gl.TileLayer("base", {
|
|
4169
4179
|
urlTemplate: "https://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}.png",
|
|
4170
4180
|
subdomains: ["a", "b", "c", "d"],
|
|
@@ -4194,6 +4204,12 @@ var IndoorMap = class extends EventTarget {
|
|
|
4194
4204
|
this.map.on("click", this.handleMapClick);
|
|
4195
4205
|
this.dataClient = options.dataClient;
|
|
4196
4206
|
}
|
|
4207
|
+
setOptions(options) {
|
|
4208
|
+
const combinedOptions = import_lodash6.default.merge({}, defaultOptions, options);
|
|
4209
|
+
this.options = combinedOptions;
|
|
4210
|
+
const maptalksOptions = parseMaptalksOptions(combinedOptions);
|
|
4211
|
+
this.map.setOptions(maptalksOptions);
|
|
4212
|
+
}
|
|
4197
4213
|
set dataClient(value) {
|
|
4198
4214
|
this.#dataClient = value;
|
|
4199
4215
|
if (!this.options.camera?.defaultView?.center) {
|
|
@@ -4859,6 +4875,36 @@ var IndoorMap = class extends EventTarget {
|
|
|
4859
4875
|
requestAnimationFrame(this.render.bind(this));
|
|
4860
4876
|
}
|
|
4861
4877
|
};
|
|
4878
|
+
|
|
4879
|
+
// src/IndoorMap/renderer/3d/objects/PulsingMarker.ts
|
|
4880
|
+
var maptalks8 = __toESM(require("maptalks-gl"));
|
|
4881
|
+
var import_maptalks11 = require("maptalks.three");
|
|
4882
|
+
var THREE4 = __toESM(require("three"));
|
|
4883
|
+
var OPTIONS5 = {
|
|
4884
|
+
radius: 100,
|
|
4885
|
+
altitude: 0
|
|
4886
|
+
};
|
|
4887
|
+
var PulsingMarker = class extends import_maptalks11.BaseObject {
|
|
4888
|
+
constructor(coordinate, options, material, layer) {
|
|
4889
|
+
options = maptalks8.Util.extend({}, OPTIONS5, options, { layer, coordinate });
|
|
4890
|
+
super();
|
|
4891
|
+
this._initOptions(options);
|
|
4892
|
+
const { altitude, radius } = options;
|
|
4893
|
+
const r = layer.distanceToVector3(radius, radius).x;
|
|
4894
|
+
const geometry = new THREE4.CircleGeometry(r, 50);
|
|
4895
|
+
this._createMesh(geometry, material);
|
|
4896
|
+
const z = layer.altitudeToVector3(altitude, altitude).x;
|
|
4897
|
+
const position = layer.coordinateToVector3(coordinate, z);
|
|
4898
|
+
this.getObject3d().position.copy(position);
|
|
4899
|
+
this._scale = 1;
|
|
4900
|
+
}
|
|
4901
|
+
// test animation
|
|
4902
|
+
_animation() {
|
|
4903
|
+
this._scale = this._scale > 1 ? 0 : this._scale;
|
|
4904
|
+
this._scale += 0.02;
|
|
4905
|
+
this.getObject3d().scale.set(this._scale, this._scale, this._scale);
|
|
4906
|
+
}
|
|
4907
|
+
};
|
|
4862
4908
|
// Annotate the CommonJS export names for ESM import in node:
|
|
4863
4909
|
0 && (module.exports = {
|
|
4864
4910
|
ALL_FEATURE_TYPES,
|
|
@@ -4880,7 +4926,9 @@ var IndoorMap = class extends EventTarget {
|
|
|
4880
4926
|
ORIGIN_MARKER_ID,
|
|
4881
4927
|
OccupantHelpers,
|
|
4882
4928
|
POI_MARKER_LAYER_NAME,
|
|
4929
|
+
PulsingMarker,
|
|
4883
4930
|
QueryObserver,
|
|
4931
|
+
TextSpriteMarker,
|
|
4884
4932
|
USER_LOCATION_ELEMENT_ID,
|
|
4885
4933
|
USER_LOCATION_LAYER_NAME,
|
|
4886
4934
|
VENUE_EVENTS,
|