mapbox / mapbox-gl-native

Interactive, thoroughly customizable maps in native Android, iOS, macOS, Node.js, and Qt applications, powered by vector tiles and OpenGL
https://mapbox.com/mobile
Other
4.37k stars 1.33k forks source link

MGLLineStyleLayer.lineGradient doesn't support interpolation or step functions #16567

Open ShanMa1991 opened 3 years ago

ShanMa1991 commented 3 years ago

Steps to reproduce

  1. Follow the implementation of the vanishing route line and the Timer controlled Polyline animation.
    1. Have an evenly distributed UI animation view at constant and evenly rate of updating on the same super layer at same duration with the Polyline.lineGradient update.

Expected behavior

The MGLLineStyleLayer.lineGradient support a smoothly and evenly transitioned between two, or support interpolation or step functions. So the Polyline and this UI animation view will be synchronized at each update duration.

Actual behavior

  1. The Timer time interval update is not evenly distributed, the vanishing route line supports update in a one second duration. So when zoom in, we could see that the Polyline animation is jumping, not smoothly, or transitioned at a unevenly rate.
  2. The Polyline and this UI animation view will not be synchronized at each update duration.

Configuration

Mapbox SDK versions: iOS/macOS versions: Device/simulator models: Xcode version: