【问题标题】:ios get the coordinate of northeast and southwest in map screenios获取地图画面中东北和西南的坐标
【发布时间】:2011-11-03 15:35:31
【问题描述】:

我是 iPhone 应用程序的初学者。我将使用谷歌地图开发应用程序。 当用户在地图屏幕中拖动并更改地图屏幕的内容时,我想获取当前地图屏幕中东北和西南的坐标。用户缩小/放大后,用户可以更改地图屏幕的内容。在这种情况下,我必须得到东北和西南的坐标。我没有找到这个方法。

【问题讨论】:

    标签: iphone ios google-maps


    【解决方案1】:

    你可以这样做(See that question):

    MKMapRect mapRect = self.mapView.visibleMapRect;
    
    MKMapPoint cornerPointNE = MKMapPointMake(mapRect.origin.x + mapRect.size.width, mapRect.origin.y);
    CLLocationCoordinate2D cornerCoordinateNE = MKCoordinateForMapPoint(cornerPointNE);
    
    MKMapPoint cornerPointSW = MKMapPointMake(mapRect.origin.x, mapRect.origin.y + mapRect.size.height);
    CLLocationCoordinate2D cornerCoordinateSW = MKCoordinateForMapPoint(cornerPointSW);
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-01-26
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-12-14
      • 2021-02-12
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多