diff --git a/.mason b/.mason index e779cb28c..e93ea6940 160000 --- a/.mason +++ b/.mason @@ -1 +1 @@ -Subproject commit e779cb28cbf3c350ea017777bdcbd9fa536403ed +Subproject commit e93ea69408d97cb8bd257f8bd2427189e8dbae3c diff --git a/platform/android/scripts/configure.sh b/platform/android/scripts/configure.sh index 2e510b1fb..191953e8d 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 da5b12bdd..32e2900eb 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 f984ecd65..6df7f2805 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 a46896223..7fb8f9763 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 9adebf177..c33349281 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(features, options); } diff --git a/src/mbgl/style/style_parser.cpp b/src/mbgl/style/style_parser.cpp index ca0fe9405..be26af56a 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 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(Convert::convert(value, 0)); + return std::make_unique(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(std::vector{}); + return std::make_unique(std::vector{}, options); } } diff --git a/src/mbgl/tile/geometry_tile.hpp b/src/mbgl/tile/geometry_tile.hpp index f1930ef3d..7021b7a8b 100644 --- a/src/mbgl/tile/geometry_tile.hpp +++ b/src/mbgl/tile/geometry_tile.hpp @@ -9,6 +9,7 @@ #include #include #include +#include #include #include @@ -33,7 +34,7 @@ using GeometryCollection = std::vector; 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;