diff --git a/src/mbgl/renderer/circle_bucket.cpp b/src/mbgl/renderer/circle_bucket.cpp index a6a439d86..ae8eeef9d 100644 --- a/src/mbgl/renderer/circle_bucket.cpp +++ b/src/mbgl/renderer/circle_bucket.cpp @@ -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. //