From 7956ae1a560629a54cb17382ec5d5ad8771752f3 Mon Sep 17 00:00:00 2001
From: fuchengshen <men883234@gmail.com>
Date: 星期四, 28 七月 2022 16:30:54 +0800
Subject: [PATCH] 更改厂区模型
---
public/hn3d/example/00_hn_new.html | 34 +++++++++++++++++++---------------
1 files changed, 19 insertions(+), 15 deletions(-)
diff --git a/public/hn3d/example/00_hn_new.html b/public/hn3d/example/00_hn_new.html
index 6a47cbf..5e387ae 100644
--- a/public/hn3d/example/00_hn_new.html
+++ b/public/hn3d/example/00_hn_new.html
@@ -363,7 +363,7 @@
id: 1,
name: "鍗庤兘鍘傚尯",
type: "3dtiles",
- url: "../model/Huanengchangqu_0715/tileset.json",
+ url: "../model/Huanengchangqu_0728/tileset.json",
position: {
lng: 121.403176,
lat: 31.467125,
@@ -516,22 +516,26 @@
url: `${data_url}get_simu`,
success: function (data) {
console.log(data.data, "simu")
- simu = new mars3d.graphic.ModelEntity({
+ for (let i = 0; i < data.data.length; i++) {
- position: [121.406729, 31.467183, 50], // 妤兼爧浣嶇疆
+ simu = new mars3d.graphic.ModelEntity({
- style: {
- // url: "http://112.74.77.127:9100/hn/doulunji/dabi/doulunji_dabi.gltf",
- url: "../model/simu_0322/simu_0322.gltf",
- scale: 0.005,
- color: "#ff0000",
- fill: true
- },
- // 寮瑰嚭妗嗕腑鎵撳紑浠诲姟涓嬪彂琛ㄥ崟
- popup: "<br/><p><a href='#' onclick='javascript:showHistoryPathDetail(" + "12345" + ")' >閰嶇疆浠诲姟</a></p>",
- allowDrillPick: false,
- })
- simu_layer.addGraphic(simu)
+ position: [data.data[i].longitude, data.data[i].latitude, 50], // 妤兼爧浣嶇疆
+
+ style: {
+ // url: "http://112.74.77.127:9100/hn/doulunji/dabi/doulunji_dabi.gltf",
+ url: "../model/simu_0322/simu_0322.gltf",
+ scale: 0.005,
+ color: "#ff0000",
+ fill: true
+ },
+ // 寮瑰嚭妗嗕腑鎵撳紑浠诲姟涓嬪彂琛ㄥ崟
+ popup: "<br/><p><a href='#' onclick='javascript:showHistoryPathDetail(" + data.data[i].logic_id + ")' >閰嶇疆浠诲姟</a></p>",
+ allowDrillPick: false,
+ })
+ simu_layer.addGraphic(simu)
+ }
+
},
error: function (request, textStatus) {
--
Gitblit v1.9.1