Commit afbbdc4a authored by zhangzhaohui's avatar zhangzhaohui

标签高度修改

parent c3a1989d
...@@ -107,8 +107,9 @@ function drawCommunityMarker(arr) { ...@@ -107,8 +107,9 @@ function drawCommunityMarker(arr) {
// 绘制小区标记 // 绘制小区标记
function drawHouseMarker(arr) { function drawHouseMarker(arr) {
arr.forEach((item) => { arr.forEach((item) => {
let position = JSON.parse(item.solid); let position = cartesianToDegrees(JSON.parse(item.solid));
console.log("position", position); position = degreesToCartesian(position)
console.log(position)
drawLabel(position, item.name, "#003860", "blue_dw_icon", { drawLabel(position, item.name, "#003860", "blue_dw_icon", {
...item, ...item,
type: "house", type: "house",
...@@ -144,13 +145,13 @@ function cartesianToDegrees(cartesian) { ...@@ -144,13 +145,13 @@ function cartesianToDegrees(cartesian) {
let longitude = Cesium.Math.toDegrees(cartographic.longitude); let longitude = Cesium.Math.toDegrees(cartographic.longitude);
let latitude = Cesium.Math.toDegrees(cartographic.latitude); let latitude = Cesium.Math.toDegrees(cartographic.latitude);
return { return {
longitude, x: longitude,
latitude, y: latitude,
}; };
} }
// cesium 经纬度转笛卡尔坐标 // cesium 经纬度转笛卡尔坐标
function degreesToCartesian(position) { function degreesToCartesian(position) {
let cartesian3 = Cesium.Cartesian3.fromDegrees(position.x, position.y); let cartesian3 = Cesium.Cartesian3.fromDegrees(position.x, position.y, 0);
return cartesian3; return cartesian3;
} }
// 镜头飞到某个位置 // 镜头飞到某个位置
......
...@@ -27,6 +27,11 @@ export default defineConfig({ ...@@ -27,6 +27,11 @@ export default defineConfig({
changeOrigin: true, changeOrigin: true,
// rewrite: (path) => path.replace(/^\/prod-api/, ""), // rewrite: (path) => path.replace(/^\/prod-api/, ""),
}, },
"/wcjd": {
target: "http://10.35.66.214:8080/",
changeOrigin: true,
rewrite: (path) => path.replace(/^\/wcjd/, ""),
},
}, },
}, },
resolve: { resolve: {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment