• SkylineGlobe 如何实现绘制圆形Polygon和对图层的圆形范围选择查询


    //结束绘制圆形之前,得到Polygon
                 var pos = gPolyObj.Position;
                 var bufferR = gPolyObj.Radius;
                 var cVerticesArray = [-122.415025, 37.76059, 10, ];
                 var point = sgworld.Creator.GeometryCreator.CreatePointGeometry(cVerticesArray);
                 point.X = pos.X;
                 point.Y = pos.Y;
                 point.Z = pos.Altitude;
                 var newGeo = point.SpatialOperator.buffer(bufferR);
    ExecuteSpatialQuery(null, newGeo);
    function ExecuteSpatialQuery(pLayer, pGeo) {
                 var sgworld = CreateSGObj();
                 var htmlStr = "";
                 var layerItemId = sgworld.ProjectTree.FindItem("Building");
                 if (layerItemId != sgworld.ProjectTree.RootID) {
                     var pipeLayer = sgworld.ProjectTree.GetObject(layerItemId);
                     if (pipeLayer.ObjectType == 36) { // OT_FEATURE_LAYER = 36  // OT_3D_MESH_FEATURE_LAYER = 39
                         var statisticsedLayer = pipeLayer.ExecuteSpatialQuery(pGeo, 1);
    
                         //alert(statisticsedLayer.Count);
                         sgworld.Command.Execute(1086,0);
                         htmlStr = "<html><head><title></title>";
                         htmlStr += "<style>table{border-right:1px solid #ED7D31;border-bottom:1px solid #ED7D31}table td{border-left:1px solid #ED7D31;border-top:1px solid #ED7D31}</style>";
                         htmlStr += "</head><body style='100%;height:100%;  margin:2px; padding:2px;'><table style='100%; text-align:center;font-size:12px;' border='0' cellspacing='0' cellpadding='0'><tr style='background-color:#ED7D31'>";
                         // var firstFeature = statisticsedLayer(0);
                         htmlStr += "<td>";
                         htmlStr += "选取设备数量";
                         htmlStr += "</td>";
                         htmlStr += "<td>";
                         htmlStr += "&nbsp;&nbsp;&nbsp;&nbsp;" + statisticsedLayer.Count;
                         htmlStr += "</td>";
                         htmlStr += "</tr>";
                         htmlStr += "</table></body></html>";
                         if (htmlStr != "") {
                             var ScreenRectHeight = sgworld.Window.Rect.Height;
                             var ScreenRectWidth = sgworld.Window.Rect.Width;
                             var areaPopup = sgworld.Creator.CreatePopupMessage("检修计划表", "", 231, 150, 231, 120);
                             areaPopup.InnerText = htmlStr;
                             areaPopup.Flags = 512;
                             areaPopup.AllowResize = true;
                             areaPopup.AllowDrag = true;
                             sgworld.Window.ShowPopup(areaPopup);
                         }
                     }
                 }
             }
  • 相关阅读:
    差分隐私 differential privacy privSQL ||sql query ||sql查询系统||PrivateSQL:A Differentially Private SQL Query Engine论文笔记
    分冶法解决大整数相乘 最近对问题
    数论 矩阵交集
    STl 优先队列 C++
    备份mysql函数和存储过程
    Idea 注解模板
    excel导出
    帆软常用小技巧
    js + java文件下载
    try/finally
  • 原文地址:https://www.cnblogs.com/yitianhe/p/4227486.html
Copyright © 2020-2023  润新知