[core] Override default prefetch delta if source has it's own setting

This commit is contained in:
Alexander Shalamov
2020-02-10 22:29:11 +02:00
parent fce4129435
commit def38cf4db
9 changed files with 94 additions and 81 deletions

View File

@@ -28,19 +28,19 @@ void RenderAnnotationSource::update(Immutable<style::Source::Impl> baseImpl_,
enabled = needsRendering;
tilePyramid.update(layers,
needsRendering,
needsRelayout,
parameters,
SourceType::Annotations,
util::tileSize,
// Zoom level 16 is typically sufficient for annotations.
// See https://github.com/mapbox/mapbox-gl-native/issues/10197
{ 0, 16 },
optional<LatLngBounds> {},
[&] (const OverscaledTileID& tileID) {
return std::make_unique<AnnotationTile>(tileID, parameters);
});
tilePyramid.update(
layers,
needsRendering,
needsRelayout,
parameters,
SourceType::Annotations,
util::tileSize,
// Zoom level 16 is typically sufficient for annotations.
// See https://github.com/mapbox/mapbox-gl-native/issues/10197
{0, 16},
optional<LatLngBounds>{},
[&](const OverscaledTileID& tileID) { return std::make_unique<AnnotationTile>(tileID, parameters); },
baseImpl->getPrefetchZoomDelta());
}
std::unordered_map<std::string, std::vector<Feature>>