| | |
| | | that.closesDigTheEarth(); |
| | | }) |
| | | |
| | | $("#beginigTheEarth").click(()=>{ |
| | | that.beginDigTheEarth(); |
| | | $("#beginigTheEarth").click(() => { |
| | | that.beginDigTheEarth(); |
| | | |
| | | }) |
| | | }, |
| | |
| | | // roll: 6.2831853016686185 |
| | | // } |
| | | // }); |
| | | |
| | | |
| | | var tooltip = window.MYcreateTooltip(viewer._element); |
| | | // console.log(viewer._element, 534) |
| | | //绘制多边形 |
| | | var handlerPolygon = new Cesium.DrawHandler(viewer, Cesium.DrawMode.Polygon, 0); |
| | | handlerPolygon.activeEvt.addEventListener(function (isActive) { |
| | |
| | | } |
| | | }); |
| | | handlerPolygon.movingEvt.addEventListener(function (windowPosition) { |
| | | // console.log(windowPosition,534) |
| | | // console.log(handlerPolygon.isDrawing,555) |
| | | // console.log(viewer._element, 534) |
| | | if (windowPosition.x < 200 && windowPosition.y < 150) { |
| | | tooltip.setVisible(false); |
| | | return; |
| | |
| | | // } |
| | | // handlerPolygon.polygon.show = false; |
| | | // handlerPolygon.polyline.show = false; |
| | | |
| | | that.closesDigTheEarth(); |
| | | }; |
| | | |
| | |
| | | $('#toolbardigTheEarth').show(); |
| | | $('#loadingbar').remove(); |
| | | that.handlerPolygon = handlerPolygon; |
| | | that.tooltip = tooltip; |
| | | }, |
| | | handlerPolygon: '', |
| | | tooltip: '', |
| | | closesDigTheEarth: function () { |
| | | // console.log('gaunbi'); |
| | | var that = this; |
| | |
| | | that.handlerPolygon.polyline.show = false; |
| | | } |
| | | that.handlerPolygon.deactivate(); |
| | | |
| | | that.tooltip.setVisible(false); |
| | | }, |
| | | onOpen: function () { |
| | | |