1

is it possible to achieve something like this?

I am preparing one application using mapView, i want to display the current location and even add marks of all other users.. that thing i implemented now i want to select some marks by drawing circle on mapView. i.e first user will zoom the map at his desire level then, the user will select the number of users by drawing circle on mapView and at that time zoom of map will freeze i.e on pinch zoom circle will draw on zooming functionality of map.

Is there a sample code on this implementation?

Thanks!

jazz
  • 1,216
  • 7
  • 7

1 Answers1

2

Adding items on the MapView onTouch

and

Drawing a circle on the MapView

Community
  • 1
  • 1
Reno
  • 33,594
  • 11
  • 89
  • 102
  • thanks for you reply i had added the points on map, but now i want to select certain points from map by drawing circle on map i.e by using multitouch functionality and on that pinch zoom map wont zoom in or zoom out. – jazz Jun 14 '11 at 06:34
  • [Read this blog about circle gesture detection](http://android-journey.blogspot.com/2010/01/android-gestures.html) I couldn't understand the part about no zooming in or out? Why do you want to do that? I feel it will only confuse the user. – Reno Jun 14 '11 at 06:42
  • zooming in or out is map functionality.. and i want to zoom in or out when the user draw a circle on screen. – jazz Jun 14 '11 at 07:31
  • You have to get the radius of the circle and map it to the projection on the screen, a bit of math will give you the coordinates of [the 4 corners of the area to be zoomed in](http://stackoverflow.com/questions/5241487/android-mapview-setting-zoom-automatically-until-all-itemizedoverlays-are-visib/5242149#5242149) – Reno Jun 14 '11 at 07:39
  • For drawing circle on map firstly i have to freeze the stage of map and then i have to start drawing circle of mine desire radius that means i can resize it in whatever way i want. – jazz Jun 14 '11 at 07:41