huweili-cesium 1.2.36 → 1.2.38
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.
|
@@ -131,7 +131,7 @@ function cropCanvasToBase64(map, bbox, padding = 48) {
|
|
|
131
131
|
* @param {import('cesium').Viewer} map Cesium Viewer
|
|
132
132
|
* @param {Array<{ lng: number, lat: number, height?: number }>} positions 围栏顶点(drawFence onFinish 的 result.positions)
|
|
133
133
|
* @param {Object} [options]
|
|
134
|
-
* @param {boolean} [options.flyTo=
|
|
134
|
+
* @param {boolean} [options.flyTo=false] 截图前是否飞行定位到围栏
|
|
135
135
|
* @param {number} [options.padding=48] 裁剪边距(像素)
|
|
136
136
|
* @param {number} [options.flyDuration=0.6] 飞行动画时长(秒)
|
|
137
137
|
* @param {boolean} [options.printBase64=true] 是否在控制台打印 base64
|
|
@@ -150,7 +150,7 @@ export async function captureFenceScreenshot(map, positions, options = {}) {
|
|
|
150
150
|
const padding = options.padding ?? 48
|
|
151
151
|
const printBase64 = options.printBase64 !== false
|
|
152
152
|
|
|
153
|
-
if (options.flyTo
|
|
153
|
+
if (options.flyTo === true) {
|
|
154
154
|
await flyCameraToFence(map, positions, options)
|
|
155
155
|
}
|
|
156
156
|
|