1

I'm updating an application working with MapBox (migrating from 5.1.5 to 6.5.0).

Now, everything works fine (with LocationEngine CompassEngine, new class/package naming, etc.) but I'm facing an issue to find the equivalent expression (in 5.1.5) :

PropertyFactory.lineWidth(CameraFunction.zoom(ExponentialStops.exponential(Stop.stop(10,PropertyFactory.lineWidth(1f)), Stop.stop(18,PropertyFactory.lineWidth(3f))).withBase(1f)))

This line allows to change line width depending on zoom. I don't find the equivalent expression in mapbox 6.5.0.

Any help would be appreciated.

sokarcreative
  • 536
  • 7
  • 18

1 Answers1

0

The 6.5.0+ equivalent would be the following:

PropertyFactory.lineWidth(Expression.interpolate(Expression.exponential(1f), Expression.zoom(), Expression.stop(10, 1f), Expression.stop(18, 3f)))
Daniel Kvist
  • 3,032
  • 5
  • 26
  • 51