cocoa - iOS MapKit - Points per meter -


i drawing circle in mkoverlayview subclass. have radius in meters. how convert said meters points (at zoom scale) drawing in drawmaprect:zoomscale:incontext:?

see headers:

helpers:

 // conversion between distances , projected coordinates  mk_extern cllocationdistance mkmeterspermappointatlatitude(cllocationdegrees latitude) ns_available(na, 4_0);  mk_extern double mkmappointspermeteratlatitude(cllocationdegrees latitude) ns_available(na, 4_0);   mk_extern cllocationdistance mkmetersbetweenmappoints(mkmappoint a, mkmappoint b) ns_available(na, 4_0); 

and mkoverlayview

 // convert screen points relative view absolute mkmappoints  - (cgpoint)pointformappoint:(mkmappoint)mappoint;  - (mkmappoint)mappointforpoint:(cgpoint)point; 

so

double ppm = mkmappointspermeteratlatitude(centercoordinate.latitude); mkmappoint mkptleftmost = ptcenter.x -= ppm; cgpoint ptleftmost  = [self pointformappoint:mkptleftmost]; 

Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -