venue-js 1.0.0-next.2 → 1.0.0-next.4

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
@@ -2,10 +2,16 @@ import { QueryClient, QueryObserver, EnsureQueryDataOptions } from '@tanstack/qu
2
2
  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
+ import * as maptalks_dist_core_Class from 'maptalks/dist/core/Class';
6
+ import * as maptalks_dist_geo_Extent from 'maptalks/dist/geo/Extent';
7
+ import { Map, Coordinate as Coordinate$1, Extent } from 'maptalks-gl';
8
+ import { BaseObject, ThreeLayer } from 'maptalks.three';
5
9
  import * as maptalks from 'maptalks';
6
- import { Coordinate, Map, MapViewType, MapAnimationOptionsType, HandlerFn, EventParams, MapPaddingType, Extent } from 'maptalks';
7
- import { ThreeLayer, BaseObject } from 'maptalks.three';
10
+ import { Coordinate, Marker, ui, LineString as LineString$1, Polygon as Polygon$1, MultiPolygon as MultiPolygon$1, MultiLineString } from 'maptalks';
8
11
  import { ExtrudePolygonOptionType } from 'maptalks.three/dist/type';
12
+ import { PolygonOptionsType } from 'maptalks/dist/geometry/Polygon';
13
+ import { LineStringOptionsType } from 'maptalks/dist/geometry/LineString';
14
+ import { MapViewType, MapAnimationOptionsType } from 'maptalks/dist/map/Map';
9
15
  import { SpriteMaterial, AmbientLight, DirectionalLight } from 'three';
10
16
 
11
17
  type Id = string;
@@ -557,6 +563,22 @@ type OccupantFeaturePopulated = OccupantFeature & {
557
563
  privileges: PrivilegeFeature[];
558
564
  };
559
565
  };
566
+ type OpeningFeaturePopulated = OpeningFeature & {
567
+ properties: OpeningFeature["properties"] & {
568
+ /**
569
+ * [IMDF] Level that section is on
570
+ */
571
+ level: LevelFeaturePopulated;
572
+ /**
573
+ * [venue.in.th] Venue that level is in
574
+ */
575
+ venue: VenueFeaturePopulated;
576
+ /**
577
+ * [Derived] Level's ordinal that unit is on
578
+ */
579
+ ordinal: number;
580
+ };
581
+ };
560
582
  type SectionFeaturePopulated = SectionFeature & {
561
583
  properties: SectionFeature["properties"] & {
562
584
  /**
@@ -611,7 +633,7 @@ type FeaturePopulatedResponseMap = {
611
633
  kiosk: KioskFeaturePopulated;
612
634
  level: LevelFeaturePopulated;
613
635
  occupant: OccupantFeaturePopulated;
614
- opening: OpeningFeature;
636
+ opening: OpeningFeaturePopulated;
615
637
  relationship: RelationshipFeature;
616
638
  section: SectionFeaturePopulated;
617
639
  unit: UnitFeaturePopulated;
@@ -690,10 +712,10 @@ type TypeRenderOptions<TOptionsType> = {
690
712
  byCategory?: Record<string, TOptionsType>;
691
713
  };
692
714
  type Element2DRendererOptions = {
693
- unit?: TypeRenderOptions<maptalks.PolygonOptionsType>;
694
- kiosk?: TypeRenderOptions<maptalks.PolygonOptionsType>;
695
- door?: TypeRenderOptions<maptalks.LineStringOptionsType>;
696
- occupant?: TypeRenderOptions<maptalks.UIMarkerOptionsType>;
715
+ unit?: TypeRenderOptions<PolygonOptionsType>;
716
+ kiosk?: TypeRenderOptions<PolygonOptionsType>;
717
+ door?: TypeRenderOptions<LineStringOptionsType>;
718
+ fixture?: TypeRenderOptions<PolygonOptionsType>;
697
719
  };
698
720
  /** 3D */
699
721
  type CreateExtrudePolygonOptionType = ExtrudePolygonOptionType & {
@@ -709,9 +731,11 @@ type Element3DRendererOptions = {
709
731
  type RendererManagerOptions = {
710
732
  type: "2D";
711
733
  elements: Element2DRendererOptions;
734
+ onRendererReady?: () => void;
712
735
  } | {
713
736
  type: "3D";
714
737
  elements: Element3DRendererOptions;
738
+ onRendererReady?: () => void;
715
739
  };
716
740
 
717
741
  declare class RendererManager extends EventTarget {
@@ -720,18 +744,30 @@ declare class RendererManager extends EventTarget {
720
744
  options: RendererManagerOptions;
721
745
  /** Elements: Responsible for converting feature info elements and add to map */
722
746
  private elementRenderer;
747
+ private markerRenderer;
723
748
  private elementsMap;
724
749
  private elementsByOrdinal;
725
- constructor(map: maptalks.Map, options: RendererManagerOptions);
726
- set dataClient(value: any);
727
- getElementsByOrdinal: (ordinal: number) => any[];
750
+ private currentOrdinals;
751
+ private markersMap;
752
+ private markersByOrdinal;
753
+ constructor(map: maptalks.Map, dataClient: VenueDataClient, options: RendererManagerOptions);
754
+ getElementsByOrdinal: (ordinal: number) => BaseObject[] | maptalks.Geometry[];
755
+ getMarkersByOrdinal: (ordinal: number) => BaseObject[] | maptalks.ui.UIMarker[];
756
+ addElementsToManager: (id: any, elements: any, ordinal: any) => void;
757
+ addMarkersToManager: (id: any, markers: any, ordinal: any) => void;
728
758
  changeLevelByOrdinal(targetOrdinal: null | number | number[]): void;
729
- createMarker(coordinate: Position, ordinal: number, label: string): void;
759
+ /**
760
+ * ========================================================================
761
+ * Markers
762
+ * ======================================================================== */
763
+ createMarker(coordinate: Position, ordinal: number, text: string, options: any): void;
764
+ clearMarkers(): void;
730
765
  }
731
766
 
732
767
  interface IndoorMapOptions {
733
768
  onMapReady?: () => void;
734
769
  onMapLoading?: () => void;
770
+ centerCross?: boolean;
735
771
  dataClient: VenueDataClient;
736
772
  camera?: {
737
773
  defaultCenter?: [number, number];
@@ -838,6 +874,12 @@ declare class CameraManager {
838
874
  flyToAndZoomIn: (centerPoint: any, options?: MapAnimationOptionsType & MapViewType) => void;
839
875
  }
840
876
 
877
+ type MapPaddingType = {
878
+ paddingLeft: number;
879
+ paddingRight: number;
880
+ paddingTop: number;
881
+ paddingBottom: number;
882
+ };
841
883
  declare class IndoorMap extends EventTarget {
842
884
  #private;
843
885
  map: Map | null;
@@ -849,11 +891,16 @@ declare class IndoorMap extends EventTarget {
849
891
  onMapLoading: () => void;
850
892
  constructor(elementId: any, options: IndoorMapOptions);
851
893
  set dataClient(value: any);
894
+ on(eventName: string, handler: any): void;
852
895
  /**
853
896
  * Events
854
897
  */
855
- handleMapClick: HandlerFn;
856
- handleMapTouchEnd: HandlerFn;
898
+ handleMapClick: ({ coordinate }: {
899
+ coordinate: any;
900
+ }) => void;
901
+ handleMapTouchEnd: ({ containerPoint }: {
902
+ containerPoint: any;
903
+ }) => void;
857
904
  /**
858
905
  * Getters & Setters
859
906
  */
@@ -874,18 +921,18 @@ declare class IndoorMap extends EventTarget {
874
921
  set pixelRatio(value: number);
875
922
  set onClickElement(func: any);
876
923
  set locale(value: string);
877
- handleClickElement: (e: EventParams) => void;
878
- setCenter(center: Coordinate, padding?: MapPaddingType): void;
924
+ handleClickElement: (e: any) => void;
925
+ setCenter(center: Coordinate$1, padding?: MapPaddingType): void;
879
926
  /**
880
927
  * Change Level & animate to path / geometry / view / etc.
881
928
  * ================================== */
882
- changeLevelByOrdinal(ordinal: number | number[]): void;
883
- getFeatureExtent: (feature: any, scaleFactor?: number) => any;
884
- getExtentCenter: (extent: Extent) => any;
929
+ changeLevelByOrdinal(ordinal: null | number | number[]): void;
930
+ getFeatureExtent: (feature: any, scaleFactor?: number) => Extent;
931
+ getExtentCenter: (extent: Extent) => maptalks_dist_geo_Extent.PositionType;
885
932
  getExtentZoom: (extent: Extent, options?: {
886
933
  isFraction?: boolean;
887
934
  padding?: MapPaddingType;
888
- }) => any;
935
+ }) => number;
889
936
  findVenueInView: () => {
890
937
  venueId: string;
891
938
  distance: number;
@@ -951,10 +998,10 @@ declare class IndoorMap extends EventTarget {
951
998
  /**
952
999
  * Other functions
953
1000
  */
954
- enableClick: () => any;
955
- disableClick: () => any;
956
- freeze: () => any;
957
- unfreeze: () => any;
1001
+ enableClick: () => Map | maptalks_dist_core_Class.ClassOptions;
1002
+ disableClick: () => Map | maptalks_dist_core_Class.ClassOptions;
1003
+ freeze: () => Map | maptalks_dist_core_Class.ClassOptions;
1004
+ unfreeze: () => Map | maptalks_dist_core_Class.ClassOptions;
958
1005
  /**
959
1006
  * render (frame)
960
1007
  */
@@ -965,8 +1012,8 @@ declare class IndoorMap extends EventTarget {
965
1012
  right: number;
966
1013
  bottom: number;
967
1014
  };
968
- }) => any;
969
- setMaxExtent(extent: Extent): any;
1015
+ }) => Coordinate$1;
1016
+ setMaxExtent(extent: Extent): Map;
970
1017
  render(): void;
971
1018
  }
972
1019
 
@@ -1046,23 +1093,21 @@ declare function styledFeatureGenerator(mapTheme: any): {
1046
1093
  getHighlightMarkerSymbol: () => any;
1047
1094
  createVenue: (feature: any) => any;
1048
1095
  createLevel: (feature: any) => any;
1049
- createUnit: (feature: any) => any;
1050
- createMarker: (feature: any) => any;
1051
- createOriginMarker: (feature: any) => any;
1052
- createDestinationPinMarker: (feature: any, mapConfig: any) => any;
1053
- createDestinationLogoMarker: (feature: any, mapConfig?: {}) => any;
1054
- createUserLocationMarker: (feature: any) => any;
1055
- createLastUserLocationMarker: (feature: any) => any;
1056
- createHighlightOccupantMarker: (feature: any, mapConfig: any) => any;
1057
- createHighlight2DAmenityMarkerFrom3DMarker: (feature: any, mapConfig: any) => any;
1058
- createKiosk: (feature: any) => any;
1096
+ createMarker: (feature: any) => Marker;
1097
+ createOriginMarker: (feature: any) => Marker;
1098
+ createDestinationPinMarker: (feature: any, mapConfig: any) => Marker;
1099
+ createDestinationLogoMarker: (feature: any, mapConfig?: {}) => Marker;
1100
+ createUserLocationMarker: (feature: any) => Marker;
1101
+ createLastUserLocationMarker: (feature: any) => Marker;
1102
+ createHighlightOccupantMarker: (feature: any, mapConfig: any) => Marker;
1103
+ createHighlight2DAmenityMarkerFrom3DMarker: (feature: any, mapConfig: any) => Marker;
1059
1104
  createSection: (feature: any) => any;
1060
- createOccupant: (feature: any, location: any, mapConfig: any) => any;
1061
- createOpening: (feature: any) => any;
1105
+ createOccupant: (feature: any, location: any, mapConfig: any) => Marker | ui.UIMarker;
1106
+ createOpening: (feature: any) => LineString$1;
1062
1107
  createFixture: (feature: any) => any;
1063
- createLineStringFromGeometries: (geometries: any) => any;
1108
+ createLineStringFromGeometries: (geometries: any) => LineString$1;
1064
1109
  create3DStepPath: (feature: any, threeLayer: any, option?: {}) => NavigationPath;
1065
- createDecoration: (decoration: any, options: any) => any;
1110
+ createDecoration: (decoration: any, options: any) => LineString$1 | Polygon$1 | MultiPolygon$1 | MultiLineString;
1066
1111
  /** Three JS */
1067
1112
  create3DFootprint: (feature: any, threeLayer: any, options: any) => Promise<any[]>;
1068
1113
  create3DGroundLabel: (label: any, threeLayer: any) => GroundLabel;
@@ -1071,13 +1116,9 @@ declare function styledFeatureGenerator(mapTheme: any): {
1071
1116
  create3DAmenityMarker: (feature: any, threeLayer: any, config: any) => SpriteMarker;
1072
1117
  create3DOccupantAmenityMarker: (feature: any, threeLayer: any, config: any) => SpriteMarker;
1073
1118
  create3DOpeningMarker: (feature: any, threeLayer: any, config: any) => SpriteMarker;
1074
- create3DUnit: (unit: any, threeLayer: any) => Promise<any[]>;
1075
- create3DKiosk: (kiosk: any, threeLayer: any) => Promise<any[]>;
1076
1119
  createVenue3DModel: (venue: any, threeLayer: any) => Promise<any[]>;
1077
1120
  create3DFixture: (fixture: any, threeLayer: any) => Promise<any[]>;
1078
1121
  createExtrudedUnit: (unit: any, threeLayer: any, options: any) => any;
1079
- createExtrudedKiosk: (kiosk: any, threeLayer: any, options: any) => any;
1080
- createExtrudedLevel: (level: any, threeLayer: any, options: any) => any;
1081
1122
  createAmbientLight: (config: any) => AmbientLight;
1082
1123
  createDirectionalLight: (config: any) => DirectionalLight;
1083
1124
  };
@@ -1170,4 +1211,4 @@ declare const VENUE_EVENTS: {
1170
1211
  VENUE_MOVEINTOVIEW: string;
1171
1212
  };
1172
1213
 
1173
- export { ALL_FEATURE_TYPES, ALWAYS_VISIBLE_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_HIGHLIGHT_OPTIONS, DEFAULT_LOCALE, DEFAULT_SET_HIGHLIGHT_2DELEMENT_IDS_OPTIONS, 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, IMDF_FEATURE_TYPES, type Id, type ImdfFeature, IndoorMap, 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, type OccupantProperties, type OpeningFeature, 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 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, fetchFeature, getBearingBetweenPoints, getCenterFromGeometry, getDataClient, getExtrudeConfigByFeature, getFeatureByLocationId, getLocationByAmenity, getLocationByFeature, getLocationByOccupant, getLocationIdByFeature, getOrdinalByLocationId, getRelatedLocationIdsByFeature, getRelatedLocationsByAmenity, getRelatedLocationsByFeature, getRelatedLocationsByOccupant, getSuitablyValueBetweenBearings, isClickableFeature, safeFetchFeature, styledFeatureGenerator };
1214
+ export { ALL_FEATURE_TYPES, ALWAYS_VISIBLE_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_HIGHLIGHT_OPTIONS, DEFAULT_LOCALE, DEFAULT_SET_HIGHLIGHT_2DELEMENT_IDS_OPTIONS, 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, IMDF_FEATURE_TYPES, type Id, type ImdfFeature, IndoorMap, 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, 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 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, fetchFeature, getBearingBetweenPoints, getCenterFromGeometry, getDataClient, getExtrudeConfigByFeature, getFeatureByLocationId, getLocationByAmenity, getLocationByFeature, getLocationByOccupant, getLocationIdByFeature, getOrdinalByLocationId, getRelatedLocationIdsByFeature, getRelatedLocationsByAmenity, getRelatedLocationsByFeature, getRelatedLocationsByOccupant, getSuitablyValueBetweenBearings, isClickableFeature, safeFetchFeature, styledFeatureGenerator };
package/dist/index.d.ts CHANGED
@@ -2,10 +2,16 @@ import { QueryClient, QueryObserver, EnsureQueryDataOptions } from '@tanstack/qu
2
2
  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
+ import * as maptalks_dist_core_Class from 'maptalks/dist/core/Class';
6
+ import * as maptalks_dist_geo_Extent from 'maptalks/dist/geo/Extent';
7
+ import { Map, Coordinate as Coordinate$1, Extent } from 'maptalks-gl';
8
+ import { BaseObject, ThreeLayer } from 'maptalks.three';
5
9
  import * as maptalks from 'maptalks';
6
- import { Coordinate, Map, MapViewType, MapAnimationOptionsType, HandlerFn, EventParams, MapPaddingType, Extent } from 'maptalks';
7
- import { ThreeLayer, BaseObject } from 'maptalks.three';
10
+ import { Coordinate, Marker, ui, LineString as LineString$1, Polygon as Polygon$1, MultiPolygon as MultiPolygon$1, MultiLineString } from 'maptalks';
8
11
  import { ExtrudePolygonOptionType } from 'maptalks.three/dist/type';
12
+ import { PolygonOptionsType } from 'maptalks/dist/geometry/Polygon';
13
+ import { LineStringOptionsType } from 'maptalks/dist/geometry/LineString';
14
+ import { MapViewType, MapAnimationOptionsType } from 'maptalks/dist/map/Map';
9
15
  import { SpriteMaterial, AmbientLight, DirectionalLight } from 'three';
10
16
 
11
17
  type Id = string;
@@ -557,6 +563,22 @@ type OccupantFeaturePopulated = OccupantFeature & {
557
563
  privileges: PrivilegeFeature[];
558
564
  };
559
565
  };
566
+ type OpeningFeaturePopulated = OpeningFeature & {
567
+ properties: OpeningFeature["properties"] & {
568
+ /**
569
+ * [IMDF] Level that section is on
570
+ */
571
+ level: LevelFeaturePopulated;
572
+ /**
573
+ * [venue.in.th] Venue that level is in
574
+ */
575
+ venue: VenueFeaturePopulated;
576
+ /**
577
+ * [Derived] Level's ordinal that unit is on
578
+ */
579
+ ordinal: number;
580
+ };
581
+ };
560
582
  type SectionFeaturePopulated = SectionFeature & {
561
583
  properties: SectionFeature["properties"] & {
562
584
  /**
@@ -611,7 +633,7 @@ type FeaturePopulatedResponseMap = {
611
633
  kiosk: KioskFeaturePopulated;
612
634
  level: LevelFeaturePopulated;
613
635
  occupant: OccupantFeaturePopulated;
614
- opening: OpeningFeature;
636
+ opening: OpeningFeaturePopulated;
615
637
  relationship: RelationshipFeature;
616
638
  section: SectionFeaturePopulated;
617
639
  unit: UnitFeaturePopulated;
@@ -690,10 +712,10 @@ type TypeRenderOptions<TOptionsType> = {
690
712
  byCategory?: Record<string, TOptionsType>;
691
713
  };
692
714
  type Element2DRendererOptions = {
693
- unit?: TypeRenderOptions<maptalks.PolygonOptionsType>;
694
- kiosk?: TypeRenderOptions<maptalks.PolygonOptionsType>;
695
- door?: TypeRenderOptions<maptalks.LineStringOptionsType>;
696
- occupant?: TypeRenderOptions<maptalks.UIMarkerOptionsType>;
715
+ unit?: TypeRenderOptions<PolygonOptionsType>;
716
+ kiosk?: TypeRenderOptions<PolygonOptionsType>;
717
+ door?: TypeRenderOptions<LineStringOptionsType>;
718
+ fixture?: TypeRenderOptions<PolygonOptionsType>;
697
719
  };
698
720
  /** 3D */
699
721
  type CreateExtrudePolygonOptionType = ExtrudePolygonOptionType & {
@@ -709,9 +731,11 @@ type Element3DRendererOptions = {
709
731
  type RendererManagerOptions = {
710
732
  type: "2D";
711
733
  elements: Element2DRendererOptions;
734
+ onRendererReady?: () => void;
712
735
  } | {
713
736
  type: "3D";
714
737
  elements: Element3DRendererOptions;
738
+ onRendererReady?: () => void;
715
739
  };
716
740
 
717
741
  declare class RendererManager extends EventTarget {
@@ -720,18 +744,30 @@ declare class RendererManager extends EventTarget {
720
744
  options: RendererManagerOptions;
721
745
  /** Elements: Responsible for converting feature info elements and add to map */
722
746
  private elementRenderer;
747
+ private markerRenderer;
723
748
  private elementsMap;
724
749
  private elementsByOrdinal;
725
- constructor(map: maptalks.Map, options: RendererManagerOptions);
726
- set dataClient(value: any);
727
- getElementsByOrdinal: (ordinal: number) => any[];
750
+ private currentOrdinals;
751
+ private markersMap;
752
+ private markersByOrdinal;
753
+ constructor(map: maptalks.Map, dataClient: VenueDataClient, options: RendererManagerOptions);
754
+ getElementsByOrdinal: (ordinal: number) => BaseObject[] | maptalks.Geometry[];
755
+ getMarkersByOrdinal: (ordinal: number) => BaseObject[] | maptalks.ui.UIMarker[];
756
+ addElementsToManager: (id: any, elements: any, ordinal: any) => void;
757
+ addMarkersToManager: (id: any, markers: any, ordinal: any) => void;
728
758
  changeLevelByOrdinal(targetOrdinal: null | number | number[]): void;
729
- createMarker(coordinate: Position, ordinal: number, label: string): void;
759
+ /**
760
+ * ========================================================================
761
+ * Markers
762
+ * ======================================================================== */
763
+ createMarker(coordinate: Position, ordinal: number, text: string, options: any): void;
764
+ clearMarkers(): void;
730
765
  }
731
766
 
732
767
  interface IndoorMapOptions {
733
768
  onMapReady?: () => void;
734
769
  onMapLoading?: () => void;
770
+ centerCross?: boolean;
735
771
  dataClient: VenueDataClient;
736
772
  camera?: {
737
773
  defaultCenter?: [number, number];
@@ -838,6 +874,12 @@ declare class CameraManager {
838
874
  flyToAndZoomIn: (centerPoint: any, options?: MapAnimationOptionsType & MapViewType) => void;
839
875
  }
840
876
 
877
+ type MapPaddingType = {
878
+ paddingLeft: number;
879
+ paddingRight: number;
880
+ paddingTop: number;
881
+ paddingBottom: number;
882
+ };
841
883
  declare class IndoorMap extends EventTarget {
842
884
  #private;
843
885
  map: Map | null;
@@ -849,11 +891,16 @@ declare class IndoorMap extends EventTarget {
849
891
  onMapLoading: () => void;
850
892
  constructor(elementId: any, options: IndoorMapOptions);
851
893
  set dataClient(value: any);
894
+ on(eventName: string, handler: any): void;
852
895
  /**
853
896
  * Events
854
897
  */
855
- handleMapClick: HandlerFn;
856
- handleMapTouchEnd: HandlerFn;
898
+ handleMapClick: ({ coordinate }: {
899
+ coordinate: any;
900
+ }) => void;
901
+ handleMapTouchEnd: ({ containerPoint }: {
902
+ containerPoint: any;
903
+ }) => void;
857
904
  /**
858
905
  * Getters & Setters
859
906
  */
@@ -874,18 +921,18 @@ declare class IndoorMap extends EventTarget {
874
921
  set pixelRatio(value: number);
875
922
  set onClickElement(func: any);
876
923
  set locale(value: string);
877
- handleClickElement: (e: EventParams) => void;
878
- setCenter(center: Coordinate, padding?: MapPaddingType): void;
924
+ handleClickElement: (e: any) => void;
925
+ setCenter(center: Coordinate$1, padding?: MapPaddingType): void;
879
926
  /**
880
927
  * Change Level & animate to path / geometry / view / etc.
881
928
  * ================================== */
882
- changeLevelByOrdinal(ordinal: number | number[]): void;
883
- getFeatureExtent: (feature: any, scaleFactor?: number) => any;
884
- getExtentCenter: (extent: Extent) => any;
929
+ changeLevelByOrdinal(ordinal: null | number | number[]): void;
930
+ getFeatureExtent: (feature: any, scaleFactor?: number) => Extent;
931
+ getExtentCenter: (extent: Extent) => maptalks_dist_geo_Extent.PositionType;
885
932
  getExtentZoom: (extent: Extent, options?: {
886
933
  isFraction?: boolean;
887
934
  padding?: MapPaddingType;
888
- }) => any;
935
+ }) => number;
889
936
  findVenueInView: () => {
890
937
  venueId: string;
891
938
  distance: number;
@@ -951,10 +998,10 @@ declare class IndoorMap extends EventTarget {
951
998
  /**
952
999
  * Other functions
953
1000
  */
954
- enableClick: () => any;
955
- disableClick: () => any;
956
- freeze: () => any;
957
- unfreeze: () => any;
1001
+ enableClick: () => Map | maptalks_dist_core_Class.ClassOptions;
1002
+ disableClick: () => Map | maptalks_dist_core_Class.ClassOptions;
1003
+ freeze: () => Map | maptalks_dist_core_Class.ClassOptions;
1004
+ unfreeze: () => Map | maptalks_dist_core_Class.ClassOptions;
958
1005
  /**
959
1006
  * render (frame)
960
1007
  */
@@ -965,8 +1012,8 @@ declare class IndoorMap extends EventTarget {
965
1012
  right: number;
966
1013
  bottom: number;
967
1014
  };
968
- }) => any;
969
- setMaxExtent(extent: Extent): any;
1015
+ }) => Coordinate$1;
1016
+ setMaxExtent(extent: Extent): Map;
970
1017
  render(): void;
971
1018
  }
972
1019
 
@@ -1046,23 +1093,21 @@ declare function styledFeatureGenerator(mapTheme: any): {
1046
1093
  getHighlightMarkerSymbol: () => any;
1047
1094
  createVenue: (feature: any) => any;
1048
1095
  createLevel: (feature: any) => any;
1049
- createUnit: (feature: any) => any;
1050
- createMarker: (feature: any) => any;
1051
- createOriginMarker: (feature: any) => any;
1052
- createDestinationPinMarker: (feature: any, mapConfig: any) => any;
1053
- createDestinationLogoMarker: (feature: any, mapConfig?: {}) => any;
1054
- createUserLocationMarker: (feature: any) => any;
1055
- createLastUserLocationMarker: (feature: any) => any;
1056
- createHighlightOccupantMarker: (feature: any, mapConfig: any) => any;
1057
- createHighlight2DAmenityMarkerFrom3DMarker: (feature: any, mapConfig: any) => any;
1058
- createKiosk: (feature: any) => any;
1096
+ createMarker: (feature: any) => Marker;
1097
+ createOriginMarker: (feature: any) => Marker;
1098
+ createDestinationPinMarker: (feature: any, mapConfig: any) => Marker;
1099
+ createDestinationLogoMarker: (feature: any, mapConfig?: {}) => Marker;
1100
+ createUserLocationMarker: (feature: any) => Marker;
1101
+ createLastUserLocationMarker: (feature: any) => Marker;
1102
+ createHighlightOccupantMarker: (feature: any, mapConfig: any) => Marker;
1103
+ createHighlight2DAmenityMarkerFrom3DMarker: (feature: any, mapConfig: any) => Marker;
1059
1104
  createSection: (feature: any) => any;
1060
- createOccupant: (feature: any, location: any, mapConfig: any) => any;
1061
- createOpening: (feature: any) => any;
1105
+ createOccupant: (feature: any, location: any, mapConfig: any) => Marker | ui.UIMarker;
1106
+ createOpening: (feature: any) => LineString$1;
1062
1107
  createFixture: (feature: any) => any;
1063
- createLineStringFromGeometries: (geometries: any) => any;
1108
+ createLineStringFromGeometries: (geometries: any) => LineString$1;
1064
1109
  create3DStepPath: (feature: any, threeLayer: any, option?: {}) => NavigationPath;
1065
- createDecoration: (decoration: any, options: any) => any;
1110
+ createDecoration: (decoration: any, options: any) => LineString$1 | Polygon$1 | MultiPolygon$1 | MultiLineString;
1066
1111
  /** Three JS */
1067
1112
  create3DFootprint: (feature: any, threeLayer: any, options: any) => Promise<any[]>;
1068
1113
  create3DGroundLabel: (label: any, threeLayer: any) => GroundLabel;
@@ -1071,13 +1116,9 @@ declare function styledFeatureGenerator(mapTheme: any): {
1071
1116
  create3DAmenityMarker: (feature: any, threeLayer: any, config: any) => SpriteMarker;
1072
1117
  create3DOccupantAmenityMarker: (feature: any, threeLayer: any, config: any) => SpriteMarker;
1073
1118
  create3DOpeningMarker: (feature: any, threeLayer: any, config: any) => SpriteMarker;
1074
- create3DUnit: (unit: any, threeLayer: any) => Promise<any[]>;
1075
- create3DKiosk: (kiosk: any, threeLayer: any) => Promise<any[]>;
1076
1119
  createVenue3DModel: (venue: any, threeLayer: any) => Promise<any[]>;
1077
1120
  create3DFixture: (fixture: any, threeLayer: any) => Promise<any[]>;
1078
1121
  createExtrudedUnit: (unit: any, threeLayer: any, options: any) => any;
1079
- createExtrudedKiosk: (kiosk: any, threeLayer: any, options: any) => any;
1080
- createExtrudedLevel: (level: any, threeLayer: any, options: any) => any;
1081
1122
  createAmbientLight: (config: any) => AmbientLight;
1082
1123
  createDirectionalLight: (config: any) => DirectionalLight;
1083
1124
  };
@@ -1170,4 +1211,4 @@ declare const VENUE_EVENTS: {
1170
1211
  VENUE_MOVEINTOVIEW: string;
1171
1212
  };
1172
1213
 
1173
- export { ALL_FEATURE_TYPES, ALWAYS_VISIBLE_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_HIGHLIGHT_OPTIONS, DEFAULT_LOCALE, DEFAULT_SET_HIGHLIGHT_2DELEMENT_IDS_OPTIONS, 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, IMDF_FEATURE_TYPES, type Id, type ImdfFeature, IndoorMap, 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, type OccupantProperties, type OpeningFeature, 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 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, fetchFeature, getBearingBetweenPoints, getCenterFromGeometry, getDataClient, getExtrudeConfigByFeature, getFeatureByLocationId, getLocationByAmenity, getLocationByFeature, getLocationByOccupant, getLocationIdByFeature, getOrdinalByLocationId, getRelatedLocationIdsByFeature, getRelatedLocationsByAmenity, getRelatedLocationsByFeature, getRelatedLocationsByOccupant, getSuitablyValueBetweenBearings, isClickableFeature, safeFetchFeature, styledFeatureGenerator };
1214
+ export { ALL_FEATURE_TYPES, ALWAYS_VISIBLE_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_HIGHLIGHT_OPTIONS, DEFAULT_LOCALE, DEFAULT_SET_HIGHLIGHT_2DELEMENT_IDS_OPTIONS, 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, IMDF_FEATURE_TYPES, type Id, type ImdfFeature, IndoorMap, 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, 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 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, fetchFeature, getBearingBetweenPoints, getCenterFromGeometry, getDataClient, getExtrudeConfigByFeature, getFeatureByLocationId, getLocationByAmenity, getLocationByFeature, getLocationByOccupant, getLocationIdByFeature, getOrdinalByLocationId, getRelatedLocationIdsByFeature, getRelatedLocationsByAmenity, getRelatedLocationsByFeature, getRelatedLocationsByOccupant, getSuitablyValueBetweenBearings, isClickableFeature, safeFetchFeature, styledFeatureGenerator };