[core] Use GeometryTileFeature::defaultExtent by default
GeoJSONTile and AnnotationTile don't need to reimplement getExtent() if they use the same default value. This also helps point and shape annotations to avoid using raw values.
This commit is contained in:
@@ -81,11 +81,10 @@ void ShapeAnnotationImpl::updateStyle(Style& style) {
|
||||
|
||||
void ShapeAnnotationImpl::updateTile(const TileID& tileID, AnnotationTile& tile) {
|
||||
static const double baseTolerance = 4;
|
||||
static const uint16_t extent = 4096;
|
||||
|
||||
if (!shapeTiler) {
|
||||
const uint64_t maxAmountOfTiles = 1 << maxZoom;
|
||||
const double tolerance = baseTolerance / (maxAmountOfTiles * extent);
|
||||
const double tolerance = baseTolerance / (maxAmountOfTiles * GeometryTileFeature::defaultExtent);
|
||||
|
||||
geojsonvt::ProjectedRings rings;
|
||||
std::vector<geojsonvt::LonLat> points;
|
||||
|
||||
Reference in New Issue
Block a user