Commit afbbdc4a authored by zhangzhaohui's avatar zhangzhaohui

标签高度修改

parent c3a1989d
......@@ -107,8 +107,9 @@ function drawCommunityMarker(arr) {
// 绘制小区标记
function drawHouseMarker(arr) {
arr.forEach((item) => {
let position = JSON.parse(item.solid);
console.log("position", position);
let position = cartesianToDegrees(JSON.parse(item.solid));
position = degreesToCartesian(position)
console.log(position)
drawLabel(position, item.name, "#003860", "blue_dw_icon", {
...item,
type: "house",
......@@ -144,13 +145,13 @@ function cartesianToDegrees(cartesian) {
let longitude = Cesium.Math.toDegrees(cartographic.longitude);
let latitude = Cesium.Math.toDegrees(cartographic.latitude);
return {
longitude,
latitude,
x: longitude,
y: latitude,
};
}
// cesium 经纬度转笛卡尔坐标
function degreesToCartesian(position) {
let cartesian3 = Cesium.Cartesian3.fromDegrees(position.x, position.y);
let cartesian3 = Cesium.Cartesian3.fromDegrees(position.x, position.y, 0);
return cartesian3;
}
// 镜头飞到某个位置
......
......@@ -27,6 +27,11 @@ export default defineConfig({
changeOrigin: true,
// rewrite: (path) => path.replace(/^\/prod-api/, ""),
},
"/wcjd": {
target: "http://10.35.66.214:8080/",
changeOrigin: true,
rewrite: (path) => path.replace(/^\/wcjd/, ""),
},
},
},
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