venue-js 1.2.0-next.9 → 1.3.0-next.1
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 +61 -64
- package/dist/index.d.ts +61 -64
- package/dist/index.js +1298 -959
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1262 -925
- package/dist/index.mjs.map +1 -1
- package/package.json +10 -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 } 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 {
|
|
11
|
-
import { BaseObjectOptionType, ExtrudePolygonOptionType } from 'maptalks.three/dist/type';
|
|
10
|
+
import { Coordinate, Extent, Marker, ui, LineString as LineString$1, Polygon as Polygon$1, MultiPolygon as MultiPolygon$1, MultiLineString } from 'maptalks';
|
|
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;
|
|
@@ -149,7 +150,8 @@ type LevelFeature = ImdfFeature<LevelGeometry, LevelProperties>;
|
|
|
149
150
|
type OccupantGeometry = null;
|
|
150
151
|
type OccupantProperties = EntityTimestamps & {
|
|
151
152
|
anchor_id: Id;
|
|
152
|
-
category: string;
|
|
153
|
+
category: string | null;
|
|
154
|
+
category_group: string | null;
|
|
153
155
|
cover_image: Media | null;
|
|
154
156
|
description: TransalatableString;
|
|
155
157
|
featured_image: Media | null;
|
|
@@ -327,10 +329,7 @@ type PrivilegeProperties = {
|
|
|
327
329
|
venue_id: Id;
|
|
328
330
|
};
|
|
329
331
|
type PrivilegeFeature = ImdfFeature<PrivilegeGeometry, PrivilegeProperties>;
|
|
330
|
-
type LabelGeometry =
|
|
331
|
-
geometry_type: string;
|
|
332
|
-
cooordinates: Position[][];
|
|
333
|
-
};
|
|
332
|
+
type LabelGeometry = Polygon;
|
|
334
333
|
type LabelProperties = {
|
|
335
334
|
name: string;
|
|
336
335
|
ordinal: number;
|
|
@@ -338,12 +337,7 @@ type LabelProperties = {
|
|
|
338
337
|
angle: number;
|
|
339
338
|
fontSize: number;
|
|
340
339
|
};
|
|
341
|
-
type LabelFeature =
|
|
342
|
-
type: "Feature";
|
|
343
|
-
geometry: LabelGeometry;
|
|
344
|
-
id: Id;
|
|
345
|
-
properties: LabelProperties;
|
|
346
|
-
};
|
|
340
|
+
type LabelFeature = ImdfFeature<LabelGeometry, LabelProperties>;
|
|
347
341
|
type ElementGeometry = null;
|
|
348
342
|
type ElementProperties = EntityTimestamps & {
|
|
349
343
|
geometries: Array<{
|
|
@@ -400,6 +394,29 @@ type Page = {
|
|
|
400
394
|
id: Id;
|
|
401
395
|
attributes: Record<string, unknown>;
|
|
402
396
|
};
|
|
397
|
+
type Model3dGeometry = null;
|
|
398
|
+
type Model3dProperties = {
|
|
399
|
+
name: {
|
|
400
|
+
en: string;
|
|
401
|
+
};
|
|
402
|
+
model: string;
|
|
403
|
+
level_id: null;
|
|
404
|
+
project_id: string;
|
|
405
|
+
rotation_x: number;
|
|
406
|
+
rotation_y: number;
|
|
407
|
+
rotation_z: number;
|
|
408
|
+
center: number[];
|
|
409
|
+
scale: number;
|
|
410
|
+
altitude: 0;
|
|
411
|
+
translation_x: number;
|
|
412
|
+
translation_y: number;
|
|
413
|
+
translation_z: number;
|
|
414
|
+
createdAt: string;
|
|
415
|
+
updatedAt: string;
|
|
416
|
+
publishedAt: string;
|
|
417
|
+
locale: string;
|
|
418
|
+
};
|
|
419
|
+
type Model3dFeature = ImdfFeature<Model3dGeometry, Model3dProperties>;
|
|
403
420
|
type FeatureResponseMap = {
|
|
404
421
|
address: ImdfFeature;
|
|
405
422
|
amenity: AmenityFeature;
|
|
@@ -423,6 +440,7 @@ type FeatureResponseMap = {
|
|
|
423
440
|
promotion: PromotionFeature;
|
|
424
441
|
label: LabelFeature;
|
|
425
442
|
element: ElementFeature;
|
|
443
|
+
model3d: Model3dFeature;
|
|
426
444
|
"sponsored-content": SponsoredContentFeature;
|
|
427
445
|
page: Page;
|
|
428
446
|
};
|
|
@@ -648,6 +666,7 @@ type FeaturePopulatedResponseMap = {
|
|
|
648
666
|
promotion: PromotionFeature;
|
|
649
667
|
label: LabelFeature;
|
|
650
668
|
element: ImdfFeature;
|
|
669
|
+
model3d: Model3dFeature;
|
|
651
670
|
"sponsored-content": SponsoredContentFeature;
|
|
652
671
|
page: Page;
|
|
653
672
|
};
|
|
@@ -795,6 +814,18 @@ type TextMarkerOptions = BaseObjectOptionType & {
|
|
|
795
814
|
stops: Stop[];
|
|
796
815
|
};
|
|
797
816
|
};
|
|
817
|
+
declare class TextSpriteMarker extends BaseObject {
|
|
818
|
+
#private;
|
|
819
|
+
options: TextMarkerOptions;
|
|
820
|
+
constructor(coordinate: Coordinate, options: TextMarkerOptions, layer: ThreeLayer, properties?: Record<string, any>);
|
|
821
|
+
getOptions(): TextMarkerOptions;
|
|
822
|
+
_createSprite(): THREE.Sprite<THREE.Object3DEventMap>;
|
|
823
|
+
_createTextTexture(text: string, options?: TextMarkerOptions): THREE.CanvasTexture;
|
|
824
|
+
_updatePosition(): void;
|
|
825
|
+
_animation(): void;
|
|
826
|
+
setText(text: string): void;
|
|
827
|
+
setAltitude(altitude: number): this;
|
|
828
|
+
}
|
|
798
829
|
|
|
799
830
|
type Stop = [zoom: number, value: number];
|
|
800
831
|
type MapElement = maptalks.Geometry | BaseObject;
|
|
@@ -810,12 +841,23 @@ type Element2DRendererOptions = {
|
|
|
810
841
|
fixture?: TypeRenderOptions<PolygonOptionsType>;
|
|
811
842
|
};
|
|
812
843
|
/** 3D */
|
|
844
|
+
type CreateExtrudeLineStringOptionType = ExtrudeLineOptionType & {
|
|
845
|
+
color?: string;
|
|
846
|
+
offset?: number;
|
|
847
|
+
};
|
|
813
848
|
type CreateExtrudePolygonOptionType = ExtrudePolygonOptionType & {
|
|
814
849
|
color?: string;
|
|
815
850
|
offset?: number;
|
|
816
851
|
};
|
|
817
852
|
type Element3DRendererOptions = {
|
|
818
|
-
fixture?:
|
|
853
|
+
fixture?: {
|
|
854
|
+
default: CreateExtrudePolygonOptionType;
|
|
855
|
+
byCategory: {
|
|
856
|
+
water: CreateExtrudePolygonOptionType;
|
|
857
|
+
vegetation: CreateExtrudePolygonOptionType;
|
|
858
|
+
wall: CreateExtrudeLineStringOptionType;
|
|
859
|
+
};
|
|
860
|
+
};
|
|
819
861
|
kiosk?: TypeRenderOptions<CreateExtrudePolygonOptionType>;
|
|
820
862
|
unit?: TypeRenderOptions<CreateExtrudePolygonOptionType>;
|
|
821
863
|
};
|
|
@@ -891,6 +933,7 @@ declare class CameraManager {
|
|
|
891
933
|
interface IndoorMapOptions {
|
|
892
934
|
onMapReady?: () => void;
|
|
893
935
|
onMapLoading?: () => void;
|
|
936
|
+
interactions?: boolean;
|
|
894
937
|
centerCross?: boolean;
|
|
895
938
|
dataClient: VenueDataClient;
|
|
896
939
|
camera?: CameraManagerOptions;
|
|
@@ -907,10 +950,6 @@ interface ISetHighlight2DElementIdsOptions {
|
|
|
907
950
|
symbolSet?: SymbolSet;
|
|
908
951
|
defaultMarker?: boolean;
|
|
909
952
|
}
|
|
910
|
-
interface ISetHighlightElementIdsOptions {
|
|
911
|
-
highlight3DOptions?: IHighlightOptions;
|
|
912
|
-
highlight2DOptions?: ISetHighlight2DElementIdsOptions;
|
|
913
|
-
}
|
|
914
953
|
interface IMapExtrudeConfig {
|
|
915
954
|
height: number;
|
|
916
955
|
category: string;
|
|
@@ -934,7 +973,7 @@ interface IShortestPathConfig {
|
|
|
934
973
|
interface IAllVenuesViewConfig {
|
|
935
974
|
zoom?: number;
|
|
936
975
|
pitch?: number;
|
|
937
|
-
center?: Coordinate;
|
|
976
|
+
center?: Coordinate$1;
|
|
938
977
|
bearing?: number;
|
|
939
978
|
}
|
|
940
979
|
interface IMapAnimation {
|
|
@@ -989,6 +1028,7 @@ declare class IndoorMap extends EventTarget {
|
|
|
989
1028
|
onMapReady: () => void;
|
|
990
1029
|
onMapLoading: () => void;
|
|
991
1030
|
constructor(elementId: any, options: IndoorMapOptions);
|
|
1031
|
+
setOptions(options: any): void;
|
|
992
1032
|
set dataClient(value: any);
|
|
993
1033
|
/**
|
|
994
1034
|
* Events
|
|
@@ -1011,7 +1051,6 @@ declare class IndoorMap extends EventTarget {
|
|
|
1011
1051
|
set detectVenueInView(value: any);
|
|
1012
1052
|
set billboards(value: any);
|
|
1013
1053
|
set mapDecorations(value: any);
|
|
1014
|
-
set groundLabels(value: any);
|
|
1015
1054
|
set pixelRatio(value: number);
|
|
1016
1055
|
set onClickElement(func: any);
|
|
1017
1056
|
set locale(value: string);
|
|
@@ -1031,18 +1070,6 @@ declare class IndoorMap extends EventTarget {
|
|
|
1031
1070
|
}): void;
|
|
1032
1071
|
removeAnimationById(id: string): void;
|
|
1033
1072
|
clearAnimations(): void;
|
|
1034
|
-
/**
|
|
1035
|
-
* Hilighting Elements
|
|
1036
|
-
* ========================================= */
|
|
1037
|
-
setHighlightElementIds(targetElementIds: any, options?: ISetHighlightElementIdsOptions): geojson.FeatureCollection<geojson.Geometry, {
|
|
1038
|
-
[name: string]: any;
|
|
1039
|
-
}>;
|
|
1040
|
-
setHighlight2DElementIds(targetElementIds: any, options?: {}): geojson.FeatureCollection<geojson.Geometry, {
|
|
1041
|
-
[name: string]: any;
|
|
1042
|
-
}>;
|
|
1043
|
-
clearHighlightElements(): void;
|
|
1044
|
-
setHighlightedObject(targetObjectIds: any, options?: {}): void;
|
|
1045
|
-
clearHighlightObject(): void;
|
|
1046
1073
|
/**
|
|
1047
1074
|
* User Location
|
|
1048
1075
|
****************************/
|
|
@@ -1101,29 +1128,6 @@ declare class Billboard extends BaseObject {
|
|
|
1101
1128
|
#private;
|
|
1102
1129
|
}
|
|
1103
1130
|
|
|
1104
|
-
declare class GroundLabel extends BaseObject {
|
|
1105
|
-
#private;
|
|
1106
|
-
constructor(bound: any, options: any, layer: any);
|
|
1107
|
-
set bearing(value: any);
|
|
1108
|
-
get angle(): number;
|
|
1109
|
-
get currentAngle(): number;
|
|
1110
|
-
get text(): string;
|
|
1111
|
-
get offsetX(): number;
|
|
1112
|
-
get offsetY(): number;
|
|
1113
|
-
get offset(): {
|
|
1114
|
-
x: number;
|
|
1115
|
-
y: number;
|
|
1116
|
-
};
|
|
1117
|
-
set offsetX(value: number);
|
|
1118
|
-
set offsetY(value: number);
|
|
1119
|
-
set angle(newAngle: number);
|
|
1120
|
-
setOffset(offsetX: any, offsetY: any): void;
|
|
1121
|
-
addOffset(deltaX: any, deltaY: any): void;
|
|
1122
|
-
resetOffset(): void;
|
|
1123
|
-
moveToPosition(targetX: any, targetY: any): void;
|
|
1124
|
-
updateText(newText: any, options?: Record<string, unknown>): void;
|
|
1125
|
-
}
|
|
1126
|
-
|
|
1127
1131
|
interface IOptions {
|
|
1128
1132
|
scale: number;
|
|
1129
1133
|
altitude: number;
|
|
@@ -1185,10 +1189,6 @@ declare function styledFeatureGenerator(mapTheme: any): {
|
|
|
1185
1189
|
createLineStringFromGeometries: (geometries: any) => LineString$1;
|
|
1186
1190
|
create3DStepPath: (feature: any, threeLayer: any, option?: {}) => NavigationPath;
|
|
1187
1191
|
createDecoration: (decoration: any, options: any) => LineString$1 | Polygon$1 | MultiPolygon$1 | MultiLineString;
|
|
1188
|
-
/** Three JS */
|
|
1189
|
-
create3DFootprint: (feature: any, threeLayer: any, options: any) => Promise<any[]>;
|
|
1190
|
-
create3DGroundLabel: (label: any, threeLayer: any) => GroundLabel;
|
|
1191
|
-
createOccupantGroundLabel: (feature: any, location: any, mapConfig: any, threeLayer: any) => GroundLabel;
|
|
1192
1192
|
create3DBillboard: (billboard: any, threeLayer: any) => Billboard;
|
|
1193
1193
|
create3DAmenityMarker: (feature: any, threeLayer: any, config: any) => SpriteMarker;
|
|
1194
1194
|
create3DOccupantAmenityMarker: (feature: any, threeLayer: any, config: any) => SpriteMarker;
|
|
@@ -1220,7 +1220,6 @@ declare const getSuitablyValueBetweenBearings: GetSuitablyValueBetweenBearings;
|
|
|
1220
1220
|
declare const getCenterFromGeometry: (geometry?: Polygon | MultiPolygon | Point | LineString) => number[] | null;
|
|
1221
1221
|
declare const createPolygonFromLineString: (geometry: any) => geojson.Position[][];
|
|
1222
1222
|
|
|
1223
|
-
declare const ALWAYS_VISIBLE_FEATURE_TYPES: string[];
|
|
1224
1223
|
declare const BASE_LAYER_NAME = "base";
|
|
1225
1224
|
declare const POI_MARKER_LAYER_NAME = "poi";
|
|
1226
1225
|
declare const MARKER_LAYER_NAME = "marker";
|
|
@@ -1232,8 +1231,6 @@ declare const USER_LOCATION_ELEMENT_ID = "user_location";
|
|
|
1232
1231
|
declare const LAST_USER_LOCATION_ELEMENT_ID_PREFIX = "last_user_location-";
|
|
1233
1232
|
declare const LOCALE_SYMBOL_KEY = "locale_symbol";
|
|
1234
1233
|
declare const DEFAULT_LOCALE = "en";
|
|
1235
|
-
declare const DEFAULT_HIGHLIGHT_OPTIONS: IHighlightOptions;
|
|
1236
|
-
declare const DEFAULT_SET_HIGHLIGHT_2DELEMENT_IDS_OPTIONS: ISetHighlight2DElementIdsOptions;
|
|
1237
1234
|
declare const LAYERS: string[];
|
|
1238
1235
|
declare const LAYER_OPTIONS: {
|
|
1239
1236
|
base: {
|
|
@@ -1284,4 +1281,4 @@ declare const VENUE_EVENTS: {
|
|
|
1284
1281
|
VENUE_MOVEINTOVIEW: string;
|
|
1285
1282
|
};
|
|
1286
1283
|
|
|
1287
|
-
export { ALL_FEATURE_TYPES,
|
|
1284
|
+
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, type Model3dFeature, type Model3dGeometry, type Model3dProperties, 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, 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 } 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 {
|
|
11
|
-
import { BaseObjectOptionType, ExtrudePolygonOptionType } from 'maptalks.three/dist/type';
|
|
10
|
+
import { Coordinate, Extent, Marker, ui, LineString as LineString$1, Polygon as Polygon$1, MultiPolygon as MultiPolygon$1, MultiLineString } from 'maptalks';
|
|
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;
|
|
@@ -149,7 +150,8 @@ type LevelFeature = ImdfFeature<LevelGeometry, LevelProperties>;
|
|
|
149
150
|
type OccupantGeometry = null;
|
|
150
151
|
type OccupantProperties = EntityTimestamps & {
|
|
151
152
|
anchor_id: Id;
|
|
152
|
-
category: string;
|
|
153
|
+
category: string | null;
|
|
154
|
+
category_group: string | null;
|
|
153
155
|
cover_image: Media | null;
|
|
154
156
|
description: TransalatableString;
|
|
155
157
|
featured_image: Media | null;
|
|
@@ -327,10 +329,7 @@ type PrivilegeProperties = {
|
|
|
327
329
|
venue_id: Id;
|
|
328
330
|
};
|
|
329
331
|
type PrivilegeFeature = ImdfFeature<PrivilegeGeometry, PrivilegeProperties>;
|
|
330
|
-
type LabelGeometry =
|
|
331
|
-
geometry_type: string;
|
|
332
|
-
cooordinates: Position[][];
|
|
333
|
-
};
|
|
332
|
+
type LabelGeometry = Polygon;
|
|
334
333
|
type LabelProperties = {
|
|
335
334
|
name: string;
|
|
336
335
|
ordinal: number;
|
|
@@ -338,12 +337,7 @@ type LabelProperties = {
|
|
|
338
337
|
angle: number;
|
|
339
338
|
fontSize: number;
|
|
340
339
|
};
|
|
341
|
-
type LabelFeature =
|
|
342
|
-
type: "Feature";
|
|
343
|
-
geometry: LabelGeometry;
|
|
344
|
-
id: Id;
|
|
345
|
-
properties: LabelProperties;
|
|
346
|
-
};
|
|
340
|
+
type LabelFeature = ImdfFeature<LabelGeometry, LabelProperties>;
|
|
347
341
|
type ElementGeometry = null;
|
|
348
342
|
type ElementProperties = EntityTimestamps & {
|
|
349
343
|
geometries: Array<{
|
|
@@ -400,6 +394,29 @@ type Page = {
|
|
|
400
394
|
id: Id;
|
|
401
395
|
attributes: Record<string, unknown>;
|
|
402
396
|
};
|
|
397
|
+
type Model3dGeometry = null;
|
|
398
|
+
type Model3dProperties = {
|
|
399
|
+
name: {
|
|
400
|
+
en: string;
|
|
401
|
+
};
|
|
402
|
+
model: string;
|
|
403
|
+
level_id: null;
|
|
404
|
+
project_id: string;
|
|
405
|
+
rotation_x: number;
|
|
406
|
+
rotation_y: number;
|
|
407
|
+
rotation_z: number;
|
|
408
|
+
center: number[];
|
|
409
|
+
scale: number;
|
|
410
|
+
altitude: 0;
|
|
411
|
+
translation_x: number;
|
|
412
|
+
translation_y: number;
|
|
413
|
+
translation_z: number;
|
|
414
|
+
createdAt: string;
|
|
415
|
+
updatedAt: string;
|
|
416
|
+
publishedAt: string;
|
|
417
|
+
locale: string;
|
|
418
|
+
};
|
|
419
|
+
type Model3dFeature = ImdfFeature<Model3dGeometry, Model3dProperties>;
|
|
403
420
|
type FeatureResponseMap = {
|
|
404
421
|
address: ImdfFeature;
|
|
405
422
|
amenity: AmenityFeature;
|
|
@@ -423,6 +440,7 @@ type FeatureResponseMap = {
|
|
|
423
440
|
promotion: PromotionFeature;
|
|
424
441
|
label: LabelFeature;
|
|
425
442
|
element: ElementFeature;
|
|
443
|
+
model3d: Model3dFeature;
|
|
426
444
|
"sponsored-content": SponsoredContentFeature;
|
|
427
445
|
page: Page;
|
|
428
446
|
};
|
|
@@ -648,6 +666,7 @@ type FeaturePopulatedResponseMap = {
|
|
|
648
666
|
promotion: PromotionFeature;
|
|
649
667
|
label: LabelFeature;
|
|
650
668
|
element: ImdfFeature;
|
|
669
|
+
model3d: Model3dFeature;
|
|
651
670
|
"sponsored-content": SponsoredContentFeature;
|
|
652
671
|
page: Page;
|
|
653
672
|
};
|
|
@@ -795,6 +814,18 @@ type TextMarkerOptions = BaseObjectOptionType & {
|
|
|
795
814
|
stops: Stop[];
|
|
796
815
|
};
|
|
797
816
|
};
|
|
817
|
+
declare class TextSpriteMarker extends BaseObject {
|
|
818
|
+
#private;
|
|
819
|
+
options: TextMarkerOptions;
|
|
820
|
+
constructor(coordinate: Coordinate, options: TextMarkerOptions, layer: ThreeLayer, properties?: Record<string, any>);
|
|
821
|
+
getOptions(): TextMarkerOptions;
|
|
822
|
+
_createSprite(): THREE.Sprite<THREE.Object3DEventMap>;
|
|
823
|
+
_createTextTexture(text: string, options?: TextMarkerOptions): THREE.CanvasTexture;
|
|
824
|
+
_updatePosition(): void;
|
|
825
|
+
_animation(): void;
|
|
826
|
+
setText(text: string): void;
|
|
827
|
+
setAltitude(altitude: number): this;
|
|
828
|
+
}
|
|
798
829
|
|
|
799
830
|
type Stop = [zoom: number, value: number];
|
|
800
831
|
type MapElement = maptalks.Geometry | BaseObject;
|
|
@@ -810,12 +841,23 @@ type Element2DRendererOptions = {
|
|
|
810
841
|
fixture?: TypeRenderOptions<PolygonOptionsType>;
|
|
811
842
|
};
|
|
812
843
|
/** 3D */
|
|
844
|
+
type CreateExtrudeLineStringOptionType = ExtrudeLineOptionType & {
|
|
845
|
+
color?: string;
|
|
846
|
+
offset?: number;
|
|
847
|
+
};
|
|
813
848
|
type CreateExtrudePolygonOptionType = ExtrudePolygonOptionType & {
|
|
814
849
|
color?: string;
|
|
815
850
|
offset?: number;
|
|
816
851
|
};
|
|
817
852
|
type Element3DRendererOptions = {
|
|
818
|
-
fixture?:
|
|
853
|
+
fixture?: {
|
|
854
|
+
default: CreateExtrudePolygonOptionType;
|
|
855
|
+
byCategory: {
|
|
856
|
+
water: CreateExtrudePolygonOptionType;
|
|
857
|
+
vegetation: CreateExtrudePolygonOptionType;
|
|
858
|
+
wall: CreateExtrudeLineStringOptionType;
|
|
859
|
+
};
|
|
860
|
+
};
|
|
819
861
|
kiosk?: TypeRenderOptions<CreateExtrudePolygonOptionType>;
|
|
820
862
|
unit?: TypeRenderOptions<CreateExtrudePolygonOptionType>;
|
|
821
863
|
};
|
|
@@ -891,6 +933,7 @@ declare class CameraManager {
|
|
|
891
933
|
interface IndoorMapOptions {
|
|
892
934
|
onMapReady?: () => void;
|
|
893
935
|
onMapLoading?: () => void;
|
|
936
|
+
interactions?: boolean;
|
|
894
937
|
centerCross?: boolean;
|
|
895
938
|
dataClient: VenueDataClient;
|
|
896
939
|
camera?: CameraManagerOptions;
|
|
@@ -907,10 +950,6 @@ interface ISetHighlight2DElementIdsOptions {
|
|
|
907
950
|
symbolSet?: SymbolSet;
|
|
908
951
|
defaultMarker?: boolean;
|
|
909
952
|
}
|
|
910
|
-
interface ISetHighlightElementIdsOptions {
|
|
911
|
-
highlight3DOptions?: IHighlightOptions;
|
|
912
|
-
highlight2DOptions?: ISetHighlight2DElementIdsOptions;
|
|
913
|
-
}
|
|
914
953
|
interface IMapExtrudeConfig {
|
|
915
954
|
height: number;
|
|
916
955
|
category: string;
|
|
@@ -934,7 +973,7 @@ interface IShortestPathConfig {
|
|
|
934
973
|
interface IAllVenuesViewConfig {
|
|
935
974
|
zoom?: number;
|
|
936
975
|
pitch?: number;
|
|
937
|
-
center?: Coordinate;
|
|
976
|
+
center?: Coordinate$1;
|
|
938
977
|
bearing?: number;
|
|
939
978
|
}
|
|
940
979
|
interface IMapAnimation {
|
|
@@ -989,6 +1028,7 @@ declare class IndoorMap extends EventTarget {
|
|
|
989
1028
|
onMapReady: () => void;
|
|
990
1029
|
onMapLoading: () => void;
|
|
991
1030
|
constructor(elementId: any, options: IndoorMapOptions);
|
|
1031
|
+
setOptions(options: any): void;
|
|
992
1032
|
set dataClient(value: any);
|
|
993
1033
|
/**
|
|
994
1034
|
* Events
|
|
@@ -1011,7 +1051,6 @@ declare class IndoorMap extends EventTarget {
|
|
|
1011
1051
|
set detectVenueInView(value: any);
|
|
1012
1052
|
set billboards(value: any);
|
|
1013
1053
|
set mapDecorations(value: any);
|
|
1014
|
-
set groundLabels(value: any);
|
|
1015
1054
|
set pixelRatio(value: number);
|
|
1016
1055
|
set onClickElement(func: any);
|
|
1017
1056
|
set locale(value: string);
|
|
@@ -1031,18 +1070,6 @@ declare class IndoorMap extends EventTarget {
|
|
|
1031
1070
|
}): void;
|
|
1032
1071
|
removeAnimationById(id: string): void;
|
|
1033
1072
|
clearAnimations(): void;
|
|
1034
|
-
/**
|
|
1035
|
-
* Hilighting Elements
|
|
1036
|
-
* ========================================= */
|
|
1037
|
-
setHighlightElementIds(targetElementIds: any, options?: ISetHighlightElementIdsOptions): geojson.FeatureCollection<geojson.Geometry, {
|
|
1038
|
-
[name: string]: any;
|
|
1039
|
-
}>;
|
|
1040
|
-
setHighlight2DElementIds(targetElementIds: any, options?: {}): geojson.FeatureCollection<geojson.Geometry, {
|
|
1041
|
-
[name: string]: any;
|
|
1042
|
-
}>;
|
|
1043
|
-
clearHighlightElements(): void;
|
|
1044
|
-
setHighlightedObject(targetObjectIds: any, options?: {}): void;
|
|
1045
|
-
clearHighlightObject(): void;
|
|
1046
1073
|
/**
|
|
1047
1074
|
* User Location
|
|
1048
1075
|
****************************/
|
|
@@ -1101,29 +1128,6 @@ declare class Billboard extends BaseObject {
|
|
|
1101
1128
|
#private;
|
|
1102
1129
|
}
|
|
1103
1130
|
|
|
1104
|
-
declare class GroundLabel extends BaseObject {
|
|
1105
|
-
#private;
|
|
1106
|
-
constructor(bound: any, options: any, layer: any);
|
|
1107
|
-
set bearing(value: any);
|
|
1108
|
-
get angle(): number;
|
|
1109
|
-
get currentAngle(): number;
|
|
1110
|
-
get text(): string;
|
|
1111
|
-
get offsetX(): number;
|
|
1112
|
-
get offsetY(): number;
|
|
1113
|
-
get offset(): {
|
|
1114
|
-
x: number;
|
|
1115
|
-
y: number;
|
|
1116
|
-
};
|
|
1117
|
-
set offsetX(value: number);
|
|
1118
|
-
set offsetY(value: number);
|
|
1119
|
-
set angle(newAngle: number);
|
|
1120
|
-
setOffset(offsetX: any, offsetY: any): void;
|
|
1121
|
-
addOffset(deltaX: any, deltaY: any): void;
|
|
1122
|
-
resetOffset(): void;
|
|
1123
|
-
moveToPosition(targetX: any, targetY: any): void;
|
|
1124
|
-
updateText(newText: any, options?: Record<string, unknown>): void;
|
|
1125
|
-
}
|
|
1126
|
-
|
|
1127
1131
|
interface IOptions {
|
|
1128
1132
|
scale: number;
|
|
1129
1133
|
altitude: number;
|
|
@@ -1185,10 +1189,6 @@ declare function styledFeatureGenerator(mapTheme: any): {
|
|
|
1185
1189
|
createLineStringFromGeometries: (geometries: any) => LineString$1;
|
|
1186
1190
|
create3DStepPath: (feature: any, threeLayer: any, option?: {}) => NavigationPath;
|
|
1187
1191
|
createDecoration: (decoration: any, options: any) => LineString$1 | Polygon$1 | MultiPolygon$1 | MultiLineString;
|
|
1188
|
-
/** Three JS */
|
|
1189
|
-
create3DFootprint: (feature: any, threeLayer: any, options: any) => Promise<any[]>;
|
|
1190
|
-
create3DGroundLabel: (label: any, threeLayer: any) => GroundLabel;
|
|
1191
|
-
createOccupantGroundLabel: (feature: any, location: any, mapConfig: any, threeLayer: any) => GroundLabel;
|
|
1192
1192
|
create3DBillboard: (billboard: any, threeLayer: any) => Billboard;
|
|
1193
1193
|
create3DAmenityMarker: (feature: any, threeLayer: any, config: any) => SpriteMarker;
|
|
1194
1194
|
create3DOccupantAmenityMarker: (feature: any, threeLayer: any, config: any) => SpriteMarker;
|
|
@@ -1220,7 +1220,6 @@ declare const getSuitablyValueBetweenBearings: GetSuitablyValueBetweenBearings;
|
|
|
1220
1220
|
declare const getCenterFromGeometry: (geometry?: Polygon | MultiPolygon | Point | LineString) => number[] | null;
|
|
1221
1221
|
declare const createPolygonFromLineString: (geometry: any) => geojson.Position[][];
|
|
1222
1222
|
|
|
1223
|
-
declare const ALWAYS_VISIBLE_FEATURE_TYPES: string[];
|
|
1224
1223
|
declare const BASE_LAYER_NAME = "base";
|
|
1225
1224
|
declare const POI_MARKER_LAYER_NAME = "poi";
|
|
1226
1225
|
declare const MARKER_LAYER_NAME = "marker";
|
|
@@ -1232,8 +1231,6 @@ declare const USER_LOCATION_ELEMENT_ID = "user_location";
|
|
|
1232
1231
|
declare const LAST_USER_LOCATION_ELEMENT_ID_PREFIX = "last_user_location-";
|
|
1233
1232
|
declare const LOCALE_SYMBOL_KEY = "locale_symbol";
|
|
1234
1233
|
declare const DEFAULT_LOCALE = "en";
|
|
1235
|
-
declare const DEFAULT_HIGHLIGHT_OPTIONS: IHighlightOptions;
|
|
1236
|
-
declare const DEFAULT_SET_HIGHLIGHT_2DELEMENT_IDS_OPTIONS: ISetHighlight2DElementIdsOptions;
|
|
1237
1234
|
declare const LAYERS: string[];
|
|
1238
1235
|
declare const LAYER_OPTIONS: {
|
|
1239
1236
|
base: {
|
|
@@ -1284,4 +1281,4 @@ declare const VENUE_EVENTS: {
|
|
|
1284
1281
|
VENUE_MOVEINTOVIEW: string;
|
|
1285
1282
|
};
|
|
1286
1283
|
|
|
1287
|
-
export { ALL_FEATURE_TYPES,
|
|
1284
|
+
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, type Model3dFeature, type Model3dGeometry, type Model3dProperties, 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, 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 };
|