@mapxus/mapxus-map-jp 7.8.0 → 7.9.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 +53 -39
- 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,7 +3,7 @@
|
|
|
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
8
|
export declare enum FloorSwitchMode {
|
|
9
9
|
SWITCHED_BY_BUILDING = 0,
|
|
@@ -38,6 +38,7 @@ export interface IBbox {
|
|
|
38
38
|
export interface IBuildingChangedOptions {
|
|
39
39
|
buildingId: string | null;
|
|
40
40
|
ordinal: string | null;
|
|
41
|
+
dragPan: boolean | "restrict";
|
|
41
42
|
}
|
|
42
43
|
export interface IMultilingualName extends Partial<Record<PresetLanguage, string>> {
|
|
43
44
|
default: string;
|
|
@@ -192,6 +193,8 @@ export interface IMapOption {
|
|
|
192
193
|
*/
|
|
193
194
|
boundsPadding?: number | RequireAtLeastOne<PaddingOptions>;
|
|
194
195
|
language?: PresetLanguage;
|
|
196
|
+
/** @description Auto Select Building by panning building to map center, default is false. */
|
|
197
|
+
autoSelectBuilding?: boolean;
|
|
195
198
|
}
|
|
196
199
|
export type TAnchorPosition = "center" | "left" | "right" | "top" | "bottom" | "top-left" | "top-right" | "bottom-left" | "bottom-right";
|
|
197
200
|
export interface IMarkerOptions {
|
|
@@ -486,6 +489,7 @@ export interface IRouteSearchOptions {
|
|
|
486
489
|
points: Array<{
|
|
487
490
|
lat: number;
|
|
488
491
|
lon: number;
|
|
492
|
+
/** @deprecated 'buildingId' will be removed in future versions */
|
|
489
493
|
buildingId?: string;
|
|
490
494
|
floorId?: string;
|
|
491
495
|
}>;
|
|
@@ -631,16 +635,19 @@ export declare class Indoor extends Evented {
|
|
|
631
635
|
private _indoorMapLoaded;
|
|
632
636
|
private readonly _isVenueMode;
|
|
633
637
|
private _isMaskMode;
|
|
634
|
-
private _upperBuildings;
|
|
635
|
-
private _lowerBuildings;
|
|
636
|
-
private readonly _hiddenBuildings;
|
|
637
638
|
private _upperLevels;
|
|
638
639
|
private _lowerLevels;
|
|
639
|
-
private _history;
|
|
640
640
|
private _featureIncomplete;
|
|
641
|
-
private
|
|
641
|
+
private _dragPan;
|
|
642
|
+
private _isNewBuilding;
|
|
643
|
+
private _buildingBounds;
|
|
644
|
+
private _history;
|
|
645
|
+
private _layerBuildings;
|
|
646
|
+
private _upperBuildings;
|
|
647
|
+
private _lowerBuildings;
|
|
648
|
+
private readonly _hiddenBuildings;
|
|
642
649
|
constructor(props: {
|
|
643
|
-
map:
|
|
650
|
+
map: maplibregl$1.Map;
|
|
644
651
|
floorSwitchMode?: FloorSwitchMode;
|
|
645
652
|
fitBuildingBounds?: boolean;
|
|
646
653
|
boundsPadding?: number | RequireAtLeastOne<PaddingOptions>;
|
|
@@ -723,24 +730,16 @@ export declare class Indoor extends Evented {
|
|
|
723
730
|
}): MapGeoJSONFeature[];
|
|
724
731
|
/**
|
|
725
732
|
* @description Get level feature at the point
|
|
733
|
+
* @deprecated
|
|
726
734
|
* @param point
|
|
727
735
|
* @return {MapGeoJSONFeature | null}
|
|
728
736
|
*/
|
|
729
737
|
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
738
|
/**
|
|
739
739
|
* @description Switch floor by ordinal.
|
|
740
740
|
* @param ordinal
|
|
741
|
-
* @param dragPan
|
|
742
741
|
*/
|
|
743
|
-
switchFloorByOrdinal(ordinal: string | null
|
|
742
|
+
switchFloorByOrdinal(ordinal: string | null): Promise<void>;
|
|
744
743
|
/**
|
|
745
744
|
* @description Hide the outdoor layer.
|
|
746
745
|
* @deprecated Use 'setOutdoorMapShown' instead.
|
|
@@ -784,7 +783,20 @@ export declare class Indoor extends Evented {
|
|
|
784
783
|
featureIncomplete?: boolean;
|
|
785
784
|
}): Promise<void>;
|
|
786
785
|
updateRendering(): void;
|
|
787
|
-
|
|
786
|
+
panToBuildingCenter(): Promise<unknown>;
|
|
787
|
+
fitBuildingBbox(): void;
|
|
788
|
+
setDragPan(dragPan: boolean | "restrict"): void;
|
|
789
|
+
setBuildingBounds(bounds: [
|
|
790
|
+
[
|
|
791
|
+
number,
|
|
792
|
+
number
|
|
793
|
+
],
|
|
794
|
+
[
|
|
795
|
+
number,
|
|
796
|
+
number
|
|
797
|
+
]
|
|
798
|
+
]): void;
|
|
799
|
+
selectBuildingByClickMap(point: PointLike): Promise<void>;
|
|
788
800
|
private _loadData;
|
|
789
801
|
private _init;
|
|
790
802
|
private _clear;
|
|
@@ -801,6 +813,7 @@ export declare class Indoor extends Evented {
|
|
|
801
813
|
private _getBuildingDefaultOrdinal;
|
|
802
814
|
private _getBuildingsOfBbox;
|
|
803
815
|
private _copyOverlapLayers;
|
|
816
|
+
private _updateFeatures;
|
|
804
817
|
private _layerDisplayedBuildings;
|
|
805
818
|
private _setDisplayedLevels;
|
|
806
819
|
private _filterTiles;
|
|
@@ -814,12 +827,11 @@ export declare class Indoor extends Evented {
|
|
|
814
827
|
export declare class BuildingFilterControl implements IControl {
|
|
815
828
|
private _map;
|
|
816
829
|
private _maplibre;
|
|
817
|
-
private _indoor;
|
|
818
830
|
private _buildingId;
|
|
819
831
|
private _features;
|
|
820
|
-
private
|
|
821
|
-
private
|
|
822
|
-
private
|
|
832
|
+
private _$container;
|
|
833
|
+
private _$listContainer;
|
|
834
|
+
private _$buildingList;
|
|
823
835
|
private _listHeight;
|
|
824
836
|
private _visible;
|
|
825
837
|
private _position;
|
|
@@ -829,7 +841,7 @@ export declare class BuildingFilterControl implements IControl {
|
|
|
829
841
|
* @param buildingSelectorEnabled
|
|
830
842
|
*/
|
|
831
843
|
constructor(map: Map$1, position?: ControlPosition, buildingSelectorEnabled?: boolean);
|
|
832
|
-
onAdd(map:
|
|
844
|
+
onAdd(map: maplibregl$1.Map): HTMLElement;
|
|
833
845
|
onRemove(): void;
|
|
834
846
|
get position(): ControlPosition;
|
|
835
847
|
get enabled(): boolean;
|
|
@@ -850,7 +862,6 @@ export declare class BuildingFilterControl implements IControl {
|
|
|
850
862
|
private _loadData;
|
|
851
863
|
private _init;
|
|
852
864
|
private _refresh;
|
|
853
|
-
private _select;
|
|
854
865
|
private _load;
|
|
855
866
|
private _buildingFilterIconCreate;
|
|
856
867
|
private _buildingNameListCreate;
|
|
@@ -897,7 +908,7 @@ export declare class FloorsControl implements IControl {
|
|
|
897
908
|
* @param options
|
|
898
909
|
*/
|
|
899
910
|
constructor(indoor: Indoor, options: IFloorSelectorOptions);
|
|
900
|
-
onAdd(map:
|
|
911
|
+
onAdd(map: maplibregl$1.Map): HTMLElement;
|
|
901
912
|
onRemove(): void;
|
|
902
913
|
get position(): ControlPosition;
|
|
903
914
|
get enabled(): boolean;
|
|
@@ -906,8 +917,9 @@ export declare class FloorsControl implements IControl {
|
|
|
906
917
|
/**
|
|
907
918
|
* @description Switch floor by ordinal
|
|
908
919
|
* @param ordinal
|
|
920
|
+
* @param dragPan
|
|
909
921
|
*/
|
|
910
|
-
switchByOrdinal(ordinal: string): void;
|
|
922
|
+
switchByOrdinal(ordinal: string, dragPan?: boolean): void;
|
|
911
923
|
/**
|
|
912
924
|
* @deprecated
|
|
913
925
|
* @param visible
|
|
@@ -920,7 +932,6 @@ export declare class FloorsControl implements IControl {
|
|
|
920
932
|
setPosition(position: ControlPosition): void;
|
|
921
933
|
changePosition(from: ControlPosition, to: ControlPosition, index?: number): void;
|
|
922
934
|
setStyle(style: Partial<IFloorSelectorStyle>): void;
|
|
923
|
-
setDragPan(dragPan: boolean | undefined): void;
|
|
924
935
|
private _setVisibility;
|
|
925
936
|
private _bindEvents;
|
|
926
937
|
private _addMapMoveEventListener;
|
|
@@ -1004,9 +1015,8 @@ declare class Map$1 extends Evented {
|
|
|
1004
1015
|
private _language;
|
|
1005
1016
|
private _dispatch;
|
|
1006
1017
|
private _fitBuildingBounds;
|
|
1007
|
-
private
|
|
1008
|
-
private
|
|
1009
|
-
private _venueService;
|
|
1018
|
+
private _history;
|
|
1019
|
+
private _hiddenBuildings;
|
|
1010
1020
|
switchOutdoor: SwitchOutdoorHandler;
|
|
1011
1021
|
switchBuilding: SwitchBuildingHandler;
|
|
1012
1022
|
buildingSelector: BuildingSelectorHandler;
|
|
@@ -1118,7 +1128,7 @@ declare class Map$1 extends Evented {
|
|
|
1118
1128
|
filter?: (feature: MapGeoJSONFeature) => boolean;
|
|
1119
1129
|
}): MapGeoJSONFeature[];
|
|
1120
1130
|
/**
|
|
1121
|
-
* @description Select
|
|
1131
|
+
* @description Select indoor by locating the target floor.
|
|
1122
1132
|
* @param floorId
|
|
1123
1133
|
* @param options {dragPan: boolean} Set dragPan to be false, the map will not pan to the building center.
|
|
1124
1134
|
* Default is true.
|
|
@@ -1127,7 +1137,7 @@ declare class Map$1 extends Evented {
|
|
|
1127
1137
|
dragPan?: boolean;
|
|
1128
1138
|
}): Promise<void>;
|
|
1129
1139
|
/**
|
|
1130
|
-
* @description Select
|
|
1140
|
+
* @description Select indoor by locating the target building.
|
|
1131
1141
|
* @param buildingId
|
|
1132
1142
|
* @param options {dragPan: boolean} Set dragPan to be false, the map will not pan to the building center.
|
|
1133
1143
|
* Default is true.
|
|
@@ -1136,7 +1146,7 @@ declare class Map$1 extends Evented {
|
|
|
1136
1146
|
dragPan?: boolean;
|
|
1137
1147
|
}): Promise<void>;
|
|
1138
1148
|
/**
|
|
1139
|
-
* @description Select
|
|
1149
|
+
* @description Select indoor by locating the target venue.
|
|
1140
1150
|
* @param venueId 'venueId' can be string or null. Exit indoors if venueId is null.
|
|
1141
1151
|
* @param options {dragPan: boolean} Set dragPan to be false, the map will not pan to the building center.
|
|
1142
1152
|
* Default is true.
|
|
@@ -1216,11 +1226,15 @@ declare class Map$1 extends Evented {
|
|
|
1216
1226
|
private _selectPoiById;
|
|
1217
1227
|
private _resourceRequestTransform;
|
|
1218
1228
|
private _checkMapZoom;
|
|
1219
|
-
private _clickEventsDispatcher;
|
|
1220
1229
|
private _hideIndoorLayers;
|
|
1221
1230
|
private _showIndoorLayers;
|
|
1222
1231
|
private _updatePermission;
|
|
1223
|
-
private
|
|
1232
|
+
private _selectCenterBuilding;
|
|
1233
|
+
/**
|
|
1234
|
+
* @description Query building features within the center rectangle(width: 1/2 width of map view, height: 1/2 height of map view) of map.
|
|
1235
|
+
* @returns Map<buildingId, buildingFeature>
|
|
1236
|
+
*/
|
|
1237
|
+
private _getCenterBuildingsMap;
|
|
1224
1238
|
}
|
|
1225
1239
|
export declare class Marker {
|
|
1226
1240
|
private readonly _maplibreMap;
|
|
@@ -1229,7 +1243,7 @@ export declare class Marker {
|
|
|
1229
1243
|
private _imageName;
|
|
1230
1244
|
private _imageSize;
|
|
1231
1245
|
private _iconAnchor;
|
|
1232
|
-
constructor(maplibreMap:
|
|
1246
|
+
constructor(maplibreMap: maplibregl$1.Map);
|
|
1233
1247
|
/**
|
|
1234
1248
|
* @description Set custom marker image.
|
|
1235
1249
|
* @param icon Sprite name in map style or the URL of the image file.
|
|
@@ -1292,7 +1306,7 @@ export declare class Marker {
|
|
|
1292
1306
|
* @param callback
|
|
1293
1307
|
*/
|
|
1294
1308
|
on(eventKey: keyof MapLayerEventType, callback: (marker: MapGeoJSONFeature) => void): {
|
|
1295
|
-
off: () =>
|
|
1309
|
+
off: () => maplibregl$1.Map;
|
|
1296
1310
|
};
|
|
1297
1311
|
/**
|
|
1298
1312
|
* @description Filter marker by custom properties.
|
|
@@ -1353,7 +1367,7 @@ export declare class Poi {
|
|
|
1353
1367
|
private _map;
|
|
1354
1368
|
private _layerIds;
|
|
1355
1369
|
private _dispatch;
|
|
1356
|
-
constructor(map:
|
|
1370
|
+
constructor(map: maplibregl$1.Map);
|
|
1357
1371
|
/**
|
|
1358
1372
|
* @description Listen for POI click events.
|
|
1359
1373
|
* @param listener
|
|
@@ -1373,7 +1387,7 @@ export declare class RoutePainter {
|
|
|
1373
1387
|
private _stopMarkerIcons;
|
|
1374
1388
|
private _markerIconSize;
|
|
1375
1389
|
private _paintProperties;
|
|
1376
|
-
constructor(maplibreMap:
|
|
1390
|
+
constructor(maplibreMap: maplibregl$1.Map);
|
|
1377
1391
|
/**
|
|
1378
1392
|
* @description Set image[s] of the stop marker[s].
|
|
1379
1393
|
* @param icons {**Array<string | null> | {from?: string | null; to?: string | null; stops?: Array<string | null> | null;}**}
|