@movk/maplibre 1.0.0 → 1.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/README.en.md +2 -2
- package/README.md +2 -2
- package/dist/module.d.mts +7 -0
- package/dist/module.d.ts +7 -0
- package/dist/module.json +1 -1
- package/dist/module.mjs +25 -11
- package/dist/runtime/components/CustomLayer.d.vue.ts +1 -1
- package/dist/runtime/components/CustomLayer.vue +18 -4
- package/dist/runtime/components/CustomLayer.vue.d.ts +1 -1
- package/dist/runtime/components/Layer.d.vue.ts +4 -4
- package/dist/runtime/components/Layer.vue +43 -18
- package/dist/runtime/components/Layer.vue.d.ts +4 -4
- package/dist/runtime/components/LayerGroup.d.vue.ts +23 -10
- package/dist/runtime/components/LayerGroup.vue +44 -4
- package/dist/runtime/components/LayerGroup.vue.d.ts +23 -10
- package/dist/runtime/components/LottieMarker.d.vue.ts +3 -3
- package/dist/runtime/components/LottieMarker.vue +6 -2
- package/dist/runtime/components/LottieMarker.vue.d.ts +3 -3
- package/dist/runtime/components/Map.d.vue.ts +2 -1
- package/dist/runtime/components/Map.vue +2 -6
- package/dist/runtime/components/Map.vue.d.ts +2 -1
- package/dist/runtime/components/Marker.d.vue.ts +2 -1
- package/dist/runtime/components/Marker.vue +33 -9
- package/dist/runtime/components/Marker.vue.d.ts +2 -1
- package/dist/runtime/components/Popup.d.vue.ts +1 -1
- package/dist/runtime/components/Popup.vue +23 -4
- package/dist/runtime/components/Popup.vue.d.ts +1 -1
- package/dist/runtime/components/Source.d.vue.ts +2 -2
- package/dist/runtime/components/Source.vue +3 -15
- package/dist/runtime/components/Source.vue.d.ts +2 -2
- package/dist/runtime/components/Tooltip.d.vue.ts +2 -2
- package/dist/runtime/components/Tooltip.vue +47 -19
- package/dist/runtime/components/Tooltip.vue.d.ts +2 -2
- package/dist/runtime/components/buffers/BufferCircle.d.vue.ts +1 -1
- package/dist/runtime/components/buffers/BufferCircle.vue.d.ts +1 -1
- package/dist/runtime/components/buffers/BufferEllipse.d.vue.ts +1 -1
- package/dist/runtime/components/buffers/BufferEllipse.vue.d.ts +1 -1
- package/dist/runtime/components/buffers/BufferLine.d.vue.ts +1 -1
- package/dist/runtime/components/buffers/BufferLine.vue.d.ts +1 -1
- package/dist/runtime/components/buffers/BufferPolygon.d.vue.ts +1 -1
- package/dist/runtime/components/buffers/BufferPolygon.vue.d.ts +1 -1
- package/dist/runtime/components/buffers/BufferSector.d.vue.ts +1 -1
- package/dist/runtime/components/buffers/BufferSector.vue.d.ts +1 -1
- package/dist/runtime/components/controls/BasemapControl.d.vue.ts +35 -0
- package/dist/runtime/components/controls/BasemapControl.vue +60 -0
- package/dist/runtime/components/controls/BasemapControl.vue.d.ts +35 -0
- package/dist/runtime/components/controls/Control.d.vue.ts +51 -0
- package/dist/runtime/components/controls/Control.vue +95 -0
- package/dist/runtime/components/controls/Control.vue.d.ts +51 -0
- package/dist/runtime/components/controls/GlobeControl.d.vue.ts +18 -0
- package/dist/runtime/components/controls/GlobeControl.vue +15 -0
- package/dist/runtime/components/controls/GlobeControl.vue.d.ts +18 -0
- package/dist/runtime/components/controls/LayerControl.d.vue.ts +44 -0
- package/dist/runtime/components/controls/LayerControl.vue +63 -0
- package/dist/runtime/components/controls/LayerControl.vue.d.ts +44 -0
- package/dist/runtime/components/controls/Legend.d.vue.ts +47 -0
- package/dist/runtime/components/controls/Legend.vue +69 -0
- package/dist/runtime/components/controls/Legend.vue.d.ts +47 -0
- package/dist/runtime/components/controls/Minimap.d.vue.ts +45 -0
- package/dist/runtime/components/controls/Minimap.vue +31 -0
- package/dist/runtime/components/controls/Minimap.vue.d.ts +45 -0
- package/dist/runtime/components/effects/AnimatedImage.d.vue.ts +1 -1
- package/dist/runtime/components/effects/AnimatedImage.vue +9 -6
- package/dist/runtime/components/effects/AnimatedImage.vue.d.ts +1 -1
- package/dist/runtime/components/effects/DiffusionCircle.d.vue.ts +1 -1
- package/dist/runtime/components/effects/DiffusionCircle.vue.d.ts +1 -1
- package/dist/runtime/components/effects/FlowBuilding.d.vue.ts +1 -1
- package/dist/runtime/components/effects/FlowBuilding.vue.d.ts +1 -1
- package/dist/runtime/components/effects/GlowCircle.d.vue.ts +1 -1
- package/dist/runtime/components/effects/GlowCircle.vue.d.ts +1 -1
- package/dist/runtime/components/effects/GradientBuilding.d.vue.ts +1 -1
- package/dist/runtime/components/effects/GradientBuilding.vue.d.ts +1 -1
- package/dist/runtime/components/effects/Migration.d.vue.ts +1 -1
- package/dist/runtime/components/effects/Migration.vue.d.ts +1 -1
- package/dist/runtime/components/effects/Radar.d.vue.ts +1 -1
- package/dist/runtime/components/effects/Radar.vue.d.ts +1 -1
- package/dist/runtime/components/effects/SpriteImage.d.vue.ts +1 -1
- package/dist/runtime/components/effects/SpriteImage.vue +40 -24
- package/dist/runtime/components/effects/SpriteImage.vue.d.ts +1 -1
- package/dist/runtime/components/effects/TextureBuilding.d.vue.ts +1 -1
- package/dist/runtime/components/effects/TextureBuilding.vue +1 -1
- package/dist/runtime/components/effects/TextureBuilding.vue.d.ts +1 -1
- package/dist/runtime/components/effects/Trail.d.vue.ts +1 -1
- package/dist/runtime/components/effects/Trail.vue.d.ts +1 -1
- package/dist/runtime/components/effects/WaveCircle.d.vue.ts +1 -1
- package/dist/runtime/components/effects/WaveCircle.vue.d.ts +1 -1
- package/dist/runtime/components/effects/WindowBuilding.d.vue.ts +1 -1
- package/dist/runtime/components/effects/WindowBuilding.vue.d.ts +1 -1
- package/dist/runtime/components/environment/Projection.d.vue.ts +28 -0
- package/dist/runtime/components/environment/Projection.vue +27 -0
- package/dist/runtime/components/environment/Projection.vue.d.ts +28 -0
- package/dist/runtime/components/environment/Temperature.d.vue.ts +1 -1
- package/dist/runtime/components/environment/Temperature.vue.d.ts +1 -1
- package/dist/runtime/components/environment/Terrain.d.vue.ts +1 -1
- package/dist/runtime/components/environment/Terrain.vue +5 -0
- package/dist/runtime/components/environment/Terrain.vue.d.ts +1 -1
- package/dist/runtime/components/extensions/DrawControl.vue +23 -19
- package/dist/runtime/components/extensions/Swipe.d.vue.ts +48 -0
- package/dist/runtime/components/extensions/Swipe.vue +141 -0
- package/dist/runtime/components/extensions/Swipe.vue.d.ts +48 -0
- package/dist/runtime/components/layers/BuildingLayer.d.vue.ts +1 -1
- package/dist/runtime/components/layers/BuildingLayer.vue.d.ts +1 -1
- package/dist/runtime/components/layers/ClusterLayer.d.vue.ts +1 -1
- package/dist/runtime/components/layers/ClusterLayer.vue.d.ts +1 -1
- package/dist/runtime/components/layers/ContourLayer.d.vue.ts +59 -0
- package/dist/runtime/components/layers/ContourLayer.vue +84 -0
- package/dist/runtime/components/layers/ContourLayer.vue.d.ts +59 -0
- package/dist/runtime/components/layers/GraticuleLayer.d.vue.ts +31 -0
- package/dist/runtime/components/layers/GraticuleLayer.vue +88 -0
- package/dist/runtime/components/layers/GraticuleLayer.vue.d.ts +31 -0
- package/dist/runtime/components/layers/ImageLayer.d.vue.ts +1 -1
- package/dist/runtime/components/layers/ImageLayer.vue.d.ts +1 -1
- package/dist/runtime/components/layers/MaskLayer.d.vue.ts +44 -0
- package/dist/runtime/components/layers/MaskLayer.vue +32 -0
- package/dist/runtime/components/layers/MaskLayer.vue.d.ts +44 -0
- package/dist/runtime/components/layers/RasterLayer.d.vue.ts +5 -3
- package/dist/runtime/components/layers/RasterLayer.vue +9 -2
- package/dist/runtime/components/layers/RasterLayer.vue.d.ts +5 -3
- package/dist/runtime/components/layers/VideoLayer.d.vue.ts +1 -1
- package/dist/runtime/components/layers/VideoLayer.vue.d.ts +1 -1
- package/dist/runtime/composables/useFeatureState.js +27 -5
- package/dist/runtime/composables/useFrameIcon.d.ts +4 -3
- package/dist/runtime/composables/useFrameIcon.js +18 -8
- package/dist/runtime/composables/useLayerTree.d.ts +11 -0
- package/dist/runtime/composables/useLayerTree.js +12 -0
- package/dist/runtime/composables/useMapAnimation.d.ts +4 -2
- package/dist/runtime/composables/useMapAnimation.js +5 -4
- package/dist/runtime/composables/useMapExport.js +2 -5
- package/dist/runtime/composables/useMapSync.d.ts +16 -0
- package/dist/runtime/composables/useMapSync.js +42 -0
- package/dist/runtime/composables/useMaplibreCamera.d.ts +1 -1
- package/dist/runtime/composables/useMaplibreCamera.js +1 -1
- package/dist/runtime/composables/useMaplibreImage.d.ts +3 -3
- package/dist/runtime/composables/useMaplibreImage.js +26 -5
- package/dist/runtime/domains/map/config.js +2 -3
- package/dist/runtime/domains/map/context.js +15 -0
- package/dist/runtime/domains/map/control.d.ts +1 -1
- package/dist/runtime/domains/map/control.js +1 -1
- package/dist/runtime/domains/map/draw-modes.d.ts +9 -0
- package/dist/runtime/domains/map/draw-modes.js +53 -0
- package/dist/runtime/domains/map/draw-registry.d.ts +2 -3
- package/dist/runtime/domains/map/draw-registry.js +6 -9
- package/dist/runtime/domains/map/draw-theme.d.ts +12 -0
- package/dist/runtime/domains/map/draw-toolbar.js +11 -10
- package/dist/runtime/domains/map/layer-group.d.ts +15 -4
- package/dist/runtime/domains/map/layer-tree.d.ts +3 -0
- package/dist/runtime/domains/map/layer-tree.js +10 -0
- package/dist/runtime/domains/map/minimap.d.ts +18 -0
- package/dist/runtime/domains/map/minimap.js +86 -0
- package/dist/runtime/domains/map/registry.js +4 -3
- package/dist/runtime/domains/map/style-layers.d.ts +7 -0
- package/dist/runtime/domains/map/style-layers.js +54 -0
- package/dist/runtime/domains/map/style.d.ts +3 -0
- package/dist/runtime/domains/map/style.js +5 -0
- package/dist/runtime/domains/map/swipe.d.ts +9 -0
- package/dist/runtime/domains/map/swipe.js +62 -0
- package/dist/runtime/index.css +1 -1
- package/dist/runtime/types/draw.d.ts +34 -1
- package/dist/runtime/types/index.d.ts +1 -0
- package/dist/runtime/types/layer.d.ts +40 -0
- package/dist/runtime/types/layer.js +0 -0
- package/dist/runtime/types/map.d.ts +6 -0
- package/dist/runtime/utils/cog.d.ts +2 -0
- package/dist/runtime/utils/cog.js +9 -0
- package/dist/runtime/utils/effects.js +2 -1
- package/dist/runtime/utils/events.d.ts +6 -0
- package/dist/runtime/utils/events.js +25 -0
- package/dist/runtime/utils/frame-icon.d.ts +2 -5
- package/dist/runtime/utils/frame-icon.js +10 -4
- package/dist/runtime/utils/graticule.d.ts +19 -0
- package/dist/runtime/utils/graticule.js +62 -0
- package/dist/runtime/utils/layer-opacity.d.ts +7 -0
- package/dist/runtime/utils/layer-opacity.js +59 -0
- package/dist/runtime/utils/layer.js +2 -1
- package/dist/runtime/utils/legend.d.ts +9 -0
- package/dist/runtime/utils/legend.js +52 -0
- package/dist/runtime/utils/marker.d.ts +11 -0
- package/dist/runtime/utils/marker.js +28 -0
- package/dist/runtime/utils/mask.d.ts +8 -0
- package/dist/runtime/utils/mask.js +33 -0
- package/dist/runtime/utils/minimap.d.ts +6 -0
- package/dist/runtime/utils/minimap.js +15 -0
- package/dist/runtime/utils/pmtiles.d.ts +3 -0
- package/dist/runtime/utils/pmtiles.js +10 -0
- package/dist/runtime/utils/source.d.ts +7 -0
- package/dist/runtime/utils/source.js +35 -0
- package/dist/runtime/utils/swipe.d.ts +32 -0
- package/dist/runtime/utils/swipe.js +18 -0
- package/dist/runtime/utils/tianditu.d.ts +10 -1
- package/dist/runtime/utils/tianditu.js +11 -0
- package/dist/unplugin.d.mts +1 -1
- package/dist/unplugin.d.ts +1 -1
- package/dist/unplugin.mjs +1 -7
- package/package.json +20 -12
- package/dist/runtime/draw-modes/index.d.ts +0 -16
- package/dist/runtime/draw-modes/index.js +0 -32
- package/dist/runtime/utils/draw-theme.d.ts +0 -47
- /package/dist/runtime/{utils → domains/map}/draw-theme.js +0 -0
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@movk/maplibre",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.
|
|
5
|
-
"packageManager": "pnpm@12.
|
|
4
|
+
"version": "1.1.0",
|
|
5
|
+
"packageManager": "pnpm@12.6.0",
|
|
6
6
|
"description": "声明式 MapLibre GL 封装库:MaplibreMap/Source/Layer 等组件与 composables,原生支持 Nuxt 4 模块,并通过 Vite 插件在纯 Vue + Vite 项目中可用。无需 access token,内置 3D 建筑、雷达/扩散/辉光等动态效果,sky/terrain 环境,绘制(terra-draw)、天地图、WMS/WMTS 与多坐标系本土化支持。",
|
|
7
7
|
"author": "YiXuan <mhaibaraai@gmail.com>",
|
|
8
8
|
"license": "MIT",
|
|
@@ -49,10 +49,6 @@
|
|
|
49
49
|
"types": "./dist/vue-plugin.d.mts",
|
|
50
50
|
"import": "./dist/vue-plugin.mjs"
|
|
51
51
|
},
|
|
52
|
-
"./draw-modes": {
|
|
53
|
-
"types": "./dist/runtime/draw-modes/index.d.ts",
|
|
54
|
-
"import": "./dist/runtime/draw-modes/index.js"
|
|
55
|
-
},
|
|
56
52
|
"./index.css": "./dist/runtime/index.css",
|
|
57
53
|
"./runtime/*": "./dist/runtime/*",
|
|
58
54
|
"./components/*": "./dist/runtime/components/*",
|
|
@@ -75,9 +71,6 @@
|
|
|
75
71
|
"vue-plugin": [
|
|
76
72
|
"./dist/vue-plugin.d.mts"
|
|
77
73
|
],
|
|
78
|
-
"draw-modes": [
|
|
79
|
-
"./dist/runtime/draw-modes/index.d.ts"
|
|
80
|
-
],
|
|
81
74
|
"runtime/*": [
|
|
82
75
|
"./dist/runtime/*"
|
|
83
76
|
],
|
|
@@ -95,16 +88,28 @@
|
|
|
95
88
|
"dist"
|
|
96
89
|
],
|
|
97
90
|
"peerDependencies": {
|
|
91
|
+
"@geomatico/maplibre-cog-protocol": ">=0.10.0",
|
|
98
92
|
"lottie-web": ">=5.0.0",
|
|
93
|
+
"maplibre-contour": ">=0.1.0",
|
|
99
94
|
"maplibre-gl": ">=6.0.0",
|
|
95
|
+
"pmtiles": ">=4.0.0",
|
|
100
96
|
"terra-draw": ">=1.0.0",
|
|
101
97
|
"terra-draw-maplibre-gl-adapter": ">=1.0.0",
|
|
102
98
|
"vue": ">=3.5.0"
|
|
103
99
|
},
|
|
104
100
|
"peerDependenciesMeta": {
|
|
101
|
+
"@geomatico/maplibre-cog-protocol": {
|
|
102
|
+
"optional": true
|
|
103
|
+
},
|
|
105
104
|
"lottie-web": {
|
|
106
105
|
"optional": true
|
|
107
106
|
},
|
|
107
|
+
"maplibre-contour": {
|
|
108
|
+
"optional": true
|
|
109
|
+
},
|
|
110
|
+
"pmtiles": {
|
|
111
|
+
"optional": true
|
|
112
|
+
},
|
|
108
113
|
"terra-draw": {
|
|
109
114
|
"optional": true
|
|
110
115
|
},
|
|
@@ -131,7 +136,7 @@
|
|
|
131
136
|
},
|
|
132
137
|
"dependencies": {
|
|
133
138
|
"@maplibre/maplibre-gl-style-spec": "^26.4.4",
|
|
134
|
-
"@movk/core": "^1.
|
|
139
|
+
"@movk/core": "^1.5.0",
|
|
135
140
|
"@turf/area": "^7.4.0",
|
|
136
141
|
"@turf/bearing": "^7.4.0",
|
|
137
142
|
"@turf/buffer": "^7.4.0",
|
|
@@ -148,6 +153,7 @@
|
|
|
148
153
|
"unplugin-vue-components": "^32.1.0"
|
|
149
154
|
},
|
|
150
155
|
"devDependencies": {
|
|
156
|
+
"@geomatico/maplibre-cog-protocol": "^0.10.0",
|
|
151
157
|
"@nuxt/eslint-config": "^1.17.0",
|
|
152
158
|
"@nuxt/kit": "^4.5.2",
|
|
153
159
|
"@nuxt/module-builder": "^1.0.3",
|
|
@@ -159,15 +165,17 @@
|
|
|
159
165
|
"eslint": "^10.11.0",
|
|
160
166
|
"happy-dom": "^20.14.5",
|
|
161
167
|
"lottie-web": "^5.13.0",
|
|
162
|
-
"maplibre-
|
|
168
|
+
"maplibre-contour": "^0.1.1",
|
|
169
|
+
"maplibre-gl": "^6.11.2",
|
|
163
170
|
"nuxt": "^4.5.2",
|
|
171
|
+
"pmtiles": "^4.5.0",
|
|
164
172
|
"release-it": "^21.1.0",
|
|
165
173
|
"terra-draw": "^1.35.0",
|
|
166
174
|
"terra-draw-maplibre-gl-adapter": "^1.4.1",
|
|
167
175
|
"typescript": "^6.0.3",
|
|
168
176
|
"unbuild": "^3.6.1",
|
|
169
177
|
"unplugin": "^3.4.0",
|
|
170
|
-
"vitest": "^5.0.
|
|
178
|
+
"vitest": "^5.0.2",
|
|
171
179
|
"vue": "^3.5.43",
|
|
172
180
|
"vue-tsc": "^3.3.11"
|
|
173
181
|
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { TerraDrawExtend } from 'terra-draw';
|
|
2
|
-
import type { DrawThemeOptions } from '../utils/draw-theme';
|
|
3
|
-
/** 内置绘制模式名(不含选择模式 'select') */
|
|
4
|
-
export declare const DRAW_MODE_NAMES: readonly ["point", "linestring", "polygon", "rectangle", "circle", "ellipse", "sector"];
|
|
5
|
-
export type DrawModeName = (typeof DRAW_MODE_NAMES)[number];
|
|
6
|
-
/** terra-draw 模式实例(绘制或选择模式) */
|
|
7
|
-
export type DrawMode = TerraDrawExtend.TerraDrawBaseDrawMode<TerraDrawExtend.CustomStyling>;
|
|
8
|
-
export interface MovkDrawModesOptions {
|
|
9
|
-
/** 绘制主题,参见 drawThemeStyles */
|
|
10
|
-
theme?: DrawThemeOptions;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* 预设 terra-draw 模式集合:选择模式 + 全部内置绘制模式,统一应用主题。
|
|
14
|
-
* 每次调用返回新实例,模式实例不可在多个 TerraDraw 间共享。
|
|
15
|
-
*/
|
|
16
|
-
export declare function movkDrawModes(options?: MovkDrawModesOptions): DrawMode[];
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
TerraDrawCircleMode,
|
|
3
|
-
TerraDrawEllipseMode,
|
|
4
|
-
TerraDrawLineStringMode,
|
|
5
|
-
TerraDrawPointMode,
|
|
6
|
-
TerraDrawPolygonMode,
|
|
7
|
-
TerraDrawRectangleMode,
|
|
8
|
-
TerraDrawSectorMode,
|
|
9
|
-
TerraDrawSelectMode
|
|
10
|
-
} from "terra-draw";
|
|
11
|
-
import { drawThemeStyles } from "../utils/draw-theme.js";
|
|
12
|
-
export const DRAW_MODE_NAMES = ["point", "linestring", "polygon", "rectangle", "circle", "ellipse", "sector"];
|
|
13
|
-
const EDITABLE_COORDINATES = { draggable: true, deletable: true, midpoints: true };
|
|
14
|
-
export function movkDrawModes(options = {}) {
|
|
15
|
-
const styles = drawThemeStyles(options.theme);
|
|
16
|
-
const flags = Object.fromEntries(DRAW_MODE_NAMES.map((name) => [name, {
|
|
17
|
-
feature: {
|
|
18
|
-
draggable: true,
|
|
19
|
-
...name === "linestring" || name === "polygon" ? { coordinates: EDITABLE_COORDINATES } : {}
|
|
20
|
-
}
|
|
21
|
-
}]));
|
|
22
|
-
return [
|
|
23
|
-
new TerraDrawSelectMode({ flags, styles: styles.select }),
|
|
24
|
-
new TerraDrawPointMode({ styles: styles.point }),
|
|
25
|
-
new TerraDrawLineStringMode({ styles: styles.linestring }),
|
|
26
|
-
new TerraDrawPolygonMode({ styles: styles.polygon }),
|
|
27
|
-
new TerraDrawRectangleMode({ styles: styles.rectangle }),
|
|
28
|
-
new TerraDrawCircleMode({ styles: styles.circle }),
|
|
29
|
-
new TerraDrawEllipseMode({ styles: styles.ellipse }),
|
|
30
|
-
new TerraDrawSectorMode({ styles: styles.sector })
|
|
31
|
-
];
|
|
32
|
-
}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import type { GeoJSONStoreFeatures, HexColor } from 'terra-draw';
|
|
2
|
-
export interface DrawThemeOptions {
|
|
3
|
-
/**
|
|
4
|
-
* 非激活态主色
|
|
5
|
-
* @defaultValue '#3b82f6'
|
|
6
|
-
*/
|
|
7
|
-
color?: HexColor;
|
|
8
|
-
/**
|
|
9
|
-
* 激活态(绘制辅助点/选中)主色
|
|
10
|
-
* @defaultValue '#f59e0b'
|
|
11
|
-
*/
|
|
12
|
-
activeColor?: HexColor;
|
|
13
|
-
/**
|
|
14
|
-
* 多边形填充不透明度
|
|
15
|
-
* @defaultValue 0.1
|
|
16
|
-
*/
|
|
17
|
-
fillOpacity?: number;
|
|
18
|
-
/**
|
|
19
|
-
* 线宽
|
|
20
|
-
* @defaultValue 2
|
|
21
|
-
*/
|
|
22
|
-
lineWidth?: number;
|
|
23
|
-
/**
|
|
24
|
-
* 顶点圆半径
|
|
25
|
-
* @defaultValue 5
|
|
26
|
-
*/
|
|
27
|
-
vertexRadius?: number;
|
|
28
|
-
}
|
|
29
|
-
type ColorStyle = (feature: GeoJSONStoreFeatures) => HexColor;
|
|
30
|
-
type ModeStyles = Record<string, number | HexColor | ColorStyle>;
|
|
31
|
-
/** 各模式的 terra-draw styles,键为模式名 */
|
|
32
|
-
export interface DrawThemeStyles {
|
|
33
|
-
select: Record<string, number | HexColor>;
|
|
34
|
-
point: ModeStyles;
|
|
35
|
-
linestring: ModeStyles;
|
|
36
|
-
polygon: ModeStyles;
|
|
37
|
-
rectangle: ModeStyles;
|
|
38
|
-
circle: ModeStyles;
|
|
39
|
-
ellipse: ModeStyles;
|
|
40
|
-
sector: ModeStyles;
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* 生成 terra-draw 各模式的主题样式。
|
|
44
|
-
* 要素 `properties.color` 优先于主题色,便于按要素单独着色(配合 setFeatureProperty)。
|
|
45
|
-
*/
|
|
46
|
-
export declare function drawThemeStyles(options?: DrawThemeOptions): DrawThemeStyles;
|
|
47
|
-
export {};
|
|
File without changes
|