/Dual-color-Polyline-Animation

This library will help to show the polyline in dual color similar as Uber.

Primary LanguageJava

Dual-color-Polyline-Animation


This library will help to show the polyline in dual color similar as Uber with animation in the demo.

Demo



Steps:

  • Pass the googlemap context and Latlng points stored in arraylist.
    
    
  • MapAnimator.getInstance().animateRoute(googleMap, polyLineList);


  • polyLineList refers to the ArrayList, the coordinates which is to be decoded from the directions api of google.


    • Note: You can change the color of the default polyline by passing :

    • MapAnimator.getInstance().setPrimaryLineColor(color);
    • MapAnimator.getInstance().setSecondaryLineColor(color);


    • If you are changing the default colors, call it before animateRoute() method call.

      Dependency

    • App Level: implementation 'com.github.tintinscorpion:Dual-color-Polyline-Animation:1.0'

    • Project Level: maven { url 'https://jitpack.io' }
    • Developers