How to get exact position on mapview(x , y cordinates) from lat lon in mkmapkit
I want the exact position on mkmapkit that is x y cordinate from lat lon va开发者_如何学编程lues .
I used the followind code
CLLocationCoordinate2D neCoord;
neCoord.latitude = 72.2234;
neCoord.longitude = 23.340876;
//Here i have passed hardcoded lat lon
nePoint = [map_view convertCoordinate:neCoord toPointToView:map_view];
But i get the cordinates to be negative values.
So any idea or suggestions for the same are accepted.
Maybe you're getting negative numbers because the MKMapView
isn't showing the region where the coordinates are? If they're both negative, then the location is NW of the current displayed map region.
精彩评论