开发者

convert latitude and longitude into x and y cordinates [duplicate]

开发者 https://www.devze.com 2023-04-08 05:08 出处:网络
This question already has an answer here: Closed 11 years ago. 开发者_如何学JAVA Possible Duplicate:
This question already has an answer here: Closed 11 years ago. 开发者_如何学JAVA

Possible Duplicate:

Longitude, Latitude to XY coordinate conversion

In my iphone application i am getting latitude and longitude of my current place.But I want to draw a line graph taking these latitude and longitude as points.How this is possible??


Try this:

CLLocationCoordinate2D coord = CLLocationCoordinate2DMake(latitudeInFloat, longitudeInFloat);
MKMapPoint point = MKMapPointForCoordinate(coord);
NSLog(@"x is %i and y is %i",point.x,point.y);
0

精彩评论

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