[core] Add runtime API for setting tile prefetch delta for Source

New setPrefetchZoomDelta(optional<uint8_t> delta) method allow overriding
default tile prefetch setting that is defined by the Map instance. The
method can be moved to generic style specification if found to be useful
for gl-js engine.
This commit is contained in:
Alexander Shalamov
2020-02-06 09:44:49 +02:00
parent a231005860
commit fce4129435
16 changed files with 77 additions and 2 deletions

View File

@@ -87,5 +87,9 @@ bool RasterSource::supportsLayerType(const mbgl::style::LayerTypeInfo* info) con
return mbgl::underlying_type(Tile::Kind::Raster) == mbgl::underlying_type(info->tileKind);
}
Mutable<Source::Impl> RasterSource::createMutable() const noexcept {
return staticMutableCast<Source::Impl>(makeMutable<Impl>(impl()));
}
} // namespace style
} // namespace mbgl