diff --git a/lib/carto/tree/reference.js b/lib/carto/tree/reference.js index a10fa8f..9c69d98 100644 --- a/lib/carto/tree/reference.js +++ b/lib/carto/tree/reference.js @@ -165,6 +165,9 @@ ref.validValue = function(env, selector, value) { return true; } else if (ref.selector(selector).type == 'tags') { if (!value.value) return false; + if (!value.value[0].value) { + return value.value[0].is === 'tag'; + } for (i = 0; i < value.value[0].value.length; i++) { if (value.value[0].value[i].is !== 'tag') return false; } diff --git a/test/rendering/raster_colorizer_onestop.mml b/test/rendering/raster_colorizer_onestop.mml new file mode 100644 index 0000000..b99cdd7 --- /dev/null +++ b/test/rendering/raster_colorizer_onestop.mml @@ -0,0 +1,14 @@ +{ + "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": [ + "raster_colorizer_onestop.mss" + ], + "Layer": [{ + "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" + } + }] +} diff --git a/test/rendering/raster_colorizer_onestop.mss b/test/rendering/raster_colorizer_onestop.mss new file mode 100644 index 0000000..e8156ad --- /dev/null +++ b/test/rendering/raster_colorizer_onestop.mss @@ -0,0 +1,7 @@ +#world { + raster-opacity:1; + raster-scaling:bilinear; + raster-colorizer-default-mode: linear; + raster-colorizer-default-color: transparent; + raster-colorizer-stops: stop(0,#000); +} diff --git a/test/rendering/raster_colorizer_onestop.result b/test/rendering/raster_colorizer_onestop.result new file mode 100644 index 0000000..651c037 --- /dev/null +++ b/test/rendering/raster_colorizer_onestop.result @@ -0,0 +1,21 @@ + + + + + + + + world + + + + + + + diff --git a/test/rendering/transforms_single.mml b/test/rendering/transforms_single.mml new file mode 100644 index 0000000..b3eae98 --- /dev/null +++ b/test/rendering/transforms_single.mml @@ -0,0 +1,14 @@ +{ + "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": [ + "transforms_single.mss" + ], + "Layer": [{ + "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" + } + }] +} diff --git a/test/rendering/transforms_single.mss b/test/rendering/transforms_single.mss new file mode 100644 index 0000000..6b4d81f --- /dev/null +++ b/test/rendering/transforms_single.mss @@ -0,0 +1,3 @@ +#world { + point-transform: scale(2, 2); +} diff --git a/test/rendering/transforms_single.result b/test/rendering/transforms_single.result new file mode 100644 index 0000000..0f8a790 --- /dev/null +++ b/test/rendering/transforms_single.result @@ -0,0 +1,20 @@ + + + + + + + + world + + + + + + +