diff --git a/src/views/contentData/index.js b/src/views/contentData/index.js index fe49cb6..ae075eb 100644 --- a/src/views/contentData/index.js +++ b/src/views/contentData/index.js @@ -161,6 +161,13 @@ export function allDevices(options, type, show) { graphicLayer.addGraphic(graphic); } else { graphic.show = show; + graphic.setOptions({ + position: new mars3d.LngLatPoint( + deviceItem.lon, + deviceItem.lat, + 0 + ) + }); } }); } @@ -194,6 +201,9 @@ export function allDevices(options, type, show) { graphicLayer.addGraphic(graphic); } else { graphic.show = show; + graphic.setOptions({ + position: new mars3d.LngLatPoint(deviceItem.lon, deviceItem.lat, 0) + }); } }); }