Polyline
You can animating the polyline with easier code. There is a feature to determine the draw of the animation.
#
Download#
Create Instance#
Configuration builderParam | type | desc |
---|---|---|
withPrimaryPolyline(PolylineOptions.() -> Unit) | PolylineAnimatorBuilder | DSL param for add primary polyline |
withAccentPolyline(PolylineOptions.() -> Unit) | PolylineAnimatorBuilder | DSL param for add accent polyline |
withCameraAutoFocus(Boolean) | PolylineAnimatorBuilder | Set for auto zoom camera |
withStackAnimationMode(StackAnimationMode) | PolylineAnimatorBuilder | Set for animate type polyline |
createAnimatePolyline() | PolylineAnimator | to create PolylineAnimator |
#
Animating polyline#
Start animate polylineTo start animate use startAnimate(geometries: List<LatLng>, duration: Long)
and result is PointPolyline
#
Start with existing PolylineWith PolylineOptions
Or with PolylineAnimator
#
Add points in polylineYou can added polyline in existing polyline
#
Remove polylineRemove polyline on PointPolyline
Or by geometries
#
Configuration with DSLParam | return | desc |
---|---|---|
withPrimaryPolyline(PolylineOptions.() -> Unit) | Unit | DSL param for add primary polyline |
withAccentPolyline(PolylineOptions.() -> Unit) | Unit | DSL param for add accent polyline |
duration | Long | Duration of animation |
cameraAutoUpdate | Boolean | Set for auto zoom camera |
stackAnimationMode | StackAnimationMode | Set for animate type polyline |
polylineDrawMode | PolylineDrawMode | Set for draw type polyline |
enableBorder(isEnable: Boolean, color: Int, width: Int) | Unit | Set for border of polyline |
doOnStartAnimation(action: (LatLng) -> Unit) | Unit | Do action when animation is start |
doOnEndAnimation(action: (LatLng) -> Unit) | Unit | Do action when animation is finish |
doOnUpdateAnimation(action: (latLng: LatLng, mapCameraDuration: Int) -> Unit) | Unit | Do action when animation is update with duration for camera movement |
#
Stack Animation ModeThis is animation type of polyline
- Button 1:
StackAnimationMode.BlockStackAnimation
(this default configuration) - Button 2:
StackAnimationMode.WaitStackEndAnimation
- Button 2:
StackAnimationMode.OffStackAnimation
#
Polyline draw modeThis library able to customize polyline draw mode
- Button 1:
PolylineDrawMode.Normal
(this default configuration) - Button 2:
PolylineDrawMode.Curved
- Button 2:
PolylineDrawMode.Lank