Sarun Intaralawan Sarun Intaralawan - 4 months ago 9
Android Question

Can I add listener to Circle drawn on the map?

I want to draw a

Circle
on the map and do something when the user touches it. Also, I can't find any method of
Circle
which is about that. What do I need to do?

Thanks,
Sarun

Edit

In order to clarify my question. I want the circle that is have the constant distance relative to the ground, that means, if I zoom the map, the circle will grow bigger.

Answer

You can do that using OnMapClickListener.

In the callback check if the distance between clicked LatLng and the center of the Circle is smaller than radius.

Location.distanceBetween should be of some help.