[core] increase geojson buffer size to match -js
This commit is contained in:
2
.mason
2
.mason
Submodule .mason updated: e779cb28cb...e93ea69408
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user