北京经济技术开发区经开区虚拟城市项目-【前端】-移动端Web
少年
2024-01-20 bcb686607ddff77f83b5e6d597f483b3d49e596e
src/utils/map.js
@@ -615,6 +615,10 @@
            }
            let nPickFeature = sgworld.Viewer.scene.pick(event.position);
            console.log(nPickFeature);
            if (nPickFeature == undefined) {
                window.flyPoint && Viewer.entities.remove(window.flyPoint);
                window.flyPoint = undefined;
            }
            // console.log(event.position);//屏幕位置
            if (!nPickFeature || !nPickFeature.id) {
                return
@@ -661,7 +665,7 @@
                nPickFeature.primitive.image =
                    window.SmartEarthRootUrl + "Workers/image/point.png";
                //点击弹框(部件、企业、监控)
                if (nPickFeature.id.tag) {
                if (nPickFeature.id.tag || nPickFeature.id.show) {
                    let properties = nPickFeature.id.properties;
                    let propertyNames = nPickFeature.id.properties.propertyNames;
                    if (propertyNames.indexOf("监控名") !== -1) {
@@ -740,6 +744,13 @@
                            lon: lon,
                            lat: lat,
                        }
                    } else if (propertyNames.includes("id")) {
                        objdata = {
                            POITYPE: "POINT",
                            name: properties["_name"]._value,
                            lat: properties["_lat"]._value,
                            lon: properties["_lng"]._value,
                        }
                    }
                    divPoint3 && divPoint3.deleteObject();
                    store.setPoplayerShowAction(false);