Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
[core] Replace magic number with constant-based calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
jfirebaugh committed Dec 21, 2016
1 parent da361c3 commit 1bb80c0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/mbgl/layout/symbol_layout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -313,8 +313,8 @@ void SymbolLayout::addFeature(const SymbolFeature& feature,
poly.push_back(r);
}

// 16 here represents 2 pixels
auto poi = mapbox::polylabel(poly, 16.0);
// 1 pixel worth of precision, in tile coordinates
auto poi = mapbox::polylabel(poly, double(util::EXTENT / util::tileSize));
Anchor anchor(poi.x, poi.y, 0, minScale);
addSymbolInstance(polygon[0], anchor);
}
Expand Down

0 comments on commit 1bb80c0

Please sign in to comment.