I want to add an animated circle to Google Maps view similar to the circle you see on this image.
The circle should be pulsing from the center to the largest radius indicating current user's location and the area of searching.
Here is relevant code block
Circle circle = mMap.addCircle(new CircleOptions()
.center(new LatLng(lat, lon))
.strokeColor(Color.CYAN).radius(1000));
valueAnimator = new ValueAnimator();
valueAnimator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
@Override
public void onAnimationUpdate(ValueAnimator valueAnimator) {
float animatedFraction = valueAnimator.getAnimatedFraction();
circle.setRadius(animatedFraction * 1000);
circle.setStrokeWidth(1 + animatedFraction * 7);
}
});
With this code I am only able to see static circle stroke without any animation.
Any help will be appreciated. Thanks in advance.
vAnimator.start();
it is not visualized anymore but at the same time I can see in the LogCat that it is processing. Do you have any assumptions why animation is not visualized with markers? – Shiner