From 3cbf3739c0dd1937a4239a87cfbe2aac92a70a3f Mon Sep 17 00:00:00 2001 From: Tom MacWright Date: Wed, 12 Dec 2012 16:32:40 -0500 Subject: [PATCH] Restrict zoom to scaleExtent --- js/id/renderer/map.js | 1 + 1 file changed, 1 insertion(+) diff --git a/js/id/renderer/map.js b/js/id/renderer/map.js index 846849844..bfbd1efab 100644 --- a/js/id/renderer/map.js +++ b/js/id/renderer/map.js @@ -365,6 +365,7 @@ iD.Map = function() { var scale = 256 * Math.pow(2, z), center = pxCenter(), l = pointLocation(center); + scale = Math.max(1024, Math.min(256 * Math.pow(2, 24), scale)); projection.scale(scale); zoom.scale(projection.scale()); var t = projection.translate();