@tianditu/core 0.1.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/LICENSE +21 -0
- package/README.md +68 -0
- package/dist/index.d.mts +662 -0
- package/dist/index.mjs +1617 -0
- package/package.json +53 -0
- package/types/base.d.ts +97 -0
- package/types/control/control.d.ts +55 -0
- package/types/control/copyright.d.ts +30 -0
- package/types/control/index.d.ts +6 -0
- package/types/control/mapType.d.ts +63 -0
- package/types/control/overviewMap.d.ts +64 -0
- package/types/control/scale.d.ts +17 -0
- package/types/control/zoom.d.ts +24 -0
- package/types/global.d.mts +2 -0
- package/types/index.d.ts +19 -0
- package/types/layer/gridlineLayer.d.ts +33 -0
- package/types/layer/index.d.ts +4 -0
- package/types/layer/tdt.d.ts +14 -0
- package/types/layer/tileLayer.d.ts +78 -0
- package/types/layer/wms.d.ts +24 -0
- package/types/map.d.ts +290 -0
- package/types/militarySymbols/base.d.ts +71 -0
- package/types/militarySymbols/control.d.ts +24 -0
- package/types/militarySymbols/entities.d.ts +547 -0
- package/types/militarySymbols/index.d.ts +4 -0
- package/types/militarySymbols/tools.d.ts +191 -0
- package/types/modular.d.ts +258 -0
- package/types/mousetool/circleTool.d.ts +32 -0
- package/types/mousetool/coordinatePickup.d.ts +28 -0
- package/types/mousetool/index.d.ts +8 -0
- package/types/mousetool/markTool.d.ts +40 -0
- package/types/mousetool/mousetool.d.ts +28 -0
- package/types/mousetool/paintBrushTool.d.ts +23 -0
- package/types/mousetool/polygonTool.d.ts +47 -0
- package/types/mousetool/polylineTool.d.ts +47 -0
- package/types/mousetool/rectangleTool.d.ts +28 -0
- package/types/overlay/circle.d.ts +67 -0
- package/types/overlay/cloudMarkerCollection.d.ts +50 -0
- package/types/overlay/contextMenu.d.ts +75 -0
- package/types/overlay/icon.d.ts +33 -0
- package/types/overlay/index.d.ts +13 -0
- package/types/overlay/infowindow.d.ts +59 -0
- package/types/overlay/label.d.ts +53 -0
- package/types/overlay/marker.d.ts +50 -0
- package/types/overlay/markerClusterer.d.ts +103 -0
- package/types/overlay/overlay.d.ts +109 -0
- package/types/overlay/polygon.d.ts +59 -0
- package/types/overlay/polyline.d.ts +47 -0
- package/types/overlay/rectangle.d.ts +57 -0
- package/types/overlay/svg.d.ts +19 -0
- package/types/service/administrativeDivision.d.ts +48 -0
- package/types/service/busLineSearch.d.ts +89 -0
- package/types/service/dataSources.d.ts +30 -0
- package/types/service/drivingRoute.d.ts +135 -0
- package/types/service/geocoder.d.ts +47 -0
- package/types/service/geolocation.d.ts +39 -0
- package/types/service/index.d.ts +9 -0
- package/types/service/localCity.d.ts +24 -0
- package/types/service/localSearch.d.ts +178 -0
- package/types/service/transitRoute.d.ts +132 -0
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
export {};
|
|
2
|
+
|
|
3
|
+
declare global {
|
|
4
|
+
namespace T {
|
|
5
|
+
/**
|
|
6
|
+
* ArcTool(标绘工具)
|
|
7
|
+
*/
|
|
8
|
+
class ArcTool extends MilitaryTool<Arc> {
|
|
9
|
+
constructor(map: Map, options: ArcToolOptions);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* BezierCurve2Tool(标绘工具)
|
|
14
|
+
*/
|
|
15
|
+
class BezierCurve2Tool extends MilitaryTool<BezierCurve2> {
|
|
16
|
+
constructor(map: Map, options: BezierCurve2ToolOptions);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* BezierCurve3Tool(标绘工具)
|
|
21
|
+
*/
|
|
22
|
+
class BezierCurve3Tool extends MilitaryTool<BezierCurve3> {
|
|
23
|
+
constructor(map: Map, options: BezierCurve3ToolOptions);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* BezierCurveArrowTool(标绘工具)
|
|
28
|
+
*/
|
|
29
|
+
class BezierCurveArrowTool extends MilitaryTool<BezierCurveArrow> {
|
|
30
|
+
constructor(map: Map, options: BezierCurveArrowToolOptions);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* BezierCurveNTool(标绘工具)
|
|
35
|
+
*/
|
|
36
|
+
class BezierCurveNTool extends MilitaryTool<BezierCurveN> {
|
|
37
|
+
constructor(map: Map, options: BezierCurveNToolOptions);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* CardinalCurveArrowTool(标绘工具)
|
|
42
|
+
*/
|
|
43
|
+
class CardinalCurveArrowTool extends MilitaryTool<CardinalCurveArrow> {
|
|
44
|
+
constructor(map: Map, options: CardinalCurveArrowToolOptions);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* CardinalCurveTool(标绘工具)
|
|
49
|
+
*/
|
|
50
|
+
class CardinalCurveTool extends MilitaryTool<CardinalCurve> {
|
|
51
|
+
constructor(map: Map, options: CardinalCurveToolOptions);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* CloseCurveTool(标绘工具)
|
|
56
|
+
*/
|
|
57
|
+
class CloseCurveTool extends MilitaryTool<CloseCurve> {
|
|
58
|
+
constructor(map: Map, options: CloseCurveToolOptions);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* CurveFlagTool(标绘工具)
|
|
63
|
+
*/
|
|
64
|
+
class CurveFlagTool extends MilitaryTool<CurveFlag> {
|
|
65
|
+
constructor(map: Map, options: CurveFlagToolOptions);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* DiagonalArrowTool(标绘工具)
|
|
70
|
+
*/
|
|
71
|
+
class DiagonalArrowTool extends MilitaryTool<DiagonalArrow> {
|
|
72
|
+
constructor(map: Map, options: DiagonalArrowToolOptions);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* DoubleArrowTool(标绘工具)
|
|
77
|
+
*/
|
|
78
|
+
class DoubleArrowTool extends MilitaryTool<DoubleArrow> {
|
|
79
|
+
constructor(map: Map, options: DoubleArrowToolOptions);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* DoveTailDiagonalArrowTool(标绘工具)
|
|
84
|
+
*/
|
|
85
|
+
class DoveTailDiagonalArrowTool extends MilitaryTool<DoveTailDiagonalArrow> {
|
|
86
|
+
constructor(map: Map, options: DoveTailDiagonalArrowToolOptions);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* DoveTailStraightArrowTool(标绘工具)
|
|
91
|
+
*/
|
|
92
|
+
class DoveTailStraightArrowTool extends MilitaryTool<DoveTailStraightArrow> {
|
|
93
|
+
constructor(map: Map, options: DoveTailStraightArrowToolOptions);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* GatheringPlaceTool(标绘工具)
|
|
98
|
+
*/
|
|
99
|
+
class GatheringPlaceTool extends MilitaryTool<GatheringPlace> {
|
|
100
|
+
constructor(map: Map, options: GatheringPlaceToolOptions);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* HandDrawingTool(标绘工具)
|
|
105
|
+
*/
|
|
106
|
+
class HandDrawingTool extends MilitaryTool<HandDrawing> {
|
|
107
|
+
constructor(map: Map, options: HandDrawingToolOptions);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* ParallelSearchTool(标绘工具)
|
|
112
|
+
*/
|
|
113
|
+
class ParallelSearchTool extends MilitaryTool<ParallelSearch> {
|
|
114
|
+
constructor(map: Map, options: ParallelSearchToolOptions);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* PolylineArrowTool(标绘工具)
|
|
119
|
+
*/
|
|
120
|
+
class PolylineArrowTool extends MilitaryTool<PolylineArrow> {
|
|
121
|
+
constructor(map: Map, options: PolylineArrowToolOptions);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* RectFlagTool(标绘工具)
|
|
126
|
+
*/
|
|
127
|
+
class RectFlagTool extends MilitaryTool<RectFlag> {
|
|
128
|
+
constructor(map: Map, options: RectFlagToolOptions);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* RoundRectTool(标绘工具)
|
|
133
|
+
*/
|
|
134
|
+
class RoundRectTool extends MilitaryTool<RoundRect> {
|
|
135
|
+
constructor(map: Map, options: RoundRectToolOptions);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* SectorSearchTool(标绘工具)
|
|
140
|
+
*/
|
|
141
|
+
class SectorSearchTool extends MilitaryTool<SectorSearch> {
|
|
142
|
+
constructor(map: Map, options: SectorSearchToolOptions);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* SectorTool(标绘工具)
|
|
147
|
+
*/
|
|
148
|
+
class SectorTool extends MilitaryTool<Sector> {
|
|
149
|
+
constructor(map: Map, options: SectorToolOptions);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* StraightArrowTool(标绘工具)
|
|
154
|
+
*/
|
|
155
|
+
class StraightArrowTool extends MilitaryTool<StraightArrow> {
|
|
156
|
+
constructor(map: Map, options: StraightArrowToolOptions);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* TriangleFlagTool(标绘工具)
|
|
161
|
+
*/
|
|
162
|
+
class TriangleFlagTool extends MilitaryTool<TriangleFlag> {
|
|
163
|
+
constructor(map: Map, options: TriangleFlagToolOptions);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
// 各工具配置项官方均只列 style 与 layers,统一继承公共接口
|
|
167
|
+
interface ArcToolOptions extends MilitaryToolOptions {}
|
|
168
|
+
interface BezierCurve2ToolOptions extends MilitaryToolOptions {}
|
|
169
|
+
interface BezierCurve3ToolOptions extends MilitaryToolOptions {}
|
|
170
|
+
interface BezierCurveArrowToolOptions extends MilitaryToolOptions {}
|
|
171
|
+
interface BezierCurveNToolOptions extends MilitaryToolOptions {}
|
|
172
|
+
interface CardinalCurveArrowToolOptions extends MilitaryToolOptions {}
|
|
173
|
+
interface CardinalCurveToolOptions extends MilitaryToolOptions {}
|
|
174
|
+
interface CloseCurveToolOptions extends MilitaryToolOptions {}
|
|
175
|
+
interface CurveFlagToolOptions extends MilitaryToolOptions {}
|
|
176
|
+
interface DiagonalArrowToolOptions extends MilitaryToolOptions {}
|
|
177
|
+
interface DoubleArrowToolOptions extends MilitaryToolOptions {}
|
|
178
|
+
interface DoveTailDiagonalArrowToolOptions extends MilitaryToolOptions {}
|
|
179
|
+
interface DoveTailStraightArrowToolOptions extends MilitaryToolOptions {}
|
|
180
|
+
interface GatheringPlaceToolOptions extends MilitaryToolOptions {}
|
|
181
|
+
interface HandDrawingToolOptions extends MilitaryToolOptions {}
|
|
182
|
+
interface ParallelSearchToolOptions extends MilitaryToolOptions {}
|
|
183
|
+
interface PolylineArrowToolOptions extends MilitaryToolOptions {}
|
|
184
|
+
interface RectFlagToolOptions extends MilitaryToolOptions {}
|
|
185
|
+
interface RoundRectToolOptions extends MilitaryToolOptions {}
|
|
186
|
+
interface SectorSearchToolOptions extends MilitaryToolOptions {}
|
|
187
|
+
interface SectorToolOptions extends MilitaryToolOptions {}
|
|
188
|
+
interface StraightArrowToolOptions extends MilitaryToolOptions {}
|
|
189
|
+
interface TriangleFlagToolOptions extends MilitaryToolOptions {}
|
|
190
|
+
}
|
|
191
|
+
}
|
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 模块化类型出口:将全局 T 命名空间的成员以具名形式导出,
|
|
3
|
+
* 供 `import type * as T from "@tianditu/types/modular"` 或按需具名导入。
|
|
4
|
+
* 全局 `T` 注入仍由包主出口(src/index.d.ts)提供,两者共存。
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import "./index";
|
|
8
|
+
|
|
9
|
+
export type AddressComponent = T.AddressComponent;
|
|
10
|
+
export type AdministrativeDivision = T.AdministrativeDivision;
|
|
11
|
+
export type AdministrativeDivisionOptions = T.AdministrativeDivisionOptions;
|
|
12
|
+
export type AdministrativeDivisionResult = T.AdministrativeDivisionResult;
|
|
13
|
+
export type Arc = T.Arc;
|
|
14
|
+
export type ArcOptions = T.ArcOptions;
|
|
15
|
+
export type ArcTool = T.ArcTool;
|
|
16
|
+
export type ArcToolOptions = T.ArcToolOptions;
|
|
17
|
+
export type BezierCurve2 = T.BezierCurve2;
|
|
18
|
+
export type BezierCurve2Options = T.BezierCurve2Options;
|
|
19
|
+
export type BezierCurve2Tool = T.BezierCurve2Tool;
|
|
20
|
+
export type BezierCurve2ToolOptions = T.BezierCurve2ToolOptions;
|
|
21
|
+
export type BezierCurve3 = T.BezierCurve3;
|
|
22
|
+
export type BezierCurve3Options = T.BezierCurve3Options;
|
|
23
|
+
export type BezierCurve3Tool = T.BezierCurve3Tool;
|
|
24
|
+
export type BezierCurve3ToolOptions = T.BezierCurve3ToolOptions;
|
|
25
|
+
export type BezierCurveArrow = T.BezierCurveArrow;
|
|
26
|
+
export type BezierCurveArrowOptions = T.BezierCurveArrowOptions;
|
|
27
|
+
export type BezierCurveArrowTool = T.BezierCurveArrowTool;
|
|
28
|
+
export type BezierCurveArrowToolOptions = T.BezierCurveArrowToolOptions;
|
|
29
|
+
export type BezierCurveN = T.BezierCurveN;
|
|
30
|
+
export type BezierCurveNOptions = T.BezierCurveNOptions;
|
|
31
|
+
export type BezierCurveNTool = T.BezierCurveNTool;
|
|
32
|
+
export type BezierCurveNToolOptions = T.BezierCurveNToolOptions;
|
|
33
|
+
export type BusLine = T.BusLine;
|
|
34
|
+
export type BusLineSearch = T.BusLineSearch;
|
|
35
|
+
export type BusLineSearchOptions = T.BusLineSearchOptions;
|
|
36
|
+
export type BusListItem = T.BusListItem;
|
|
37
|
+
export type BusListResult = T.BusListResult;
|
|
38
|
+
export type CardinalCurve = T.CardinalCurve;
|
|
39
|
+
export type CardinalCurveArrow = T.CardinalCurveArrow;
|
|
40
|
+
export type CardinalCurveArrowOptions = T.CardinalCurveArrowOptions;
|
|
41
|
+
export type CardinalCurveArrowTool = T.CardinalCurveArrowTool;
|
|
42
|
+
export type CardinalCurveArrowToolOptions = T.CardinalCurveArrowToolOptions;
|
|
43
|
+
export type CardinalCurveOptions = T.CardinalCurveOptions;
|
|
44
|
+
export type CardinalCurveTool = T.CardinalCurveTool;
|
|
45
|
+
export type CardinalCurveToolOptions = T.CardinalCurveToolOptions;
|
|
46
|
+
export type Circle = T.Circle;
|
|
47
|
+
export type CircleEvents = T.CircleEvents;
|
|
48
|
+
export type CircleOptions = T.CircleOptions;
|
|
49
|
+
export type CircleTool = T.CircleTool;
|
|
50
|
+
export type CircleToolEvent = T.CircleToolEvent;
|
|
51
|
+
export type CircleToolEvents = T.CircleToolEvents;
|
|
52
|
+
export type CircleToolOptions = T.CircleToolOptions;
|
|
53
|
+
export type CloseCurve = T.CloseCurve;
|
|
54
|
+
export type CloseCurveOptions = T.CloseCurveOptions;
|
|
55
|
+
export type CloseCurveTool = T.CloseCurveTool;
|
|
56
|
+
export type CloseCurveToolOptions = T.CloseCurveToolOptions;
|
|
57
|
+
export type CloudMarkerCollection = T.CloudMarkerCollection;
|
|
58
|
+
export type CloudMarkerCollectionEvents = T.CloudMarkerCollectionEvents;
|
|
59
|
+
export type CloudMarkerCollectionOptions = T.CloudMarkerCollectionOptions;
|
|
60
|
+
export type ContextMenu = T.ContextMenu;
|
|
61
|
+
export type ContextMenuEvent = T.ContextMenuEvent;
|
|
62
|
+
export type ContextMenuEvents = T.ContextMenuEvents;
|
|
63
|
+
export type Control = T.Control;
|
|
64
|
+
export type ControlCopyright = T.ControlCopyright;
|
|
65
|
+
export type ControlCopyrightOptions = T.ControlCopyrightOptions;
|
|
66
|
+
export type ControlMapType = T.ControlMapType;
|
|
67
|
+
export type ControlMapTypeOptions = T.ControlMapTypeOptions;
|
|
68
|
+
export type ControlMapTypeOptionsMapType = T.ControlMapTypeOptionsMapType;
|
|
69
|
+
export type ControlMilitarySymbols = T.ControlMilitarySymbols;
|
|
70
|
+
export type ControlMilitarySymbolsOptions = T.ControlMilitarySymbolsOptions;
|
|
71
|
+
export type ControlOptions = T.ControlOptions;
|
|
72
|
+
export type ControlOverviewMap = T.ControlOverviewMap;
|
|
73
|
+
export type ControlOverviewMapEvent = T.ControlOverviewMapEvent;
|
|
74
|
+
export type ControlOverviewMapEvents = T.ControlOverviewMapEvents;
|
|
75
|
+
export type ControlOverviewMapOptions = T.ControlOverviewMapOptions;
|
|
76
|
+
export type ControlPosition = T.ControlPosition;
|
|
77
|
+
export type ControlScale = T.ControlScale;
|
|
78
|
+
export type ControlScaleOptions = T.ControlScaleOptions;
|
|
79
|
+
export type ControlZoom = T.ControlZoom;
|
|
80
|
+
export type ControlZoomOptions = T.ControlZoomOptions;
|
|
81
|
+
export type CoordinatePickup = T.CoordinatePickup;
|
|
82
|
+
export type CoordinatePickupOptions = T.CoordinatePickupOptions;
|
|
83
|
+
export type CurveFlag = T.CurveFlag;
|
|
84
|
+
export type CurveFlagOptions = T.CurveFlagOptions;
|
|
85
|
+
export type CurveFlagTool = T.CurveFlagTool;
|
|
86
|
+
export type CurveFlagToolOptions = T.CurveFlagToolOptions;
|
|
87
|
+
export type DataSources = T.DataSources;
|
|
88
|
+
export type DataSourcesOptions = T.DataSourcesOptions;
|
|
89
|
+
export type DataSourcesResult = T.DataSourcesResult;
|
|
90
|
+
export type DiagonalArrow = T.DiagonalArrow;
|
|
91
|
+
export type DiagonalArrowOptions = T.DiagonalArrowOptions;
|
|
92
|
+
export type DiagonalArrowTool = T.DiagonalArrowTool;
|
|
93
|
+
export type DiagonalArrowToolOptions = T.DiagonalArrowToolOptions;
|
|
94
|
+
export type DoubleArrow = T.DoubleArrow;
|
|
95
|
+
export type DoubleArrowOptions = T.DoubleArrowOptions;
|
|
96
|
+
export type DoubleArrowTool = T.DoubleArrowTool;
|
|
97
|
+
export type DoubleArrowToolOptions = T.DoubleArrowToolOptions;
|
|
98
|
+
export type DoveTailDiagonalArrow = T.DoveTailDiagonalArrow;
|
|
99
|
+
export type DoveTailDiagonalArrowOptions = T.DoveTailDiagonalArrowOptions;
|
|
100
|
+
export type DoveTailDiagonalArrowTool = T.DoveTailDiagonalArrowTool;
|
|
101
|
+
export type DoveTailDiagonalArrowToolOptions = T.DoveTailDiagonalArrowToolOptions;
|
|
102
|
+
export type DoveTailStraightArrow = T.DoveTailStraightArrow;
|
|
103
|
+
export type DoveTailStraightArrowOptions = T.DoveTailStraightArrowOptions;
|
|
104
|
+
export type DoveTailStraightArrowTool = T.DoveTailStraightArrowTool;
|
|
105
|
+
export type DoveTailStraightArrowToolOptions = T.DoveTailStraightArrowToolOptions;
|
|
106
|
+
export type DrivingRoute = T.DrivingRoute;
|
|
107
|
+
export type DrivingRouteOptions = T.DrivingRouteOptions;
|
|
108
|
+
export type DrivingRouteResult = T.DrivingRouteResult;
|
|
109
|
+
export type GatheringPlace = T.GatheringPlace;
|
|
110
|
+
export type GatheringPlaceOptions = T.GatheringPlaceOptions;
|
|
111
|
+
export type GatheringPlaceTool = T.GatheringPlaceTool;
|
|
112
|
+
export type GatheringPlaceToolOptions = T.GatheringPlaceToolOptions;
|
|
113
|
+
export type Geocoder = T.Geocoder;
|
|
114
|
+
export type GeocoderResult = T.GeocoderResult;
|
|
115
|
+
export type Geolocation = T.Geolocation;
|
|
116
|
+
export type GeolocationOptions = T.GeolocationOptions;
|
|
117
|
+
export type GeolocationResult = T.GeolocationResult;
|
|
118
|
+
export type GridlineLayer = T.GridlineLayer;
|
|
119
|
+
export type GridlineLayerOptions = T.GridlineLayerOptions;
|
|
120
|
+
export type HandDrawing = T.HandDrawing;
|
|
121
|
+
export type HandDrawingTool = T.HandDrawingTool;
|
|
122
|
+
export type HandDrawingToolOptions = T.HandDrawingToolOptions;
|
|
123
|
+
export type Icon = T.Icon;
|
|
124
|
+
export type IconOptions = T.IconOptions;
|
|
125
|
+
export type InfoWindow = T.InfoWindow;
|
|
126
|
+
export type InfoWindowEvent = T.InfoWindowEvent;
|
|
127
|
+
export type InfoWindowEvents = T.InfoWindowEvents;
|
|
128
|
+
export type InfoWindowOptions = T.InfoWindowOptions;
|
|
129
|
+
export type Label = T.Label;
|
|
130
|
+
export type LabelEvents = T.LabelEvents;
|
|
131
|
+
export type LabelOptions = T.LabelOptions;
|
|
132
|
+
export type LayerGroup = T.LayerGroup;
|
|
133
|
+
export type LngLat = T.LngLat;
|
|
134
|
+
export type LngLatBounds = T.LngLatBounds;
|
|
135
|
+
export type LocalCity = T.LocalCity;
|
|
136
|
+
export type LocalCityResult = T.LocalCityResult;
|
|
137
|
+
export type LocalSearch = T.LocalSearch;
|
|
138
|
+
export type LocalSearchAdmin = T.LocalSearchAdmin;
|
|
139
|
+
export type LocalSearchArea = T.LocalSearchArea;
|
|
140
|
+
export type LocalSearchLineData = T.LocalSearchLineData;
|
|
141
|
+
export type LocalSearchOptions = T.LocalSearchOptions;
|
|
142
|
+
export type LocalSearchPoi = T.LocalSearchPoi;
|
|
143
|
+
export type LocalSearchPrompt = T.LocalSearchPrompt;
|
|
144
|
+
export type LocalSearchResult = T.LocalSearchResult;
|
|
145
|
+
export type LocalSearchStatistics = T.LocalSearchStatistics;
|
|
146
|
+
export type LocalSearchSuggest = T.LocalSearchSuggest;
|
|
147
|
+
export type MakerEvents = T.MakerEvents;
|
|
148
|
+
export type Map = T.Map;
|
|
149
|
+
export type MapEvent = T.MapEvent;
|
|
150
|
+
export type MapEventBase = T.MapEventBase;
|
|
151
|
+
export type MapEvents = T.MapEvents;
|
|
152
|
+
export type MapOptions = T.MapOptions;
|
|
153
|
+
export type MapPanes = T.MapPanes;
|
|
154
|
+
export type MapType = T.MapType;
|
|
155
|
+
export type MarkTool = T.MarkTool;
|
|
156
|
+
export type MarkToolEvent = T.MarkToolEvent;
|
|
157
|
+
export type MarkToolEvents = T.MarkToolEvents;
|
|
158
|
+
export type MarkToolOptions = T.MarkToolOptions;
|
|
159
|
+
export type Marker = T.Marker;
|
|
160
|
+
export type MarkerClusterer = T.MarkerClusterer;
|
|
161
|
+
export type MarkerClustererEvent = T.MarkerClustererEvent;
|
|
162
|
+
export type MarkerClustererEvents = T.MarkerClustererEvents;
|
|
163
|
+
export type MarkerClustererOptions = T.MarkerClustererOptions;
|
|
164
|
+
export type MarkerClustererStyle = T.MarkerClustererStyle;
|
|
165
|
+
export type MarkerEvent = T.MarkerEvent;
|
|
166
|
+
export type MarkerEvents = T.MarkerEvents;
|
|
167
|
+
export type MarkerOptions = T.MarkerOptions;
|
|
168
|
+
export type MenuItem = T.MenuItem;
|
|
169
|
+
export type MilitaryStyle = T.MilitaryStyle;
|
|
170
|
+
export type MilitaryTool<G> = T.MilitaryTool<G>;
|
|
171
|
+
export type MilitaryToolEvent<G> = T.MilitaryToolEvent<G>;
|
|
172
|
+
export type MilitaryToolEvents<G> = T.MilitaryToolEvents<G>;
|
|
173
|
+
export type MilitaryToolOptions = T.MilitaryToolOptions;
|
|
174
|
+
export type Mousetool<E> = T.Mousetool<E>;
|
|
175
|
+
export type Overlay = T.Overlay;
|
|
176
|
+
export type OverlayBase<E> = T.OverlayBase<E>;
|
|
177
|
+
export type OverlayEvent<T, LL, L = undefined> = T.OverlayEvent<T, LL, L>;
|
|
178
|
+
export type OverlayEvents<T, LL, L = undefined> = T.OverlayEvents<T, LL, L>;
|
|
179
|
+
export type OverlayExtendOptions = T.OverlayExtendOptions;
|
|
180
|
+
export type PaintBrushTool = T.PaintBrushTool;
|
|
181
|
+
export type PaintBrushToolOptions = T.PaintBrushToolOptions;
|
|
182
|
+
export type ParallelSearch = T.ParallelSearch;
|
|
183
|
+
export type ParallelSearchOptions = T.ParallelSearchOptions;
|
|
184
|
+
export type ParallelSearchTool = T.ParallelSearchTool;
|
|
185
|
+
export type ParallelSearchToolOptions = T.ParallelSearchToolOptions;
|
|
186
|
+
export type Point = T.Point;
|
|
187
|
+
export type Polygon = T.Polygon;
|
|
188
|
+
export type PolygonEvents = T.PolygonEvents;
|
|
189
|
+
export type PolygonOptions = T.PolygonOptions;
|
|
190
|
+
export type PolygonTool = T.PolygonTool;
|
|
191
|
+
export type PolygonToolEvent = T.PolygonToolEvent;
|
|
192
|
+
export type PolygonToolEvents = T.PolygonToolEvents;
|
|
193
|
+
export type PolygonToolOptions = T.PolygonToolOptions;
|
|
194
|
+
export type Polyline = T.Polyline;
|
|
195
|
+
export type PolylineArrow = T.PolylineArrow;
|
|
196
|
+
export type PolylineArrowOptions = T.PolylineArrowOptions;
|
|
197
|
+
export type PolylineArrowTool = T.PolylineArrowTool;
|
|
198
|
+
export type PolylineArrowToolOptions = T.PolylineArrowToolOptions;
|
|
199
|
+
export type PolylineEvents = T.PolylineEvents;
|
|
200
|
+
export type PolylineOptions = T.PolylineOptions;
|
|
201
|
+
export type PolylineTool = T.PolylineTool;
|
|
202
|
+
export type PolylineToolEvent = T.PolylineToolEvent;
|
|
203
|
+
export type PolylineToolEvents = T.PolylineToolEvents;
|
|
204
|
+
export type PolylineToolOptions = T.PolylineToolOptions;
|
|
205
|
+
export type QueryType = T.QueryType;
|
|
206
|
+
export type RectFlag = T.RectFlag;
|
|
207
|
+
export type RectFlagOptions = T.RectFlagOptions;
|
|
208
|
+
export type RectFlagTool = T.RectFlagTool;
|
|
209
|
+
export type RectFlagToolOptions = T.RectFlagToolOptions;
|
|
210
|
+
export type Rectangle = T.Rectangle;
|
|
211
|
+
export type RectangleEvents = T.RectangleEvents;
|
|
212
|
+
export type RectangleOptions = T.RectangleOptions;
|
|
213
|
+
export type RectangleTool = T.RectangleTool;
|
|
214
|
+
export type RectangleToolEvent = T.RectangleToolEvent;
|
|
215
|
+
export type RectangleToolEvents = T.RectangleToolEvents;
|
|
216
|
+
export type RectangleToolOptions = T.RectangleToolOptions;
|
|
217
|
+
export type RoundRect = T.RoundRect;
|
|
218
|
+
export type RoundRectOptions = T.RoundRectOptions;
|
|
219
|
+
export type RoundRectTool = T.RoundRectTool;
|
|
220
|
+
export type RoundRectToolOptions = T.RoundRectToolOptions;
|
|
221
|
+
export type Route = T.Route;
|
|
222
|
+
export type RoutePlan = T.RoutePlan;
|
|
223
|
+
export type SVG = T.SVG;
|
|
224
|
+
export type SVGOptions = T.SVGOptions;
|
|
225
|
+
export type Sector = T.Sector;
|
|
226
|
+
export type SectorOptions = T.SectorOptions;
|
|
227
|
+
export type SectorSearch = T.SectorSearch;
|
|
228
|
+
export type SectorSearchOptions = T.SectorSearchOptions;
|
|
229
|
+
export type SectorSearchTool = T.SectorSearchTool;
|
|
230
|
+
export type SectorSearchToolOptions = T.SectorSearchToolOptions;
|
|
231
|
+
export type SectorTool = T.SectorTool;
|
|
232
|
+
export type SectorToolOptions = T.SectorToolOptions;
|
|
233
|
+
export type SegmentLine = T.SegmentLine;
|
|
234
|
+
export type Station = T.Station;
|
|
235
|
+
export type Step = T.Step;
|
|
236
|
+
export type StraightArrow = T.StraightArrow;
|
|
237
|
+
export type StraightArrowOptions = T.StraightArrowOptions;
|
|
238
|
+
export type StraightArrowTool = T.StraightArrowTool;
|
|
239
|
+
export type StraightArrowToolOptions = T.StraightArrowToolOptions;
|
|
240
|
+
export type TMapTypeControlOptions = T.TMapTypeControlOptions;
|
|
241
|
+
export type TileLayer = T.TileLayer;
|
|
242
|
+
export type TileLayerEvent = T.TileLayerEvent;
|
|
243
|
+
export type TileLayerEvents = T.TileLayerEvents;
|
|
244
|
+
export type TileLayerOptions = T.TileLayerOptions;
|
|
245
|
+
export type TileLayerTDT = T.TileLayerTDT;
|
|
246
|
+
export type TileLayerTDTOptions = T.TileLayerTDTOptions;
|
|
247
|
+
export type TileLayerWMS = T.TileLayerWMS;
|
|
248
|
+
export type TileLayerWMSOptions = T.TileLayerWMSOptions;
|
|
249
|
+
export type ToolEvent<T> = T.ToolEvent<T>;
|
|
250
|
+
export type TransitRoute = T.TransitRoute;
|
|
251
|
+
export type TransitRouteLine = T.TransitRouteLine;
|
|
252
|
+
export type TransitRouteOptions = T.TransitRouteOptions;
|
|
253
|
+
export type TransitRoutePlan = T.TransitRoutePlan;
|
|
254
|
+
export type TransitRouteResult = T.TransitRouteResult;
|
|
255
|
+
export type TriangleFlag = T.TriangleFlag;
|
|
256
|
+
export type TriangleFlagOptions = T.TriangleFlagOptions;
|
|
257
|
+
export type TriangleFlagTool = T.TriangleFlagTool;
|
|
258
|
+
export type TriangleFlagToolOptions = T.TriangleFlagToolOptions;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export {};
|
|
2
|
+
|
|
3
|
+
declare global {
|
|
4
|
+
namespace T {
|
|
5
|
+
class CircleTool extends Mousetool<CircleToolEvents> {
|
|
6
|
+
/** 画圆工具,用来实现在地图上画圆的功能 */
|
|
7
|
+
constructor(map: Map, opts?: CircleToolOptions);
|
|
8
|
+
/** 获取工具中所有绘制的圆 */
|
|
9
|
+
getCircles(): Circle[];
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
type CircleToolOptions = CircleOptions;
|
|
13
|
+
|
|
14
|
+
interface CircleToolEvents {
|
|
15
|
+
/** 用户拖动绘制圆时触发 */
|
|
16
|
+
draw(e: CircleToolEvent): void;
|
|
17
|
+
/** 用户完成绘制圆时触发 */
|
|
18
|
+
drawend(e: CircleToolEvent): void;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
interface CircleToolEvent extends ToolEvent<Circle> {
|
|
22
|
+
/** 中心点的地理坐标 */
|
|
23
|
+
currentCenter: LngLat;
|
|
24
|
+
/** 半径,单位为米 */
|
|
25
|
+
currentRadius: number;
|
|
26
|
+
/** 用户最后绘制的圆对象 */
|
|
27
|
+
currentCircle: Circle;
|
|
28
|
+
/** 用户所有绘制的圆对象 */
|
|
29
|
+
allCircles: Circle[];
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export {};
|
|
2
|
+
|
|
3
|
+
declare global {
|
|
4
|
+
namespace T {
|
|
5
|
+
/**
|
|
6
|
+
* 用来实现在地图上用鼠标获取地理坐标的功能
|
|
7
|
+
*/
|
|
8
|
+
class CoordinatePickup {
|
|
9
|
+
/**
|
|
10
|
+
* 创建一个坐标拾取组件
|
|
11
|
+
* @param map 地图对象
|
|
12
|
+
* @param opts 配置项
|
|
13
|
+
*/
|
|
14
|
+
constructor(map: Map, opts: CoordinatePickupOptions);
|
|
15
|
+
/** 开启鼠标点击地图时获取地理坐标的事件 */
|
|
16
|
+
addEvent(): void;
|
|
17
|
+
/** 关闭鼠标点击地图时获取地理坐标的事件 */
|
|
18
|
+
removeEvent(): void;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
interface CoordinatePickupOptions {
|
|
22
|
+
/**
|
|
23
|
+
* 设置回调函数(开启后点击地图回调地理坐标)
|
|
24
|
+
*/
|
|
25
|
+
callback?: (lnglat: LngLat) => void;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export {};
|
|
2
|
+
|
|
3
|
+
declare global {
|
|
4
|
+
namespace T {
|
|
5
|
+
class MarkTool extends Mousetool<MarkToolEvents> {
|
|
6
|
+
/** 标注工具,用来让用户在地图上标注一个点,可以通过该工具获得用户标点的经纬度位置 */
|
|
7
|
+
constructor(map: Map, opts?: MarkToolOptions);
|
|
8
|
+
/**
|
|
9
|
+
* 设置标注工具显示的标注图标路径的路径
|
|
10
|
+
* @param url 标注图标的路径URL
|
|
11
|
+
*/
|
|
12
|
+
setPointImage(url: string): void;
|
|
13
|
+
/** 获取用户标注点的坐标,如果用户尚未操作,则返回 null */
|
|
14
|
+
getMarkControlPoint(): LngLat | null;
|
|
15
|
+
/** 获取所有工具绘制的标注图标 */
|
|
16
|
+
getMarkers(): Marker[];
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
interface MarkToolOptions {
|
|
20
|
+
/** 图标类用来表达注记。default:new T.Icon.Default() */
|
|
21
|
+
icon?: Icon;
|
|
22
|
+
/** 标记图标是否跟随鼠标。default:false */
|
|
23
|
+
follow?: boolean;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
interface MarkToolEvents {
|
|
27
|
+
/** 在用户每完成一次标注时触发事件 */
|
|
28
|
+
mouseup(e: MarkToolEvent): void;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
interface MarkToolEvent extends ToolEvent<Marker> {
|
|
32
|
+
/** 用户在地图上标的坐标 */
|
|
33
|
+
currentLngLat: LngLat;
|
|
34
|
+
/** 用户当前的标注点对象 */
|
|
35
|
+
currentMarker: Marker;
|
|
36
|
+
/** 用户使用工具所有的标注点对象 */
|
|
37
|
+
allMarkers: Marker[];
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export {};
|
|
2
|
+
|
|
3
|
+
declare global {
|
|
4
|
+
namespace T {
|
|
5
|
+
class Mousetool<E> {
|
|
6
|
+
/** 开启工具 */
|
|
7
|
+
open(): boolean;
|
|
8
|
+
/** 关闭工具 */
|
|
9
|
+
close(): void;
|
|
10
|
+
/** 清空工具工具绘制的所有图形 */
|
|
11
|
+
clear(): void;
|
|
12
|
+
/** 添加事件监听函数 */
|
|
13
|
+
addEventListener<EE extends keyof E>(event: EE, handler: E[EE]): void;
|
|
14
|
+
/** 移除事件监听函数 */
|
|
15
|
+
removeEventListener<EE extends keyof E>(event: EE, handler: E[EE]): void;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* 地图工具共有事件参数
|
|
20
|
+
*/
|
|
21
|
+
interface ToolEvent<T> {
|
|
22
|
+
/** 事件类型 */
|
|
23
|
+
type: string;
|
|
24
|
+
/** 工具对象 */
|
|
25
|
+
target: T;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export {};
|
|
2
|
+
|
|
3
|
+
declare global {
|
|
4
|
+
namespace T {
|
|
5
|
+
class PaintBrushTool extends Mousetool<any> {
|
|
6
|
+
/** 在地图容器中,创建一个可以随意画线的画笔工具 */
|
|
7
|
+
constructor(map: Map, opts?: PaintBrushToolOptions);
|
|
8
|
+
/** 获取工具中所有绘制的圆 */
|
|
9
|
+
getLayers(): SVG[];
|
|
10
|
+
/** 启用 */
|
|
11
|
+
enable(): void;
|
|
12
|
+
/** 禁用 */
|
|
13
|
+
disable(): void;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
interface PaintBrushToolOptions {
|
|
17
|
+
/** 保持工具的连续可用性 */
|
|
18
|
+
keepdrawing?: boolean;
|
|
19
|
+
/** 画笔留下笔迹的样式 */
|
|
20
|
+
style?: { color?: string; weight?: number; opacity?: number };
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
export {};
|
|
2
|
+
|
|
3
|
+
declare global {
|
|
4
|
+
namespace T {
|
|
5
|
+
class PolygonTool extends Mousetool<PolygonToolEvents> {
|
|
6
|
+
/** 多边形工具,可以通过事件来获取用户绘制的多边形,包含测面积功能 */
|
|
7
|
+
constructor(map: Map, opts?: PolygonToolOptions);
|
|
8
|
+
/**
|
|
9
|
+
* 跟随鼠标移动的说明文字
|
|
10
|
+
* @param text 文字内容
|
|
11
|
+
*/
|
|
12
|
+
setTips(text: string): void;
|
|
13
|
+
/**
|
|
14
|
+
* 计算由地理点组成的多边形的面积
|
|
15
|
+
* @param points 点坐标LngLat数组
|
|
16
|
+
*/
|
|
17
|
+
getArea(points: LngLat[]): number;
|
|
18
|
+
/** 获得所有绘制的多边形 */
|
|
19
|
+
getPolygons(): Polygon[];
|
|
20
|
+
/** 完成一个多边形的绘制,运行此方法相当于用户点击双击结束当前多边形的绘制 */
|
|
21
|
+
endDraw(): void;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
interface PolygonToolOptions extends PolygonOptions {
|
|
25
|
+
/** 是否显示面积,如果不显示面积,则可以作为画面控件使用。default:false */
|
|
26
|
+
showLabel?: boolean;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
interface PolygonToolEvents {
|
|
30
|
+
/** 用户双击完成一次折线绘制时触发事件 */
|
|
31
|
+
draw(e: PolygonToolEvent): void;
|
|
32
|
+
/** 用户在多边形绘制过程中,每次点击底图添加节点时触发事件 */
|
|
33
|
+
addpoint(e: PolygonToolEvent): void;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
interface PolygonToolEvent extends ToolEvent<Polygon> {
|
|
37
|
+
/** 用户当前绘制的多边形的点坐标数组 */
|
|
38
|
+
currentLnglats: LngLat[];
|
|
39
|
+
/** 用户最后绘制的多边形的地理面积 */
|
|
40
|
+
currentArea: number;
|
|
41
|
+
/** 当前所画多边形的对象 */
|
|
42
|
+
currentPolygon: Polygon;
|
|
43
|
+
/** 获取工具所有绘制的多边形 */
|
|
44
|
+
allPolygons: Polygon[];
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|