diff --git a/js/data/circle_bucket.js b/js/data/circle_bucket.js index 7d36ab37b36..e3a9a82417b 100644 --- a/js/data/circle_bucket.js +++ b/js/data/circle_bucket.js @@ -20,6 +20,7 @@ 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++) { @@ -27,6 +28,9 @@ CircleBucket.prototype.addFeatures = function() { 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; diff --git a/package.json b/package.json index 990a59a6cf9..10decc0654e 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "documentation": "git+https://github.com/documentationjs/documentation#d341019b32a8a257a93bd55586e7f09f42e29341", "eslint": "^0.22.1", "istanbul": "^0.3.15", - "mapbox-gl-test-suite": "git+https://github.com/mapbox/mapbox-gl-test-suite.git#6cfd7eb20de77018a7f10770f56df9ce1f8a76ac", + "mapbox-gl-test-suite": "git+https://github.com/mapbox/mapbox-gl-test-suite.git#2004426964b2ff74c231eae00c69c1e7fc73a329", "prova": "^2.1.2", "sinon": "^1.15.4", "through": "^2.3.7",