开发者

Extracting lat long data from existing polyline

开发者 https://www.devze.com 2023-02-16 19:21 出处:网络
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 = ....;

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
}
0

精彩评论

暂无评论...
验证码 换一张
取 消