scale method
Zoom to Scale function.
Implementation
@override
num scale(double zoom) {
var iZoom = zoom.floor();
if (zoom == iZoom) {
return _scales[iZoom];
} else {
// Non-integer zoom, interpolate
var baseScale = _scales[iZoom];
var nextScale = _scales[iZoom + 1];
var scaleDiff = nextScale - baseScale;
var zDiff = (zoom - iZoom);
return baseScale + scaleDiff * zDiff;
}
}