iOS中MapKit中的经纬度是如何理解的
巴扎黑
巴扎黑 2017-04-18 09:43:19
0
0
574
var topLeftCoord = CLLocationCoordinate2D(latitude: -90, longitude: 180)
var bottomRightCoord = CLLocationCoordinate2D(latitude: 90, longitude: -180)

for annotation in annotations {
    topLeftCoord.latitude = max(topLeftCoord.latitude, annotation.coordinate.latitude)
    topLeftCoord.longitude = min(topLeftCoord.longitude, annotation.coordinate.longitude)
    bottomRightCoord.latitude = min(bottomRightCoord.latitude, annotation.coordinate.latitude)
    bottomRightCoord.longitude = max(bottomRightCoord.longitude, annotation.coordinate.longitude)
    
    
}

请问一下我看到一段代码,我的理解是topLeftCoord是指左上角的坐标,bottomRightCoord是右下角的坐标,那么就在mapView中的一块范围显示了所有的位置图钉。latitude是指维度,longitude是指经度。我在百度地图中 http://api.map.baidu.com/lbsa... 用鼠标获取了一下。
var topLeftCoord = CLLocationCoordinate2D(latitude: -90, longitude: 180)是右下角
var bottomRightCoord = CLLocationCoordinate2D(latitude: 90, longitude: -180)是左上角

是反过来的,所以请问一下,我应该怎么理解经纬度的正负和方位呢???谢谢

巴扎黑
巴扎黑

reply all(0)
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!