fix circle clipping bug

91d2e0ee5c
This commit is contained in:
Ansis Brammanis
2015-09-03 17:01:46 -04:00
committed by John Firebaugh
parent 49d855769b
commit f1edf1043b

View File

@@ -35,11 +35,15 @@ bool CircleBucket::hasData() const {
}
void CircleBucket::addGeometry(const GeometryCollection& geometryCollection) {
const int extent = 4096;
for (auto& circle : geometryCollection) {
for(auto & geometry : circle) {
auto x = geometry.x;
auto y = geometry.y;
// Do not include points that are outside the tile boundaries.
if (x < 0 || x >= extent || y < 0 || y >= extent) continue;
// this geometry will be of the Point type, and we'll derive
// two triangles from it.
//