summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorzmiao <miao.zhao@mapbox.com>2019-09-17 18:00:37 +0300
committerGitHub <noreply@github.com>2019-09-17 18:00:37 +0300
commit0a219d182c422e181b29c9dcc60c18ceafe1db48 (patch)
tree1bd715f0fcccff1ab3b97c0951712ea5358f7fe1 /include
parent4f910734149b59e3babb5a4c22cc398f13ca4364 (diff)
downloadqtlocation-mapboxgl-0a219d182c422e181b29c9dcc60c18ceafe1db48.tar.gz
[Core] Fix wrong `maxzoom` setting of tileSet when using URL source (#15581)
* [core] Take max/min zoom option from style if they are set * [core] std::move input value * [Core] Add changelogs * [Core] Fix clang-format reported error * [Core] fix clang-tidy reported error
Diffstat (limited to 'include')
-rw-r--r--include/mbgl/style/sources/vector_source.hpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/mbgl/style/sources/vector_source.hpp b/include/mbgl/style/sources/vector_source.hpp
index ece7f5615a..97f0a7e5a8 100644
--- a/include/mbgl/style/sources/vector_source.hpp
+++ b/include/mbgl/style/sources/vector_source.hpp
@@ -12,7 +12,8 @@ namespace style {
class VectorSource final : public Source {
public:
- VectorSource(std::string id, variant<std::string, Tileset> urlOrTileset);
+ VectorSource(std::string id, variant<std::string, Tileset> urlOrTileset, optional<float> maxZoom = nullopt,
+ optional<float> minZoom = nullopt);
~VectorSource() final;
const variant<std::string, Tileset>& getURLOrTileset() const;
@@ -31,6 +32,8 @@ private:
const variant<std::string, Tileset> urlOrTileset;
std::unique_ptr<AsyncRequest> req;
mapbox::base::WeakPtrFactory<Source> weakFactory {this};
+ optional<float> maxZoom;
+ optional<float> minZoom;
};
template <>