drawCircle requires diameter in pixels. In order to convert accuracy (in meters from LocationProvider) into pixels you can do this: - convert current location (GeoPoint) into pixels using mapView.getProjection.toPixels() - create another GeoPoint with longitude = center.getlatitudeE6() + accuracy * 11 - also convert this position into pixels - get delta between Y coordinates those two points. This is the radius of your circle.
On Nov 28, 4:05 pm, TreKing <treking...@gmail.com> wrote: > On Sun, Nov 28, 2010 at 4:42 PM, Emre A. Yavuz <eayl...@hotmail.com> wrote: > > > Does anybody have a piece of code or a link that can guide me to draw a > > circle on a MapView to mark the accuracy of the location estimation ? > > > Is using GPolygon() the only way ? > > No, you can just use this: > Canvas.drawCircle()<http://developer.android.com/reference/android/graphics/Canvas.html#d...> > . > > --------------------------------------------------------------------------- > ---------------------- > TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago > transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en