@xingm/vmap-cesium-toolbar 1.0.0 → 1.0.1
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/core/MapPlugin.d.ts +4 -0
- package/dist/core/layers/TDTMapLayer.d.ts +20 -4
- package/dist/core/layers/index.d.ts +1 -0
- package/dist/core/types.d.ts +9 -3
- package/dist/i18n/en-US.d.ts +1 -0
- package/dist/i18n/zh-CN.d.ts +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.es.js +958 -884
- package/dist/index.es.js.map +1 -1
- package/dist/package.json +3 -2
- package/package.json +79 -73
package/dist/core/MapPlugin.d.ts
CHANGED
|
@@ -23,6 +23,7 @@ export declare class MapPlugin {
|
|
|
23
23
|
private toolbarMapTypes;
|
|
24
24
|
private currentMapTypeId;
|
|
25
25
|
private placeNameVisible;
|
|
26
|
+
private nonForcedPlaceNameVisible;
|
|
26
27
|
private noFlyZoneVisible;
|
|
27
28
|
private noFlyZoneDataSource;
|
|
28
29
|
private noFlyZoneLoadPromise;
|
|
@@ -61,9 +62,12 @@ export declare class MapPlugin {
|
|
|
61
62
|
private getToolbarMapTypes;
|
|
62
63
|
private getCurrentToolbarMapType;
|
|
63
64
|
private getLayerToken;
|
|
65
|
+
private resetTerrainProvider;
|
|
66
|
+
private applyTerrainProvider;
|
|
64
67
|
private ensureNoFlyZoneDataSource;
|
|
65
68
|
private destroyGeoWTFS;
|
|
66
69
|
private syncGeoWTFS;
|
|
70
|
+
private refreshLayersAndGeoWTFS;
|
|
67
71
|
private updateToolbarLayerState;
|
|
68
72
|
private createLayersServiceBridge;
|
|
69
73
|
private setMapType;
|
|
@@ -1,21 +1,33 @@
|
|
|
1
1
|
import { TDTLayerConfig } from '../types';
|
|
2
2
|
import { MapLayer } from './MapLayer';
|
|
3
3
|
import * as Cesium from 'cesium';
|
|
4
|
+
export declare function setTDTPlugin(plugin: unknown): void;
|
|
5
|
+
export declare function ensureTDT3DExtensionLoaded(): Promise<boolean>;
|
|
6
|
+
export declare const hasTDT3DExtension: (_CesiumNS: typeof Cesium) => boolean;
|
|
4
7
|
/**
|
|
5
8
|
* 天地图影像图层配置(带注记)
|
|
6
9
|
*/
|
|
7
|
-
export declare const createTDTImageryConfig: (token: string) => Cesium.ImageryProvider[];
|
|
10
|
+
export declare const createTDTImageryConfig: (token: string, sk?: string) => Cesium.ImageryProvider[];
|
|
8
11
|
/**
|
|
9
12
|
* 天地图矢量图层配置(带注记)
|
|
10
13
|
*/
|
|
11
|
-
export declare const createTDTVectorConfig: (token: string) => Cesium.ImageryProvider[];
|
|
14
|
+
export declare const createTDTVectorConfig: (token: string, sk?: string) => Cesium.ImageryProvider[];
|
|
12
15
|
/**
|
|
13
16
|
* 天地图地形图层配置(带注记)
|
|
14
17
|
*/
|
|
15
|
-
export declare const createTDTTerrainConfig: (token: string) => Cesium.ImageryProvider[];
|
|
18
|
+
export declare const createTDTTerrainConfig: (token: string, sk?: string) => Cesium.ImageryProvider[];
|
|
19
|
+
/**
|
|
20
|
+
* 天地图三维影像图层配置(带注记)
|
|
21
|
+
*/
|
|
22
|
+
export declare const createTDT3DImageryConfig: (token: string, sk?: string) => Cesium.ImageryProvider[];
|
|
23
|
+
/**
|
|
24
|
+
* 天地图三维地形提供者配置
|
|
25
|
+
*/
|
|
26
|
+
export declare const createTDT3DTerrainProvider: (token: string, sk?: string) => Cesium.TerrainProvider | null;
|
|
27
|
+
export declare const createTDT3DGeoWTFS: (token: string, viewer: Cesium.Viewer, sk?: string) => any | null;
|
|
16
28
|
/**
|
|
17
29
|
* 天地图图层类
|
|
18
|
-
*
|
|
30
|
+
* 支持矢量、影像、地形、三维地图四种类型的天地图图层
|
|
19
31
|
*/
|
|
20
32
|
export declare class TDTMapLayer extends MapLayer {
|
|
21
33
|
private config;
|
|
@@ -28,6 +40,10 @@ export declare class TDTMapLayer extends MapLayer {
|
|
|
28
40
|
/**
|
|
29
41
|
* 获取影像提供者数组
|
|
30
42
|
*/
|
|
43
|
+
/**
|
|
44
|
+
* 获取地图服务提供者数组
|
|
45
|
+
* @returns {Cesium.ImageryProvider[]} 返回符合配置的地图服务提供者数组
|
|
46
|
+
*/
|
|
31
47
|
protected getProviders(): Cesium.ImageryProvider[];
|
|
32
48
|
/**
|
|
33
49
|
* 添加图层到 Viewer
|
|
@@ -9,6 +9,7 @@ export { GaodeMapLayer } from './GaodeMapLayer';
|
|
|
9
9
|
export { BaiduMapLayer } from './BaiduMapLayer';
|
|
10
10
|
export { OSMMapLayer } from './OSMMapLayer';
|
|
11
11
|
export { CustomMapLayer } from './CustomMapLayer';
|
|
12
|
+
export { setTDTPlugin, createTDTImageryConfig, createTDTVectorConfig, createTDTTerrainConfig, createTDT3DImageryConfig, createTDT3DTerrainProvider, createTDT3DGeoWTFS, hasTDT3DExtension, } from './TDTMapLayer';
|
|
12
13
|
export { HeatmapLayer } from './HeatmapLayer';
|
|
13
14
|
export type { HeatPoint, HeatmapGradient, HeatmapOptions } from './HeatmapLayer';
|
|
14
15
|
export { PointClusterLayer } from './PointClusterLayer';
|
package/dist/core/types.d.ts
CHANGED
|
@@ -121,6 +121,8 @@ export interface MapType {
|
|
|
121
121
|
id: string;
|
|
122
122
|
name: string;
|
|
123
123
|
nameKey?: string;
|
|
124
|
+
/** 运行时依赖脚本列表,初始化时可按需加载 */
|
|
125
|
+
runtimeScripts?: string[];
|
|
124
126
|
/** 选中态左上角"路网"文案(可选,未配置时走 i18n 默认 key) */
|
|
125
127
|
placeNameLabel?: string;
|
|
126
128
|
/** 选中态左上角"路网"文案 i18n key(可选) */
|
|
@@ -187,6 +189,7 @@ export interface NoFlyZonePluginOptions {
|
|
|
187
189
|
* 地图提供商类型
|
|
188
190
|
*/
|
|
189
191
|
export type ProviderType = 'tdt' | 'gaode' | 'baidu' | 'arcgis' | 'osm' | 'custom';
|
|
192
|
+
export type TDTMapTypeId = 'vec' | 'img' | 'ter' | 'tdt3d';
|
|
190
193
|
/**
|
|
191
194
|
* 相机/视图配置
|
|
192
195
|
*/
|
|
@@ -204,10 +207,11 @@ export interface CameraConfig {
|
|
|
204
207
|
* 天地图图层配置
|
|
205
208
|
*/
|
|
206
209
|
export interface TDTLayerConfig {
|
|
207
|
-
/**
|
|
208
|
-
mapTypeId?:
|
|
210
|
+
/** 天地图子类型:矢量/影像/地形/三维地图 */
|
|
211
|
+
mapTypeId?: TDTMapTypeId;
|
|
209
212
|
/** 天地图 token */
|
|
210
213
|
token: string;
|
|
214
|
+
sk?: string;
|
|
211
215
|
/** 是否显示注记层,默认 true */
|
|
212
216
|
showLabel?: boolean;
|
|
213
217
|
}
|
|
@@ -219,6 +223,7 @@ export interface GaodeLayerConfig {
|
|
|
219
223
|
mapTypeId?: 'vector' | 'satellite' | 'terrain';
|
|
220
224
|
/** 高德 key */
|
|
221
225
|
token?: string;
|
|
226
|
+
sk?: string;
|
|
222
227
|
/** 是否显示注记层,默认 true */
|
|
223
228
|
showLabel?: boolean;
|
|
224
229
|
}
|
|
@@ -230,6 +235,7 @@ export interface BaiduLayerConfig {
|
|
|
230
235
|
mapTypeId?: 'normal' | 'satellite' | 'terrain';
|
|
231
236
|
/** 百度 ak */
|
|
232
237
|
token?: string;
|
|
238
|
+
sk?: string;
|
|
233
239
|
/** 是否显示注记层,默认 true */
|
|
234
240
|
showLabel?: boolean;
|
|
235
241
|
}
|
|
@@ -365,7 +371,7 @@ export interface MapToolsConfig {
|
|
|
365
371
|
/** @deprecated 使用 layers.type 代替 */
|
|
366
372
|
mapType?: 'tdt' | 'ion';
|
|
367
373
|
/** @deprecated 使用 layers.tdt.mapTypeId 代替 */
|
|
368
|
-
tdtMapTypeId?:
|
|
374
|
+
tdtMapTypeId?: TDTMapTypeId;
|
|
369
375
|
/** @deprecated 使用 layers.tdt.token 代替 */
|
|
370
376
|
token?: string;
|
|
371
377
|
}
|
package/dist/i18n/en-US.d.ts
CHANGED
package/dist/i18n/zh-CN.d.ts
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ export { BaseOverlay, Marker, Label, Icon, SVG, InfoWindow, Polyline, Polygon, R
|
|
|
10
10
|
export type { OverlayPosition, BaseOverlayOptions, OverlayClickHighlightOptions, OverlayHoverHighlightOptions, OverlayEntity, MarkerOptions, LabelOptions, IconOptions, SvgOptions, InfoWindowOptions, PolylineOptions, PolygonOptions, RectangleOptions, CircleOptions, RingOptions, } from './core/entities';
|
|
11
11
|
export { OverlayService, DrawService, ToolbarService, createToolbarService } from './core/services';
|
|
12
12
|
export type { OverlayServiceOptions, DrawMode, DrawOptions, DrawResult, DrawServiceOptions, MeasurementFillStyle, MeasurementLabelOffset, MeasurementStrokeStyle, MeasurementSummaryLabelStyle, MeasurementTheme, MeasurementVertexStyle, ToolbarServiceOptions, ToolbarCallbacks, } from './core/services';
|
|
13
|
-
export { HeatmapLayer, PointClusterLayer } from './core/layers';
|
|
13
|
+
export { HeatmapLayer, PointClusterLayer, setTDTPlugin, createTDTImageryConfig, createTDTVectorConfig, createTDTTerrainConfig, createTDT3DImageryConfig, createTDT3DTerrainProvider, createTDT3DGeoWTFS, hasTDT3DExtension, } from './core/layers';
|
|
14
14
|
export type { HeatPoint, HeatmapGradient, HeatmapOptions, ClusterPoint, ClusterStyleStep, PointClusterLayerOptions, } from './core/layers';
|
|
15
15
|
export { BaseComponent, Toolbar, ToolbarButton, SearchBox, } from './components';
|
|
16
16
|
export { styleManager, initStyleSystem, applyTheme, getCurrentTheme, getAvailableThemes, } from './styles';
|