[core] Remove the ability to change cross-fade durations via transition

We shouldn't overload transition duration to mean the duration of the
cross-fade when moving between stops. If we want to allow styles to
override the default 300ms fade duration, it should be a dedicated
property like raster-fade-duration.

I don't think any styles use this functionality -- if they did, they
were broken for MapMode::Still rendering.
This commit is contained in:
John Firebaugh
2015-11-04 13:21:47 -08:00
parent 9b537fab29
commit 10858ab382
7 changed files with 13 additions and 40 deletions

View File

@@ -107,7 +107,7 @@ Faded<T> Function<Faded<T>>::evaluate(const StyleCalculationParameters& paramete
float z = parameters.z;
float fraction = std::fmod(z, 1.0f);
std::chrono::duration<float> d = duration ? *duration : parameters.defaultFadeDuration;
std::chrono::duration<float> d = parameters.defaultFadeDuration;
float t = std::min((parameters.now - parameters.zoomHistory.lastIntegerZoomTime) / d, 1.0f);
float fromScale = 1.0f;
float toScale = 1.0f;