summaryrefslogtreecommitdiff
path: root/src/mbgl/style/sources/vector_source.cpp
diff options
context:
space:
mode:
authorAlexander Shalamov <alexander.shalamov@mapbox.com>2020-02-06 09:44:49 +0200
committerAlexander Shalamov <alexander.shalamov@mapbox.com>2020-02-10 16:35:37 +0200
commit04292d0034e3904d68e9e413087886ad9fde8c8b (patch)
tree515c4f5caff490f26ab1a16f736dfab22cae0fcd /src/mbgl/style/sources/vector_source.cpp
parent97cab6365bd083d162544eb4bcae4ebd47a7ecae (diff)
downloadqtlocation-mapboxgl-04292d0034e3904d68e9e413087886ad9fde8c8b.tar.gz
[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.
Diffstat (limited to 'src/mbgl/style/sources/vector_source.cpp')
-rw-r--r--src/mbgl/style/sources/vector_source.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mbgl/style/sources/vector_source.cpp b/src/mbgl/style/sources/vector_source.cpp
index 510106adb9..cc2319b302 100644
--- a/src/mbgl/style/sources/vector_source.cpp
+++ b/src/mbgl/style/sources/vector_source.cpp
@@ -91,5 +91,9 @@ bool VectorSource::supportsLayerType(const mbgl::style::LayerTypeInfo* info) con
return mbgl::underlying_type(Tile::Kind::Geometry) == mbgl::underlying_type(info->tileKind);
}
+Mutable<Source::Impl> VectorSource::createMutable() const noexcept {
+ return staticMutableCast<Source::Impl>(makeMutable<Impl>(impl()));
+}
+
} // namespace style
} // namespace mbgl