prefetchZoomDelta property

Future<double?> get prefetchZoomDelta

When loading a map, if PrefetchZoomDelta is set to any number greater than 0, the map will first request a tile at zoom level lower than zoom - delta, but so that the zoom level is multiple of delta, in an attempt to display a full map at lower resolution as quick as possible. It will get clamped at the tile source minimum zoom. Default value: 4.

Implementation

Future<double?> get prefetchZoomDelta async {
  final localStyle = style;
  if (localStyle == null) return null;
  final raw = (await localStyle.getStyleSourceProperty(
    id,
    "prefetch-zoom-delta",
  )).value;
  if (raw == null) return null;
  return (raw as num).toDouble();
}