Ric*_*end 3 c# maps geospatial coordinates
给定一个左上角的长/纬度和一个右下角的长/纬度,如何确定给定的长/纬度是否落在矩形内?
理想情况下,我会看到类似的东西
bool IsWithinArea(float topLeftLat,float topLeftLong,
   float bottomRightLat,float bottomRightLong,float testLat,float testLong)
更新
一个问题是从long/lat创建的矩形可能来自旋转的地图,因此右下角并不总是大于左上角...
我们可以比琐碎的检查更有趣:
return new Rect(topLeftLat, topLeftLong, bottomRightLat - topLeftLat, bottomRightLong - topLeftLong)
      .Contains(testLat, testLong);