0

有没有办法从 Map.GetExtent() 信封中获取实际的左上角和右下角 lat lng 坐标,以过滤 MSSql 服务器数据库中的可用形状?

我尝试了很多事情,但无法实现。

double dleft = mbEarth.Map.Center.X - mbEarth.Map.Zoom * 0.00000525;
double dright = mbEarth.Map.Center.X + mbEarth.Map.Zoom * 0.00000525;
double dtop = mbEarth.Map.Center.Y + mbEarth.Map.Zoom * 0.00000525;
double dbottom = mbEarth.Map.Center.Y - mbEarth.Map.Zoom * 0.00000525;
    
string smapframegeom = $"POLYGON (({dleft} {dtop},{dright} {dtop},{dright} {dbottom},{dleft} {dbottom},{dleft} {dtop}))";
    
Envelope _env1 = mbEarth.Map.Envelope;
Coordinate _c01 = _env1.TopLeft();
Coordinate _c02 = _env1.TopRight();
Coordinate _c03 = _env1.BottomRight();
Coordinate _c04 = _env1.BottomLeft();

Envelope _env2 = mbEarth.Map.GetExtents();
Coordinate _c1 = _env2.TopLeft();
Coordinate _c2 = _env2.TopRight();
Coordinate _c3 = _env2.BottomRight();
Coordinate _c4 = _env2.BottomLeft();
4

0 回答 0