无人机管理后台前端(已迁走)
shuishen
2025-04-12 fd32c591a88af974de4657b305384b5a6e139382
坐标转换处理
1 files modified
9 ■■■■■ changed files
src/components/map-container/mapContainer.vue 9 ●●●●● patch | view | raw | blame | history
src/components/map-container/mapContainer.vue
@@ -41,10 +41,13 @@
    ([ready, detail]) => {
        if (ready && detail?.location) {
            const [lng, lat] = detail.location
            if (!lng || !lat) return
            let [newLng, newLat] = DC.CoordTransform.GCJ02ToWGS84(lng, lat)
            window.$viewer?.zoomToPosition(new DC.Position(
                lng,
                lat,
                newLng,
                newLat,
                1000,
                0,
                -90,
@@ -52,7 +55,7 @@
            ), () => {
            })
            let point = new DC.Point(new DC.Position(lng, lat))
            let point = new DC.Point(new DC.Position(newLng, newLat))
            pointLayer.addOverlay(point)
        }
    },