diff options
Diffstat (limited to 'src/mbgl/style/sources/geojson_source_impl.cpp')
-rw-r--r-- | src/mbgl/style/sources/geojson_source_impl.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/mbgl/style/sources/geojson_source_impl.cpp b/src/mbgl/style/sources/geojson_source_impl.cpp index be347af2ab..efa4018b46 100644 --- a/src/mbgl/style/sources/geojson_source_impl.cpp +++ b/src/mbgl/style/sources/geojson_source_impl.cpp @@ -1,10 +1,13 @@ #include <mbgl/style/sources/geojson_source_impl.hpp> #include <mbgl/util/constants.hpp> #include <mbgl/tile/tile_id.hpp> +#include <mbgl/util/string.hpp> #include <mapbox/geojsonvt.hpp> #include <supercluster.hpp> +#include <cmath> + namespace mbgl { namespace style { @@ -52,14 +55,14 @@ GeoJSONSource::Impl::Impl(const Impl& other, const GeoJSON& geoJSON) mapbox::supercluster::Options clusterOptions; clusterOptions.maxZoom = options.clusterMaxZoom; clusterOptions.extent = util::EXTENT; - clusterOptions.radius = std::round(scale * options.clusterRadius); + clusterOptions.radius = ::round(scale * options.clusterRadius); data = std::make_unique<SuperclusterData>( geoJSON.get<mapbox::geometry::feature_collection<double>>(), clusterOptions); } else { mapbox::geojsonvt::Options vtOptions; vtOptions.maxZoom = options.maxzoom; vtOptions.extent = util::EXTENT; - vtOptions.buffer = std::round(scale * options.buffer); + vtOptions.buffer = ::round(scale * options.buffer); vtOptions.tolerance = scale * options.tolerance; data = std::make_unique<GeoJSONVTData>(geoJSON, vtOptions); } |