Ios MKPolylineRenderer在地球另一侧的MKMapView上的错误位置渲染?
我的应用程序中有一个非常奇怪的问题。我正在开发一个应用程序,记录用户的轨迹,并将其绘制在类似Runkeeper的MKMapView上。一位亚洲人士使用了该应用程序,该人士报告说,MKMapView上的MKpolyline实际渲染位置错误,偏移了正确的位置。当我在北美测试这个应用程序时,MKPolyline并没有被错误渲染。这是因为CLLocationCoordinate2D和MKMapPoint之间的转换不准确吗?这和经络180度有关吗?非常感谢你 代码我无法真正找到此代码中的错误,但也许您可以:Ios MKPolylineRenderer在地球另一侧的MKMapView上的错误位置渲染?,ios,objective-c,swift,Ios,Objective C,Swift,我的应用程序中有一个非常奇怪的问题。我正在开发一个应用程序,记录用户的轨迹,并将其绘制在类似Runkeeper的MKMapView上。一位亚洲人士使用了该应用程序,该人士报告说,MKMapView上的MKpolyline实际渲染位置错误,偏移了正确的位置。当我在北美测试这个应用程序时,MKPolyline并没有被错误渲染。这是因为CLLocationCoordinate2D和MKMapPoint之间的转换不准确吗?这和经络180度有关吗?非常感谢你 代码我无法真正找到此代码中的错误,但也许您可以
func locationManager(manager: CLLocationManager!, didUpdateLocations locations: [AnyObject]!) {
//...
addLocationsToTrail(locations as [CLLocation])
updateOverlay()
}
func addLocationsToTrail(locations: [CLLocation]) {
for location in locations {
locationsInTrailRecorded.addLocationToTrail(location)
}
}
func updateOverlay() {
let newOverlay = PolylineOverlayFactory.createPolylineOverlayFromLocations(locationsInTrailRecorded) //Returns MKPolyline
let oldOverlay = self.trailOverlay
mapView.addOverlay(newOverlay, level: .AboveRoads)
mapView.removeOverlay(oldOverlay)
self.trailOverlay = newOverlay
}
如果这是在中国,请看。@Anna是的,是的,它确实在中国。我听说这是因为中国有一个加密的地图坐标系。你知道其他国家有没有类似的病例吗?非常感谢。