Remove throw in zoom evaluation
This commit is contained in:
parent
d97286de57
commit
ece3eb3b0e
@ -21,11 +21,11 @@ tree.Zoom.prototype.eval = function(env) {
|
||||
zoom = 0;
|
||||
|
||||
if (value > tree.Zoom.maxZoom || value < 0) {
|
||||
throw {
|
||||
env.error({
|
||||
message: 'Only zoom levels between 0 and ' +
|
||||
tree.Zoom.maxZoom + ' supported.',
|
||||
index: index
|
||||
};
|
||||
index: this.index
|
||||
});
|
||||
}
|
||||
|
||||
switch (this.op) {
|
||||
|
15
test/errorhandling/zoommax.mml
Normal file
15
test/errorhandling/zoommax.mml
Normal 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"
|
||||
}
|
||||
}]
|
||||
}
|
3
test/errorhandling/zoommax.mss
Normal file
3
test/errorhandling/zoommax.mss
Normal file
@ -0,0 +1,3 @@
|
||||
#world[zoom > 40] {
|
||||
polygon-fill: #fff;
|
||||
}
|
1
test/errorhandling/zoommax.result
Normal file
1
test/errorhandling/zoommax.result
Normal file
@ -0,0 +1 @@
|
||||
zoommax.mss:1:6 Only zoom levels between 0 and 22 supported.
|
Loading…
Reference in New Issue
Block a user