diff options
m--------- | .mason | 0 | ||||
-rw-r--r-- | platform/android/scripts/configure.sh | 2 | ||||
-rw-r--r-- | platform/ios/scripts/configure.sh | 2 | ||||
-rw-r--r-- | platform/linux/scripts/configure.sh | 2 | ||||
-rw-r--r-- | platform/osx/scripts/configure.sh | 2 | ||||
-rw-r--r-- | src/mbgl/annotation/shape_annotation_impl.cpp | 3 | ||||
-rw-r--r-- | src/mbgl/style/style_parser.cpp | 8 | ||||
-rw-r--r-- | src/mbgl/tile/geometry_tile.hpp | 3 |
8 files changed, 14 insertions, 8 deletions
diff --git a/.mason b/.mason -Subproject e779cb28cbf3c350ea017777bdcbd9fa536403e +Subproject e93ea69408d97cb8bd257f8bd2427189e8dbae3 diff --git a/platform/android/scripts/configure.sh b/platform/android/scripts/configure.sh index 2e510b1fba..191953e8d9 100644 --- a/platform/android/scripts/configure.sh +++ b/platform/android/scripts/configure.sh @@ -8,7 +8,7 @@ LIBUV_VERSION=1.7.5 ZLIB_VERSION=system NUNICODE_VERSION=1.6 LIBZIP_VERSION=0.11.2 -GEOJSONVT_VERSION=3.1.0 +GEOJSONVT_VERSION=4.0.0 VARIANT_VERSION=1.1.0 RAPIDJSON_VERSION=1.0.2 JNI_HPP_VERSION=2.0.0 diff --git a/platform/ios/scripts/configure.sh b/platform/ios/scripts/configure.sh index da5b12bdd6..32e2900eba 100644 --- a/platform/ios/scripts/configure.sh +++ b/platform/ios/scripts/configure.sh @@ -4,7 +4,7 @@ BOOST_VERSION=1.59.0 SQLITE_VERSION=system LIBUV_VERSION=1.7.5 ZLIB_VERSION=system -GEOJSONVT_VERSION=3.1.0 +GEOJSONVT_VERSION=4.0.0 VARIANT_VERSION=1.1.0 RAPIDJSON_VERSION=1.0.2 GTEST_VERSION=1.7.0 diff --git a/platform/linux/scripts/configure.sh b/platform/linux/scripts/configure.sh index f984ecd659..6df7f2805f 100644 --- a/platform/linux/scripts/configure.sh +++ b/platform/linux/scripts/configure.sh @@ -10,7 +10,7 @@ SQLITE_VERSION=3.9.1 LIBUV_VERSION=1.7.5 ZLIB_VERSION=system NUNICODE_VERSION=1.6 -GEOJSONVT_VERSION=3.1.0 +GEOJSONVT_VERSION=4.0.0 VARIANT_VERSION=1.1.0 RAPIDJSON_VERSION=1.0.2 GTEST_VERSION=1.7.0 diff --git a/platform/osx/scripts/configure.sh b/platform/osx/scripts/configure.sh index a468962230..7fb8f97637 100644 --- a/platform/osx/scripts/configure.sh +++ b/platform/osx/scripts/configure.sh @@ -8,7 +8,7 @@ SQLITE_VERSION=3.9.1 LIBUV_VERSION=1.7.5 ZLIB_VERSION=system NUNICODE_VERSION=1.6 -GEOJSONVT_VERSION=3.1.0 +GEOJSONVT_VERSION=4.0.0 VARIANT_VERSION=1.1.0 RAPIDJSON_VERSION=1.0.2 GTEST_VERSION=1.7.0 diff --git a/src/mbgl/annotation/shape_annotation_impl.cpp b/src/mbgl/annotation/shape_annotation_impl.cpp index 9adebf177b..c333492810 100644 --- a/src/mbgl/annotation/shape_annotation_impl.cpp +++ b/src/mbgl/annotation/shape_annotation_impl.cpp @@ -108,7 +108,8 @@ void ShapeAnnotationImpl::updateTile(const TileID& tileID, AnnotationTile& tile) mapbox::geojsonvt::Options options; options.maxZoom = maxZoom; - options.buffer = 128u; + options.buffer = 255u; + options.extent = util::EXTENT; options.tolerance = baseTolerance; shapeTiler = std::make_unique<mapbox::geojsonvt::GeoJSONVT>(features, options); } diff --git a/src/mbgl/style/style_parser.cpp b/src/mbgl/style/style_parser.cpp index ca0fe94056..be26af56ad 100644 --- a/src/mbgl/style/style_parser.cpp +++ b/src/mbgl/style/style_parser.cpp @@ -245,13 +245,17 @@ void StyleParser::parseSources(const JSValue& value) { std::unique_ptr<mapbox::geojsonvt::GeoJSONVT> StyleParser::parseGeoJSON(const JSValue& value) { using namespace mapbox::geojsonvt; + Options options; + options.buffer = util::EXTENT / util::tileSize * 128; + options.extent = util::EXTENT; + try { - return std::make_unique<GeoJSONVT>(Convert::convert(value, 0)); + return std::make_unique<GeoJSONVT>(Convert::convert(value, 0), options); } catch (const std::exception& ex) { Log::Error(Event::ParseStyle, "Failed to parse GeoJSON data: %s", ex.what()); // Create an empty GeoJSON VT object to make sure we're not infinitely waiting for // tiles to load. - return std::make_unique<GeoJSONVT>(std::vector<ProjectedFeature>{}); + return std::make_unique<GeoJSONVT>(std::vector<ProjectedFeature>{}, options); } } diff --git a/src/mbgl/tile/geometry_tile.hpp b/src/mbgl/tile/geometry_tile.hpp index f1930ef3de..7021b7a8b2 100644 --- a/src/mbgl/tile/geometry_tile.hpp +++ b/src/mbgl/tile/geometry_tile.hpp @@ -9,6 +9,7 @@ #include <mbgl/util/vec.hpp> #include <mbgl/util/noncopyable.hpp> #include <mbgl/util/optional.hpp> +#include <mbgl/util/constants.hpp> #include <cstdint> #include <string> @@ -33,7 +34,7 @@ using GeometryCollection = std::vector<GeometryCoordinates>; class GeometryTileFeature : private util::noncopyable { public: - static const uint32_t defaultExtent = 4096; + static const uint32_t defaultExtent = util::EXTENT; virtual ~GeometryTileFeature() = default; virtual FeatureType getType() const = 0; |