| | |
| | | } |
| | | 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 |
| | |
| | | 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) { |
| | |
| | | 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); |