Remove throw in zoom evaluation

This commit is contained in:
Tom MacWright 2013-01-03 13:20:49 -05:00
parent d97286de57
commit ece3eb3b0e
4 changed files with 22 additions and 3 deletions

View File

@ -21,11 +21,11 @@ tree.Zoom.prototype.eval = function(env) {
zoom = 0; zoom = 0;
if (value > tree.Zoom.maxZoom || value < 0) { if (value > tree.Zoom.maxZoom || value < 0) {
throw { env.error({
message: 'Only zoom levels between 0 and ' + message: 'Only zoom levels between 0 and ' +
tree.Zoom.maxZoom + ' supported.', tree.Zoom.maxZoom + ' supported.',
index: index index: this.index
}; });
} }
switch (this.op) { switch (this.op) {

View File

@ -0,0 +1,15 @@
{
"srs": "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over",
"Stylesheet": [
"zoommax.mss"
],
"Layer": [{
"id": "world",
"name": "world",
"srs": "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over",
"Datasource": {
"file": "http://tilemill-data.s3.amazonaws.com/test_data/shape_demo.zip",
"type": "shape"
}
}]
}

View File

@ -0,0 +1,3 @@
#world[zoom > 40] {
polygon-fill: #fff;
}

View File

@ -0,0 +1 @@
zoommax.mss:1:6 Only zoom levels between 0 and 22 supported.