Skip to content

Commit

Permalink
fix layer minZoom being ignored if not less than source maxZoom
Browse files Browse the repository at this point in the history
This condition led to layers with high minzoom like oneway street
arrows (z15) get parsed and placed regardless of minzoom (e.g. z11+),
wasting a lot of worker CPU time.

It became unnecessary after we added reparsing tiles when overscaling,
and even before that it should have probably been <= rather than <.
Native has the same bug.

cc @jfirebaugh @ansis @kkaefer
  • Loading branch information
mourner committed Oct 6, 2015
1 parent e86351d commit 3532d80
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/source/worker_tile.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ WorkerTile.prototype.parse = function(data, layers, actor, callback) {
continue;

var minzoom = layer.minzoom;
if (minzoom && this.zoom < minzoom && minzoom < this.maxZoom)
if (minzoom && this.zoom < minzoom)
continue;

var maxzoom = layer.maxzoom;
Expand Down

0 comments on commit 3532d80

Please sign in to comment.