Updating tests to deal with correct symbolizer order. Fixes #60
This commit is contained in:
parent
42e3260386
commit
73ab87dcce
@ -30,8 +30,8 @@ carto.Renderer.prototype.render = function render(m, callback) {
|
||||
env = _(env).extend({filename:s.id});
|
||||
|
||||
// @TODO try/catch?
|
||||
var time = +new Date();
|
||||
var parsed = (carto.Parser(env)).parse(s.data);
|
||||
var time = +new Date(),
|
||||
parsed = (carto.Parser(env)).parse(s.data);
|
||||
if (env.benchmark)
|
||||
console.warn('Parsing time: ' + ((new Date() - time)) + 'ms');
|
||||
return parsed.toList(env);
|
||||
|
@ -1,11 +1,11 @@
|
||||
{
|
||||
"srs": "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over",
|
||||
"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": [
|
||||
"complex_cascades.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 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over",
|
||||
"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"
|
||||
@ -14,7 +14,7 @@
|
||||
{
|
||||
"class": "new",
|
||||
"name": "countries",
|
||||
"srs": "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over",
|
||||
"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"
|
||||
|
@ -1,37 +1,37 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE Map[]>
|
||||
<Map srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over">
|
||||
<Map 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">
|
||||
|
||||
|
||||
<Style name="world" filter-mode="first">
|
||||
<Rule>
|
||||
<MaxScaleDenominator>12500000</MaxScaleDenominator>
|
||||
<Filter>([NAME] = 'United States')</Filter>
|
||||
<PolygonSymbolizer fill="#666666"/>
|
||||
<LineSymbolizer stroke="#ff0000" stroke-width="0.5" />
|
||||
<PolygonSymbolizer fill="#666666" />
|
||||
</Rule>
|
||||
<Rule>
|
||||
<MinScaleDenominator>12500000</MinScaleDenominator>
|
||||
<Filter>([NAME] = 'United States')</Filter>
|
||||
<PolygonSymbolizer fill="#cccccc"/>
|
||||
<LineSymbolizer stroke="#ff0000" stroke-width="0.5" />
|
||||
<PolygonSymbolizer fill="#cccccc" />
|
||||
</Rule>
|
||||
<Rule>
|
||||
<Filter>([NAME] = 'Canada')</Filter>
|
||||
<PolygonSymbolizer fill="#eeeeee"/>
|
||||
<PolygonSymbolizer fill="#eeeeee" />
|
||||
<LineSymbolizer stroke="#cccccc" stroke-width="1" />
|
||||
</Rule>
|
||||
<Rule>
|
||||
<PolygonSymbolizer fill="#ffffff"/>
|
||||
<PolygonSymbolizer fill="#ffffff" />
|
||||
<LineSymbolizer stroke="#ff0000" stroke-width="0.5" />
|
||||
</Rule>
|
||||
</Style>
|
||||
<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 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over">
|
||||
<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">
|
||||
<StyleName>world</StyleName>
|
||||
<Datasource>
|
||||
<Parameter name="file">[absolute path]</Parameter>
|
||||
<Parameter name="type">shape</Parameter>
|
||||
<Parameter name="file"><![CDATA[[absolute path]]]></Parameter>
|
||||
<Parameter name="type"><![CDATA[shape]]></Parameter>
|
||||
</Datasource>
|
||||
</Layer>
|
||||
|
||||
@ -39,8 +39,8 @@
|
||||
<Rule>
|
||||
<MaxScaleDenominator>12500000</MaxScaleDenominator>
|
||||
<Filter>([NAME] = 'United States')</Filter>
|
||||
<PolygonSymbolizer fill="#aaffcc" />
|
||||
<LineSymbolizer stroke-width="0.5" stroke="#cccccc" />
|
||||
<PolygonSymbolizer fill="#aaffcc" />
|
||||
</Rule>
|
||||
<Rule>
|
||||
<MinScaleDenominator>12500000</MinScaleDenominator>
|
||||
@ -50,8 +50,8 @@
|
||||
</Rule>
|
||||
<Rule>
|
||||
<MaxScaleDenominator>12500000</MaxScaleDenominator>
|
||||
<LineSymbolizer stroke-width="0.5" stroke="#cccccc" />
|
||||
<PolygonSymbolizer fill="#eeeeee" />
|
||||
<LineSymbolizer stroke-width="0.5" stroke="#cccccc" />
|
||||
</Rule>
|
||||
<Rule>
|
||||
<MinScaleDenominator>12500000</MinScaleDenominator>
|
||||
@ -59,14 +59,12 @@
|
||||
<LineSymbolizer stroke="#cccccc" stroke-width="1" />
|
||||
</Rule>
|
||||
</Style>
|
||||
|
||||
<Layer
|
||||
name="countries"
|
||||
srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over">
|
||||
<Layer name="countries"
|
||||
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">
|
||||
<StyleName>countries</StyleName>
|
||||
<Datasource>
|
||||
<Parameter name="file">[absolute path]</Parameter>
|
||||
<Parameter name="type">shape</Parameter>
|
||||
<Parameter name="file"><![CDATA[[absolute path]]]></Parameter>
|
||||
<Parameter name="type"><![CDATA[shape]]></Parameter>
|
||||
</Datasource>
|
||||
</Layer>
|
||||
|
||||
|
@ -1,11 +1,11 @@
|
||||
{
|
||||
"srs": "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over",
|
||||
"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": [
|
||||
"filters.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 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over",
|
||||
"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"
|
||||
|
@ -1,23 +1,21 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE Map[]>
|
||||
<Map srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over">
|
||||
<Map 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">
|
||||
|
||||
|
||||
<Style name="world" filter-mode="first">
|
||||
<Rule>
|
||||
<Filter>([POP2005] > 100.1)</Filter>
|
||||
<LineSymbolizer stroke-width="0.5"
|
||||
stroke="#ff0000"/>
|
||||
<PolygonSymbolizer fill="#ffffff"/>
|
||||
<PolygonSymbolizer fill="#ffffff" />
|
||||
<LineSymbolizer stroke="#ff0000" stroke-width="0.5" />
|
||||
</Rule>
|
||||
</Style>
|
||||
<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 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over">
|
||||
<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">
|
||||
<StyleName>world</StyleName>
|
||||
<Datasource>
|
||||
<Parameter name="file">[absolute path]</Parameter>
|
||||
<Parameter name="type">shape</Parameter>
|
||||
<Parameter name="file"><![CDATA[[absolute path]]]></Parameter>
|
||||
<Parameter name="type"><![CDATA[shape]]></Parameter>
|
||||
</Datasource>
|
||||
</Layer>
|
||||
|
||||
|
@ -5,12 +5,11 @@
|
||||
|
||||
<Style name="ab" filter-mode="first">
|
||||
<Rule>
|
||||
<LineSymbolizer stroke="#00ff00" />
|
||||
<PolygonSymbolizer fill="#ff0000" />
|
||||
<LineSymbolizer stroke="#00ff00" />
|
||||
</Rule>
|
||||
</Style>
|
||||
<Layer
|
||||
name="ab"
|
||||
<Layer name="ab"
|
||||
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">
|
||||
<StyleName>ab</StyleName>
|
||||
<Datasource>
|
||||
@ -21,12 +20,11 @@
|
||||
|
||||
<Style name="bc" filter-mode="first">
|
||||
<Rule>
|
||||
<MarkersSymbolizer fill="#0000ff" />
|
||||
<LineSymbolizer stroke="#00ff00" />
|
||||
<MarkersSymbolizer fill="#0000ff" />
|
||||
</Rule>
|
||||
</Style>
|
||||
<Layer
|
||||
name="bc"
|
||||
<Layer name="bc"
|
||||
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">
|
||||
<StyleName>bc</StyleName>
|
||||
<Datasource>
|
||||
|
Loading…
Reference in New Issue
Block a user