From bcf82bdd013b529b66b162ccc0f94ae18189e159 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20Ka=CC=88fer?= Date: Thu, 17 Jul 2014 16:20:49 -0700 Subject: [PATCH] respect layer min/maxzoom, not source min/maxzoom --- src/map/map.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/map/map.cpp b/src/map/map.cpp index d6c09606c..1c3d01c18 100644 --- a/src/map/map.cpp +++ b/src/map/map.cpp @@ -661,8 +661,9 @@ void Map::renderLayer(std::shared_ptr layer_desc, RenderPass pass) { // Skip this layer if it's outside the range of min/maxzoom. // This may occur when there /is/ a bucket created for this layer, but the min/max-zoom // is set to a fractional value, or value that is larger than the source maxzoom. - if (style_source.info.min_zoom > state.getZoom() || - style_source.info.max_zoom <= state.getZoom()) { + const double zoom = state.getZoom(); + if (layer_desc->bucket->min_zoom > zoom || + layer_desc->bucket->max_zoom <= zoom) { return; }