Add bindings for max overscale factor for parent tiles (#299)

This commit is contained in:
Alexander Shalamov
2020-04-20 04:16:59 -04:00
committed by GitHub
parent 69b7b10776
commit d7161fca1f

View File

@@ -92,6 +92,29 @@ public abstract class Source {
nativeSetPrefetchZoomDelta(delta);
}
/**
* When a set of tiles for a current zoom level is being rendered and some of the
* ideal tiles that cover the screen are not yet loaded, parent tile could be
* used instead. This might introduce unwanted rendering side-effects, especially
* for raster tiles that are overscaled multiple times. This method sets the maximum
* limit for how much a parent tile can be overscaled.
*
* @param maxOverscaleFactor maximum overscale factor
*/
public void setMaxOverscaleFactorForParentTiles(@Nullable Integer maxOverscaleFactor) {
nativeSetMaxOverscaleFactorForParentTiles(maxOverscaleFactor);
}
/**
* Retrieve current maximum overscale factor for parent tiles.
*
* @return current maximum overscale factor or null if not set.
*/
@Nullable
public Integer getMaxOverscaleFactorForParentTiles() {
return nativeGetMaxOverscaleFactorForParentTiles();
}
/**
* Internal use
*