@mapxus/mapxus-map-jp 7.2.0 → 7.3.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/index.d.ts +93 -30
- package/index.js +3 -3
- package/package.json +2 -2
package/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Generated by dts-bundle-generator v6.13.0
|
|
2
2
|
|
|
3
3
|
import { AxiosPromise } from 'axios';
|
|
4
|
-
import { ControlPosition, FilterSpecification, IControl, LngLat, Map as MaplibreMap, Map as maplibreMap, MapGeoJSONFeature, MapLayerEventType, PointLike } from 'maplibre-gl';
|
|
4
|
+
import { ControlPosition, FilterSpecification, IControl, LngLat, Map as MaplibreMap, Map as maplibreMap, MapGeoJSONFeature, MapLayerEventType, PaddingOptions, PointLike, RequireAtLeastOne } from 'maplibre-gl';
|
|
5
5
|
|
|
6
6
|
export declare enum ThemeType {
|
|
7
7
|
CHRISTMAS = "christmas",
|
|
@@ -36,17 +36,52 @@ export interface IMapOption {
|
|
|
36
36
|
secret: string;
|
|
37
37
|
enableFloorControl?: boolean;
|
|
38
38
|
enableBuildingSelector?: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* @description 'venueId', 'buildingId', 'floorId', 'poiId' are mutually exclusive,
|
|
41
|
+
* the priority is: poiId > floorId > buildingId > venueId.
|
|
42
|
+
*/
|
|
39
43
|
venueId?: string;
|
|
44
|
+
/**
|
|
45
|
+
* @description 'venueId', 'buildingId', 'floorId', 'poiId' are mutually exclusive,
|
|
46
|
+
* the priority is: poiId > floorId > buildingId > venueId.
|
|
47
|
+
*/
|
|
40
48
|
buildingId?: string;
|
|
49
|
+
/**
|
|
50
|
+
* @description 'venueId', 'buildingId', 'floorId', 'poiId' are mutually exclusive,
|
|
51
|
+
* the priority is: poiId > floorId > buildingId > venueId.
|
|
52
|
+
*/
|
|
41
53
|
floorId?: string;
|
|
54
|
+
/**
|
|
55
|
+
* @description Initialize the map with POI as the center point, use it with maplibregl.Map 'zoom' option.
|
|
56
|
+
* 'venueId', 'buildingId', 'floorId', 'poiId' are mutually exclusive,
|
|
57
|
+
* the priority is: poiId > floorId > buildingId > venueId.
|
|
58
|
+
*/
|
|
42
59
|
poiId?: string;
|
|
43
60
|
hiddenOutdoor?: boolean;
|
|
44
61
|
theme?: ThemeType;
|
|
45
62
|
collapseCopyright?: boolean;
|
|
46
63
|
selectedBuildingBorderStyle?: ISelectedBuildingBorderStyle;
|
|
47
64
|
floorsControlStyle?: IFloorsControlStyle;
|
|
65
|
+
/**
|
|
66
|
+
* @description Switch floors by venue/building, default by venue.
|
|
67
|
+
*/
|
|
48
68
|
floorSwitchMode?: FloorSwitchMode;
|
|
69
|
+
/**
|
|
70
|
+
* @description Whether unselected buildings are masked, default is false.
|
|
71
|
+
*/
|
|
49
72
|
maskNonSelectedAreas?: boolean;
|
|
73
|
+
/**
|
|
74
|
+
* @description Whether the boundary of the selected building fits the screen, default is false.
|
|
75
|
+
* Can only be used for 'floorId', 'buildingId' and 'venueId' initialization, not for 'poiId'.
|
|
76
|
+
* When it is true, the 'boundsPadding' option is valid, and the 'zoom' option of maplibregl.Map is invalid.
|
|
77
|
+
*/
|
|
78
|
+
fitBuildingBounds?: boolean;
|
|
79
|
+
/**
|
|
80
|
+
* @description The amount of padding in pixels to add to the given bounds, default is 30.
|
|
81
|
+
* Requires 'fitBuildingBounds' to be 'true'.
|
|
82
|
+
* Parameter value ref to: https://maplibre.org/maplibre-gl-js/docs/API/types/maplibregl.PaddingOptions/
|
|
83
|
+
*/
|
|
84
|
+
boundsPadding?: number | RequireAtLeastOne<PaddingOptions>;
|
|
50
85
|
}
|
|
51
86
|
export type Listener = (param: Object) => any;
|
|
52
87
|
declare class DefinedEvent {
|
|
@@ -141,7 +176,9 @@ export declare class Indoor extends Evented {
|
|
|
141
176
|
private _upperLevelIds;
|
|
142
177
|
private _lowerLevelIds;
|
|
143
178
|
private _dispatch;
|
|
144
|
-
|
|
179
|
+
private readonly _fitBuildingBounds;
|
|
180
|
+
private readonly _boundsPadding;
|
|
181
|
+
constructor(map: maplibreMap, isHiddenOutdoor: boolean, floorSwitchMode: FloorSwitchMode, fitBuildingBounds: boolean, boundsPadding: number | RequireAtLeastOne<PaddingOptions>);
|
|
145
182
|
/**
|
|
146
183
|
* @description Turn on indoor-outdoor switching.
|
|
147
184
|
*/
|
|
@@ -481,9 +518,15 @@ export declare class Map extends Evented {
|
|
|
481
518
|
private _setIndoorFilter;
|
|
482
519
|
private _setStyle;
|
|
483
520
|
private _addControl;
|
|
484
|
-
private _defaultSetMapZoom;
|
|
485
521
|
private _selectPoiById;
|
|
486
522
|
private _getBuildingIdByVenueId;
|
|
523
|
+
private _tilesRequestTransform;
|
|
524
|
+
private _getMapZoom;
|
|
525
|
+
private _setMapStyle;
|
|
526
|
+
private _clickEventsDispatcher;
|
|
527
|
+
private _hideIndoorLayers;
|
|
528
|
+
private _showIndoorLayers;
|
|
529
|
+
private _updatePermission;
|
|
487
530
|
}
|
|
488
531
|
export type TAnchorPosition = "center" | "left" | "right" | "top" | "bottom" | "top-left" | "top-right" | "bottom-left" | "bottom-right";
|
|
489
532
|
export declare class Marker {
|
|
@@ -501,7 +544,7 @@ export declare class Marker {
|
|
|
501
544
|
* @param callback Called when the image(from an external URL) has loaded
|
|
502
545
|
* or with an error argument if there is an error.
|
|
503
546
|
*/
|
|
504
|
-
setIconImage(icon: string, callback
|
|
547
|
+
setIconImage(icon: string, callback?: VoidFunction): void;
|
|
505
548
|
/**
|
|
506
549
|
* @description Set marker by image url.
|
|
507
550
|
* @deprecated Use 'setIconImage' instead.
|
|
@@ -563,8 +606,8 @@ export declare class Marker {
|
|
|
563
606
|
* Required 'venueId' and 'ordinal' in properties.
|
|
564
607
|
* Markers not matched 'venueId' and 'ordinal' would be hidden;
|
|
565
608
|
* Outdoor markers always are shown.
|
|
566
|
-
* @param venueId {string | null | undefined}
|
|
567
|
-
* @param ordinal {string | null | undefined}
|
|
609
|
+
* @param venueId {string | null | undefined} null | undefined will be treated as ''.
|
|
610
|
+
* @param ordinal {string | null | undefined} null | undefined will be treated as ''.
|
|
568
611
|
*/
|
|
569
612
|
setFilterByVenue(venueId: string | null | undefined, ordinal: string | null | undefined): void;
|
|
570
613
|
/**
|
|
@@ -572,8 +615,8 @@ export declare class Marker {
|
|
|
572
615
|
* Required 'buildingId' and 'ordinal' in properties.
|
|
573
616
|
* Markers not matched 'buildingId' and 'ordinal' would be hidden;
|
|
574
617
|
* Outdoor markers always are shown.
|
|
575
|
-
* @param buildingId {string | null | undefined}
|
|
576
|
-
* @param ordinal {string | null | undefined}
|
|
618
|
+
* @param buildingId {string | null | undefined} null | undefined will be treated as ''.
|
|
619
|
+
* @param ordinal {string | null | undefined} null | undefined will be treated as ''.
|
|
577
620
|
*/
|
|
578
621
|
setFilterByBuilding(buildingId: string | null | undefined, ordinal: string | null | undefined): void;
|
|
579
622
|
/**
|
|
@@ -588,8 +631,8 @@ export declare class Marker {
|
|
|
588
631
|
* Required 'venueId' and 'ordinal' in properties.
|
|
589
632
|
* Opacities of markers matched 'venueId' and 'ordinal' are 1, others are 0.5.
|
|
590
633
|
* Outdoor markers' opacity always are 1.
|
|
591
|
-
* @param venueId {string | null | undefined}
|
|
592
|
-
* @param ordinal {string | null | undefined}
|
|
634
|
+
* @param venueId {string | null | undefined} null | undefined will be treated as ''.
|
|
635
|
+
* @param ordinal {string | null | undefined} null | undefined will be treated as ''.
|
|
593
636
|
*/
|
|
594
637
|
setOpacityByVenue(venueId: string | null | undefined, ordinal: string | null | undefined): void;
|
|
595
638
|
/**
|
|
@@ -597,8 +640,8 @@ export declare class Marker {
|
|
|
597
640
|
* Required 'buildingId' and 'ordinal' in properties.
|
|
598
641
|
* Opacities of markers matched 'buildingId' and 'ordinal' are 1, others are 0.5.
|
|
599
642
|
* Outdoor markers' opacity always are 1.
|
|
600
|
-
* @param buildingId {string | null | undefined}
|
|
601
|
-
* @param ordinal {string | null | undefined}
|
|
643
|
+
* @param buildingId {string | null | undefined} null | undefined will be treated as ''.
|
|
644
|
+
* @param ordinal {string | null | undefined} null | undefined will be treated as ''.
|
|
602
645
|
*/
|
|
603
646
|
setOpacityByBuilding(buildingId: string | null | undefined, ordinal: string | null | undefined): void;
|
|
604
647
|
private _createIconFeature;
|
|
@@ -718,7 +761,7 @@ export type IMultiLangAddress = Record<keyof IMultiLangName, {
|
|
|
718
761
|
}>;
|
|
719
762
|
export interface IBbox {
|
|
720
763
|
maxLat: number;
|
|
721
|
-
maxLon:
|
|
764
|
+
maxLon: number;
|
|
722
765
|
minLat: number;
|
|
723
766
|
minLon: number;
|
|
724
767
|
}
|
|
@@ -904,6 +947,10 @@ export interface IResponsePois {
|
|
|
904
947
|
pois: IPoi[];
|
|
905
948
|
total: number;
|
|
906
949
|
}
|
|
950
|
+
export declare enum DistanceSearchType {
|
|
951
|
+
POINT = "Point",
|
|
952
|
+
POLYGON = "Polygon"
|
|
953
|
+
}
|
|
907
954
|
export interface IPoiCategory {
|
|
908
955
|
category: string;
|
|
909
956
|
description: string;
|
|
@@ -970,25 +1017,45 @@ export declare class PoisService {
|
|
|
970
1017
|
/**
|
|
971
1018
|
* @description Search poi categories by venue id, building id, or floor id.
|
|
972
1019
|
* Search scope priority: floorId > buildingId > venueId.
|
|
973
|
-
* @param
|
|
974
|
-
* @param buildingId
|
|
975
|
-
* @param floorId
|
|
1020
|
+
* @param paramObject
|
|
976
1021
|
*/
|
|
977
|
-
searchCategories(
|
|
1022
|
+
searchCategories(paramObject: {
|
|
978
1023
|
venueId?: string;
|
|
979
1024
|
buildingId?: string;
|
|
980
1025
|
floorId?: string;
|
|
981
1026
|
}): AxiosPromise<IResponse<IPoiCategory[]>>;
|
|
982
1027
|
/**
|
|
983
|
-
* @description Search orientation and poi
|
|
984
|
-
*
|
|
985
|
-
* @param
|
|
986
|
-
* @param center User's current position, [lon, lat].
|
|
987
|
-
* @param distance Radius from center, unit is meter.
|
|
988
|
-
* @param distanceSearchType Search type, default is DistanceSearchType.POINT.
|
|
989
|
-
* @param floorId
|
|
1028
|
+
* @description Search orientation and poi.
|
|
1029
|
+
* BuildingId, floorId and ordinal are mutually exclusive, priority: ordinal > floorId > buildingId.
|
|
1030
|
+
* @param paramObj
|
|
990
1031
|
*/
|
|
991
|
-
searchOrientation(
|
|
1032
|
+
searchOrientation(paramObj: {
|
|
1033
|
+
/**
|
|
1034
|
+
* User's current position, [lon, lat].
|
|
1035
|
+
*/
|
|
1036
|
+
center: [
|
|
1037
|
+
number,
|
|
1038
|
+
number
|
|
1039
|
+
];
|
|
1040
|
+
/**
|
|
1041
|
+
* The angle between cellphone's orientation and the north.
|
|
1042
|
+
*/
|
|
1043
|
+
angle: number;
|
|
1044
|
+
/**
|
|
1045
|
+
* Radius.
|
|
1046
|
+
*/
|
|
1047
|
+
distance: number;
|
|
1048
|
+
buildingId?: string;
|
|
1049
|
+
floorId?: string;
|
|
1050
|
+
/**
|
|
1051
|
+
* Floor order in physical space, e.g. '-1', '0'(ground floor), '1'...
|
|
1052
|
+
*/
|
|
1053
|
+
ordinal?: string;
|
|
1054
|
+
/**
|
|
1055
|
+
* Search type.
|
|
1056
|
+
*/
|
|
1057
|
+
distanceSearchType?: DistanceSearchType;
|
|
1058
|
+
}): AxiosPromise<IResponse<IOrientationPoi[]>>;
|
|
992
1059
|
private _changedRes;
|
|
993
1060
|
}
|
|
994
1061
|
export interface IResponseRoute {
|
|
@@ -1115,7 +1182,7 @@ export declare class RoutePainter {
|
|
|
1115
1182
|
*/
|
|
1116
1183
|
setOutdoorLineColor(color: string): this;
|
|
1117
1184
|
/**
|
|
1118
|
-
* @description Set color of dashed
|
|
1185
|
+
* @description Set color of dashed lines which connected the start and end markers.
|
|
1119
1186
|
* @param color The color type is a color in the sRGB color space.
|
|
1120
1187
|
* Formats: HTML-style hex values, RGB, RGBA, HSL, and HSLA.
|
|
1121
1188
|
* Predefined HTML colors names, like yellow and blue, are also permitted.
|
|
@@ -1171,10 +1238,6 @@ export declare class RoutePainter {
|
|
|
1171
1238
|
}
|
|
1172
1239
|
export declare const OFFSET: number;
|
|
1173
1240
|
export declare const PAGE: number;
|
|
1174
|
-
export declare enum DistanceSearchType {
|
|
1175
|
-
POINT = "Point",
|
|
1176
|
-
POLYGON = "Polygon"
|
|
1177
|
-
}
|
|
1178
1241
|
export declare const version: string;
|
|
1179
1242
|
export type { ControlPosition, Map as MaplibreMap, MapLayerEventType, FilterSpecification, PointLike, } from "maplibre-gl";
|
|
1180
1243
|
|