Skip to content

Commit

Permalink
fix #1457 circle clipping bug
Browse files Browse the repository at this point in the history
  • Loading branch information
ansis committed Sep 3, 2015
1 parent 1fe033f commit 25c4acb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions js/data/circle_bucket.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,17 @@ function CircleBucket(buffers) {
}

CircleBucket.prototype.addFeatures = function() {
var extent = 4096;
for (var i = 0; i < this.features.length; i++) {
var geometries = this.features[i].loadGeometry()[0];
for (var j = 0; j < geometries.length; j++) {
this.elementGroups.makeRoomFor(6);
var x = geometries[j].x,
y = geometries[j].y;

// Do not include points that are outside the tile boundaries.
if (x < 0 || x >= extent || y < 0 || y >= extent) continue;

var idx = this.buffers.circleVertex.index -
this.elementGroups.current.vertexStartIndex;

Expand Down

0 comments on commit 25c4acb

Please sign in to comment.