cool hit counter iOS - Latitude and longitude within the range displayed on the Baidu Maps screen_Intefrankly

iOS - Latitude and longitude within the range displayed on the Baidu Maps screen


Today I used Baidu Maps to get the latitude and longitude of the screen range, so I'll record it here.

    // Latitude and longitude of the current screen center point
    double centerLongitude = self.mapView.region.center.longitude;
    double centerLatitude = self.mapView.region.center.latitude;

    // Latitude and longitude of the current screen display range
    CLLocationDegrees pointssLongitudeDelta = self.mapView.region.span.longitudeDelta;
    CLLocationDegrees pointssLatitudeDelta = self.mapView.region.span.latitudeDelta;

    // upper left
    double leftUpLong = centerLongitude - pointssLongitudeDelta/2.0;
    double leftUpLati = centerLatitude - pointssLatitudeDelta/2.0;

    // upper right corner
    double rightUpLong = centerLongitude + pointssLongitudeDelta/2.0;
    double rightUpLati = centerLatitude - pointssLatitudeDelta/2.0;

    // lower left corner
    double leftDownLong = centerLongitude - pointssLongitudeDelta/2.0;
    double leftDownlati = centerLatitude + pointssLatitudeDelta/2.0;

    // lower right corner
    double rightDownLong = centerLongitude + pointssLongitudeDelta/2.0;
    double rightDownLati = centerLatitude + pointssLatitudeDelta/2.0;

    NSLog(@"
  top left   %f,%f---------
  upper right   %f,%f-------
  lower left  %f,%f----- 
  lower right  %f,%f",leftUpLong,leftUpLati,rightUpLong,rightUpLati,leftDownLong,leftDownlati,rightDownLong,rightDownLati);

Recommended>>
1、Summary of how to use the iOS SelectorView control UIPickerView
2、Major Internet FrontEnd Interview Questions 2018 IV USG
3、Google launches FederatedLearning a new machine learning model
4、Python Web Data for Crawling Test SitesDay 11
5、pythonDjangomysql multigraph multifile upload includes admin

    已推荐到看一看 和朋友分享想法
    最多200字,当前共 发送

    已发送

    朋友将在看一看看到

    确定
    分享你的想法...
    取消

    分享想法到看一看

    确定
    最多200字,当前共

    发送中

    网络异常,请稍后重试

    微信扫一扫
    关注该公众号