@mapxus/mapxus-map-jp 7.8.0 → 7.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.umd.js +1 -1
- package/es/index.d.ts +87 -48
- package/es/index.mjs +1 -1
- package/es/utils/index.mjs +1 -1
- package/lib/index.cjs +1 -1
- package/lib/utils/index.cjs +1 -1
- package/package.json +1 -1
package/es/index.d.ts
CHANGED
|
@@ -3,8 +3,9 @@
|
|
|
3
3
|
import { AxiosPromise } from 'axios';
|
|
4
4
|
import { GeoJsonProperties, LineString, Point } from 'geojson';
|
|
5
5
|
import maplibregl$1 from 'maplibre-gl';
|
|
6
|
-
import { ControlPosition, FilterSpecification, IControl, LngLat,
|
|
6
|
+
import { ControlPosition, FilterSpecification, IControl, LngLat, MapGeoJSONFeature, MapLayerEventType, PaddingOptions, PointLike, RequireAtLeastOne } from 'maplibre-gl';
|
|
7
7
|
|
|
8
|
+
/** @deprecated */
|
|
8
9
|
export declare enum FloorSwitchMode {
|
|
9
10
|
SWITCHED_BY_BUILDING = 0,
|
|
10
11
|
SWITCHED_BY_VENUE = 1
|
|
@@ -38,6 +39,7 @@ export interface IBbox {
|
|
|
38
39
|
export interface IBuildingChangedOptions {
|
|
39
40
|
buildingId: string | null;
|
|
40
41
|
ordinal: string | null;
|
|
42
|
+
dragPan: boolean | "restrict";
|
|
41
43
|
}
|
|
42
44
|
export interface IMultilingualName extends Partial<Record<PresetLanguage, string>> {
|
|
43
45
|
default: string;
|
|
@@ -173,6 +175,7 @@ export interface IMapOption {
|
|
|
173
175
|
floorSelectorStyle?: IFloorSelectorStyle;
|
|
174
176
|
/**
|
|
175
177
|
* @description Switch floors by venue/building, default by venue.
|
|
178
|
+
* @deprecated 'floorSwitchMode' will be removed soon.
|
|
176
179
|
*/
|
|
177
180
|
floorSwitchMode?: FloorSwitchMode;
|
|
178
181
|
/**
|
|
@@ -192,6 +195,8 @@ export interface IMapOption {
|
|
|
192
195
|
*/
|
|
193
196
|
boundsPadding?: number | RequireAtLeastOne<PaddingOptions>;
|
|
194
197
|
language?: PresetLanguage;
|
|
198
|
+
/** @description Auto Select Building by panning building to map center, default is false. */
|
|
199
|
+
autoSelectBuilding?: boolean;
|
|
195
200
|
}
|
|
196
201
|
export type TAnchorPosition = "center" | "left" | "right" | "top" | "bottom" | "top-left" | "top-right" | "bottom-left" | "bottom-right";
|
|
197
202
|
export interface IMarkerOptions {
|
|
@@ -486,6 +491,7 @@ export interface IRouteSearchOptions {
|
|
|
486
491
|
points: Array<{
|
|
487
492
|
lat: number;
|
|
488
493
|
lon: number;
|
|
494
|
+
/** @deprecated 'buildingId' will be removed in future versions */
|
|
489
495
|
buildingId?: string;
|
|
490
496
|
floorId?: string;
|
|
491
497
|
}>;
|
|
@@ -549,6 +555,32 @@ export interface IResponseVenues {
|
|
|
549
555
|
total: number;
|
|
550
556
|
}
|
|
551
557
|
export type TPromiseVenues = AxiosPromise<IResponse<IResponseVenues>>;
|
|
558
|
+
export interface IBoundsSpec {
|
|
559
|
+
/** An array of LngLat coordinates in [sw, ne] order */
|
|
560
|
+
bounds: [
|
|
561
|
+
[
|
|
562
|
+
number,
|
|
563
|
+
number
|
|
564
|
+
],
|
|
565
|
+
[
|
|
566
|
+
number,
|
|
567
|
+
number
|
|
568
|
+
]
|
|
569
|
+
];
|
|
570
|
+
}
|
|
571
|
+
export interface IKeywordSpec {
|
|
572
|
+
keywords?: string;
|
|
573
|
+
}
|
|
574
|
+
export interface IBuildingSpec {
|
|
575
|
+
buildingId: string;
|
|
576
|
+
}
|
|
577
|
+
export interface IVenueSpec {
|
|
578
|
+
venueId: string;
|
|
579
|
+
}
|
|
580
|
+
export interface IFloorSpec {
|
|
581
|
+
floorId: string;
|
|
582
|
+
}
|
|
583
|
+
export type TSearchCategoriesOptions = IVenueSpec | IBuildingSpec | IFloorSpec | (IBoundsSpec & IKeywordSpec);
|
|
552
584
|
export type Listener = (param: any) => any;
|
|
553
585
|
declare class Event$1 {
|
|
554
586
|
private _type;
|
|
@@ -631,16 +663,20 @@ export declare class Indoor extends Evented {
|
|
|
631
663
|
private _indoorMapLoaded;
|
|
632
664
|
private readonly _isVenueMode;
|
|
633
665
|
private _isMaskMode;
|
|
634
|
-
private _upperBuildings;
|
|
635
|
-
private _lowerBuildings;
|
|
636
|
-
private readonly _hiddenBuildings;
|
|
637
666
|
private _upperLevels;
|
|
638
667
|
private _lowerLevels;
|
|
639
|
-
private _history;
|
|
640
668
|
private _featureIncomplete;
|
|
641
|
-
private
|
|
669
|
+
private _dragPan;
|
|
670
|
+
private _isNewBuilding;
|
|
671
|
+
private _buildingBounds;
|
|
672
|
+
private _history;
|
|
673
|
+
private _layerBuildings;
|
|
674
|
+
private _upperBuildings;
|
|
675
|
+
private _lowerBuildings;
|
|
676
|
+
private readonly _hiddenBuildings;
|
|
642
677
|
constructor(props: {
|
|
643
|
-
map:
|
|
678
|
+
map: maplibregl$1.Map;
|
|
679
|
+
/** @deprecated */
|
|
644
680
|
floorSwitchMode?: FloorSwitchMode;
|
|
645
681
|
fitBuildingBounds?: boolean;
|
|
646
682
|
boundsPadding?: number | RequireAtLeastOne<PaddingOptions>;
|
|
@@ -723,24 +759,16 @@ export declare class Indoor extends Evented {
|
|
|
723
759
|
}): MapGeoJSONFeature[];
|
|
724
760
|
/**
|
|
725
761
|
* @description Get level feature at the point
|
|
762
|
+
* @deprecated
|
|
726
763
|
* @param point
|
|
727
764
|
* @return {MapGeoJSONFeature | null}
|
|
728
765
|
*/
|
|
729
766
|
getLevelByPoint(point: PointLike): MapGeoJSONFeature | null;
|
|
730
|
-
/**
|
|
731
|
-
* @description Map pan to the building center and select the building.
|
|
732
|
-
* @param buildingId
|
|
733
|
-
* @param floorId
|
|
734
|
-
* @param callback - **@deprecated** The optional parameter **'callback' will be removed soon**, you
|
|
735
|
-
* should use this method as `await panToBuilding(buildingId)` or `panToBuilding(buildingId).then()`
|
|
736
|
-
*/
|
|
737
|
-
panToBuilding(buildingId: string, floorId?: string, callback?: (feature: MapGeoJSONFeature) => void): Promise<void>;
|
|
738
767
|
/**
|
|
739
768
|
* @description Switch floor by ordinal.
|
|
740
769
|
* @param ordinal
|
|
741
|
-
* @param dragPan
|
|
742
770
|
*/
|
|
743
|
-
switchFloorByOrdinal(ordinal: string | null
|
|
771
|
+
switchFloorByOrdinal(ordinal: string | null): Promise<void>;
|
|
744
772
|
/**
|
|
745
773
|
* @description Hide the outdoor layer.
|
|
746
774
|
* @deprecated Use 'setOutdoorMapShown' instead.
|
|
@@ -784,7 +812,20 @@ export declare class Indoor extends Evented {
|
|
|
784
812
|
featureIncomplete?: boolean;
|
|
785
813
|
}): Promise<void>;
|
|
786
814
|
updateRendering(): void;
|
|
787
|
-
|
|
815
|
+
panToBuildingCenter(): Promise<unknown>;
|
|
816
|
+
fitBuildingBbox(): void;
|
|
817
|
+
setDragPan(dragPan: boolean | "restrict"): void;
|
|
818
|
+
setBuildingBounds(bounds: [
|
|
819
|
+
[
|
|
820
|
+
number,
|
|
821
|
+
number
|
|
822
|
+
],
|
|
823
|
+
[
|
|
824
|
+
number,
|
|
825
|
+
number
|
|
826
|
+
]
|
|
827
|
+
]): void;
|
|
828
|
+
selectBuildingByClickMap(point: PointLike): Promise<void>;
|
|
788
829
|
private _loadData;
|
|
789
830
|
private _init;
|
|
790
831
|
private _clear;
|
|
@@ -801,6 +842,7 @@ export declare class Indoor extends Evented {
|
|
|
801
842
|
private _getBuildingDefaultOrdinal;
|
|
802
843
|
private _getBuildingsOfBbox;
|
|
803
844
|
private _copyOverlapLayers;
|
|
845
|
+
private _updateFeatures;
|
|
804
846
|
private _layerDisplayedBuildings;
|
|
805
847
|
private _setDisplayedLevels;
|
|
806
848
|
private _filterTiles;
|
|
@@ -814,12 +856,11 @@ export declare class Indoor extends Evented {
|
|
|
814
856
|
export declare class BuildingFilterControl implements IControl {
|
|
815
857
|
private _map;
|
|
816
858
|
private _maplibre;
|
|
817
|
-
private _indoor;
|
|
818
859
|
private _buildingId;
|
|
819
860
|
private _features;
|
|
820
|
-
private
|
|
821
|
-
private
|
|
822
|
-
private
|
|
861
|
+
private _$container;
|
|
862
|
+
private _$listContainer;
|
|
863
|
+
private _$buildingList;
|
|
823
864
|
private _listHeight;
|
|
824
865
|
private _visible;
|
|
825
866
|
private _position;
|
|
@@ -829,7 +870,7 @@ export declare class BuildingFilterControl implements IControl {
|
|
|
829
870
|
* @param buildingSelectorEnabled
|
|
830
871
|
*/
|
|
831
872
|
constructor(map: Map$1, position?: ControlPosition, buildingSelectorEnabled?: boolean);
|
|
832
|
-
onAdd(map:
|
|
873
|
+
onAdd(map: maplibregl$1.Map): HTMLElement;
|
|
833
874
|
onRemove(): void;
|
|
834
875
|
get position(): ControlPosition;
|
|
835
876
|
get enabled(): boolean;
|
|
@@ -850,7 +891,6 @@ export declare class BuildingFilterControl implements IControl {
|
|
|
850
891
|
private _loadData;
|
|
851
892
|
private _init;
|
|
852
893
|
private _refresh;
|
|
853
|
-
private _select;
|
|
854
894
|
private _load;
|
|
855
895
|
private _buildingFilterIconCreate;
|
|
856
896
|
private _buildingNameListCreate;
|
|
@@ -897,7 +937,7 @@ export declare class FloorsControl implements IControl {
|
|
|
897
937
|
* @param options
|
|
898
938
|
*/
|
|
899
939
|
constructor(indoor: Indoor, options: IFloorSelectorOptions);
|
|
900
|
-
onAdd(map:
|
|
940
|
+
onAdd(map: maplibregl$1.Map): HTMLElement;
|
|
901
941
|
onRemove(): void;
|
|
902
942
|
get position(): ControlPosition;
|
|
903
943
|
get enabled(): boolean;
|
|
@@ -906,8 +946,9 @@ export declare class FloorsControl implements IControl {
|
|
|
906
946
|
/**
|
|
907
947
|
* @description Switch floor by ordinal
|
|
908
948
|
* @param ordinal
|
|
949
|
+
* @param dragPan
|
|
909
950
|
*/
|
|
910
|
-
switchByOrdinal(ordinal: string): void;
|
|
951
|
+
switchByOrdinal(ordinal: string, dragPan?: boolean): void;
|
|
911
952
|
/**
|
|
912
953
|
* @deprecated
|
|
913
954
|
* @param visible
|
|
@@ -920,7 +961,6 @@ export declare class FloorsControl implements IControl {
|
|
|
920
961
|
setPosition(position: ControlPosition): void;
|
|
921
962
|
changePosition(from: ControlPosition, to: ControlPosition, index?: number): void;
|
|
922
963
|
setStyle(style: Partial<IFloorSelectorStyle>): void;
|
|
923
|
-
setDragPan(dragPan: boolean | undefined): void;
|
|
924
964
|
private _setVisibility;
|
|
925
965
|
private _bindEvents;
|
|
926
966
|
private _addMapMoveEventListener;
|
|
@@ -1004,9 +1044,8 @@ declare class Map$1 extends Evented {
|
|
|
1004
1044
|
private _language;
|
|
1005
1045
|
private _dispatch;
|
|
1006
1046
|
private _fitBuildingBounds;
|
|
1007
|
-
private
|
|
1008
|
-
private
|
|
1009
|
-
private _venueService;
|
|
1047
|
+
private _history;
|
|
1048
|
+
private _hiddenBuildings;
|
|
1010
1049
|
switchOutdoor: SwitchOutdoorHandler;
|
|
1011
1050
|
switchBuilding: SwitchBuildingHandler;
|
|
1012
1051
|
buildingSelector: BuildingSelectorHandler;
|
|
@@ -1118,7 +1157,7 @@ declare class Map$1 extends Evented {
|
|
|
1118
1157
|
filter?: (feature: MapGeoJSONFeature) => boolean;
|
|
1119
1158
|
}): MapGeoJSONFeature[];
|
|
1120
1159
|
/**
|
|
1121
|
-
* @description Select
|
|
1160
|
+
* @description Select indoor by locating the target floor.
|
|
1122
1161
|
* @param floorId
|
|
1123
1162
|
* @param options {dragPan: boolean} Set dragPan to be false, the map will not pan to the building center.
|
|
1124
1163
|
* Default is true.
|
|
@@ -1127,7 +1166,7 @@ declare class Map$1 extends Evented {
|
|
|
1127
1166
|
dragPan?: boolean;
|
|
1128
1167
|
}): Promise<void>;
|
|
1129
1168
|
/**
|
|
1130
|
-
* @description Select
|
|
1169
|
+
* @description Select indoor by locating the target building.
|
|
1131
1170
|
* @param buildingId
|
|
1132
1171
|
* @param options {dragPan: boolean} Set dragPan to be false, the map will not pan to the building center.
|
|
1133
1172
|
* Default is true.
|
|
@@ -1136,7 +1175,7 @@ declare class Map$1 extends Evented {
|
|
|
1136
1175
|
dragPan?: boolean;
|
|
1137
1176
|
}): Promise<void>;
|
|
1138
1177
|
/**
|
|
1139
|
-
* @description Select
|
|
1178
|
+
* @description Select indoor by locating the target venue.
|
|
1140
1179
|
* @param venueId 'venueId' can be string or null. Exit indoors if venueId is null.
|
|
1141
1180
|
* @param options {dragPan: boolean} Set dragPan to be false, the map will not pan to the building center.
|
|
1142
1181
|
* Default is true.
|
|
@@ -1216,11 +1255,15 @@ declare class Map$1 extends Evented {
|
|
|
1216
1255
|
private _selectPoiById;
|
|
1217
1256
|
private _resourceRequestTransform;
|
|
1218
1257
|
private _checkMapZoom;
|
|
1219
|
-
private _clickEventsDispatcher;
|
|
1220
1258
|
private _hideIndoorLayers;
|
|
1221
1259
|
private _showIndoorLayers;
|
|
1222
1260
|
private _updatePermission;
|
|
1223
|
-
private
|
|
1261
|
+
private _selectCenterBuilding;
|
|
1262
|
+
/**
|
|
1263
|
+
* @description Query building features within the center rectangle(width: 1/2 width of map view, height: 1/2 height of map view) of map.
|
|
1264
|
+
* @returns Map<buildingId, buildingFeature>
|
|
1265
|
+
*/
|
|
1266
|
+
private _getCenterBuildingsMap;
|
|
1224
1267
|
}
|
|
1225
1268
|
export declare class Marker {
|
|
1226
1269
|
private readonly _maplibreMap;
|
|
@@ -1229,7 +1272,7 @@ export declare class Marker {
|
|
|
1229
1272
|
private _imageName;
|
|
1230
1273
|
private _imageSize;
|
|
1231
1274
|
private _iconAnchor;
|
|
1232
|
-
constructor(maplibreMap:
|
|
1275
|
+
constructor(maplibreMap: maplibregl$1.Map);
|
|
1233
1276
|
/**
|
|
1234
1277
|
* @description Set custom marker image.
|
|
1235
1278
|
* @param icon Sprite name in map style or the URL of the image file.
|
|
@@ -1292,7 +1335,7 @@ export declare class Marker {
|
|
|
1292
1335
|
* @param callback
|
|
1293
1336
|
*/
|
|
1294
1337
|
on(eventKey: keyof MapLayerEventType, callback: (marker: MapGeoJSONFeature) => void): {
|
|
1295
|
-
off: () =>
|
|
1338
|
+
off: () => maplibregl$1.Map;
|
|
1296
1339
|
};
|
|
1297
1340
|
/**
|
|
1298
1341
|
* @description Filter marker by custom properties.
|
|
@@ -1353,7 +1396,7 @@ export declare class Poi {
|
|
|
1353
1396
|
private _map;
|
|
1354
1397
|
private _layerIds;
|
|
1355
1398
|
private _dispatch;
|
|
1356
|
-
constructor(map:
|
|
1399
|
+
constructor(map: maplibregl$1.Map);
|
|
1357
1400
|
/**
|
|
1358
1401
|
* @description Listen for POI click events.
|
|
1359
1402
|
* @param listener
|
|
@@ -1373,7 +1416,7 @@ export declare class RoutePainter {
|
|
|
1373
1416
|
private _stopMarkerIcons;
|
|
1374
1417
|
private _markerIconSize;
|
|
1375
1418
|
private _paintProperties;
|
|
1376
|
-
constructor(maplibreMap:
|
|
1419
|
+
constructor(maplibreMap: maplibregl$1.Map);
|
|
1377
1420
|
/**
|
|
1378
1421
|
* @description Set image[s] of the stop marker[s].
|
|
1379
1422
|
* @param icons {**Array<string | null> | {from?: string | null; to?: string | null; stops?: Array<string | null> | null;}**}
|
|
@@ -1545,7 +1588,8 @@ export declare class BuildingsService {
|
|
|
1545
1588
|
export declare class PoisService {
|
|
1546
1589
|
private _api;
|
|
1547
1590
|
private _apiV4;
|
|
1548
|
-
private
|
|
1591
|
+
private _categoriesApi;
|
|
1592
|
+
private _categoriesGroupApi;
|
|
1549
1593
|
private _request;
|
|
1550
1594
|
constructor();
|
|
1551
1595
|
/**
|
|
@@ -1610,15 +1654,10 @@ export declare class PoisService {
|
|
|
1610
1654
|
*/
|
|
1611
1655
|
searchByFloor(options: IPoiSearchByFloorOptions): TPromisePois;
|
|
1612
1656
|
/**
|
|
1613
|
-
* @description Search poi categories by venue
|
|
1614
|
-
*
|
|
1615
|
-
* @param paramObject
|
|
1657
|
+
* @description Search poi categories by venue/building/floor/bounds.
|
|
1658
|
+
* @param options
|
|
1616
1659
|
*/
|
|
1617
|
-
searchCategories(
|
|
1618
|
-
venueId?: string;
|
|
1619
|
-
buildingId?: string;
|
|
1620
|
-
floorId?: string;
|
|
1621
|
-
}): TPromiseCategories;
|
|
1660
|
+
searchCategories(options: TSearchCategoriesOptions): TPromiseCategories;
|
|
1622
1661
|
/**
|
|
1623
1662
|
* @description Search surrounding POIs based on the user's location and orientation.
|
|
1624
1663
|
* BuildingId, floorId and ordinal are mutually exclusive, priority: ordinal > floorId > buildingId.
|