Restrict zoom to scaleExtent

This commit is contained in:
Tom MacWright
2012-12-12 16:32:40 -05:00
parent d75e713366
commit 3cbf3739c0
+1
View File
@@ -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();