Extracting lat long data from existing polyline
Does anyone know how to extract the开发者_JAVA技巧 la long coordinates from an existing MKPolyline? I need them to build out a parameter around a trail.
MKPolyline *line = ....;
for(i = 0; i < line.pointCount; i++) {
CLLocationCoordinate2D coord = MKCoordinateForMapPoint(line.points[i]);
// use coord.latitude && coord.longitude
}
精彩评论