[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:
Bruno de Oliveira Abinader
2016-02-22 01:06:21 +02:00
parent fcaafcc428
commit 9771b0e569
5 changed files with 5 additions and 7 deletions

View File

@@ -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;