Android map: how to make polyline animation on map?
                                        
                    •
                    Android                                    
                When I draw polylines on the map from point a - > b, I need to animate polylines. It seems that I continue to draw polylines from a - > B
I have used the following link as a reference:
https://github.com/amalChandran/google-maps-route-animation
Using this solution, I can animate the polyline, but the polyline itself is not appropriate. It does not pass through the road. The original APK of the solution also has the same error
Can someone help me provide the right solution
resolvent:
Invalid Sign
Valueanimator - used to animate overlays and polylines
ValueAnimator tAnimator = ValueAnimator.ofFloat(0, 1);
       tAnimator.setRepeatCount(ValueAnimator.INFINITE);
       tAnimator.setRepeatMode(ValueAnimator.RESTART);
       tAnimator.setInterpolator(new LinearInterpolator());
       tAnimator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
           @Override
           public void onAnimationUpdate(ValueAnimator valueAnimator) {
              // animate here
           }
       });
Polyline - used to draw lines on the map
 PolylineOptions greyOptions = new PolylineOptions();
        greyOptions.width(10);
        greyOptions.color(Color.GRAY);
        greyOptions.startCap(new SquareCap());
        greyOptions.endCap(new SquareCap());
        greyOptions.jointType(ROUND);
        greyPolyLine = mMap.addPolyline(greyOptions);
                
                            The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
                        
                                            
                        THE END
                    
                    
                    
                                                        二维码
                        
                        
                                                
                        