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});
|
env = _(env).extend({filename:s.id});
|
||||||
|
|
||||||
// @TODO try/catch?
|
// @TODO try/catch?
|
||||||
var time = +new Date();
|
var time = +new Date(),
|
||||||
var parsed = (carto.Parser(env)).parse(s.data);
|
parsed = (carto.Parser(env)).parse(s.data);
|
||||||
if (env.benchmark)
|
if (env.benchmark)
|
||||||
console.warn('Parsing time: ' + ((new Date() - time)) + 'ms');
|
console.warn('Parsing time: ' + ((new Date() - time)) + 'ms');
|
||||||
return parsed.toList(env);
|
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": [
|
"Stylesheet": [
|
||||||
"complex_cascades.mss"
|
"complex_cascades.mss"
|
||||||
],
|
],
|
||||||
"Layer": [{
|
"Layer": [{
|
||||||
"name": "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 +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": {
|
"Datasource": {
|
||||||
"file": "http://tilemill-data.s3.amazonaws.com/test_data/shape_demo.zip",
|
"file": "http://tilemill-data.s3.amazonaws.com/test_data/shape_demo.zip",
|
||||||
"type": "shape"
|
"type": "shape"
|
||||||
@ -14,7 +14,7 @@
|
|||||||
{
|
{
|
||||||
"class": "new",
|
"class": "new",
|
||||||
"name": "countries",
|
"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": {
|
"Datasource": {
|
||||||
"file": "http://tilemill-data.s3.amazonaws.com/test_data/shape_demo.zip",
|
"file": "http://tilemill-data.s3.amazonaws.com/test_data/shape_demo.zip",
|
||||||
"type": "shape"
|
"type": "shape"
|
||||||
|
@ -1,19 +1,20 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<!DOCTYPE Map[]>
|
<!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">
|
<Style name="world" filter-mode="first">
|
||||||
<Rule>
|
<Rule>
|
||||||
<MaxScaleDenominator>12500000</MaxScaleDenominator>
|
<MaxScaleDenominator>12500000</MaxScaleDenominator>
|
||||||
<Filter>([NAME] = 'United States')</Filter>
|
<Filter>([NAME] = 'United States')</Filter>
|
||||||
<PolygonSymbolizer fill="#666666"/>
|
|
||||||
<LineSymbolizer stroke="#ff0000" stroke-width="0.5" />
|
<LineSymbolizer stroke="#ff0000" stroke-width="0.5" />
|
||||||
|
<PolygonSymbolizer fill="#666666" />
|
||||||
</Rule>
|
</Rule>
|
||||||
<Rule>
|
<Rule>
|
||||||
<MinScaleDenominator>12500000</MinScaleDenominator>
|
<MinScaleDenominator>12500000</MinScaleDenominator>
|
||||||
<Filter>([NAME] = 'United States')</Filter>
|
<Filter>([NAME] = 'United States')</Filter>
|
||||||
<PolygonSymbolizer fill="#cccccc"/>
|
|
||||||
<LineSymbolizer stroke="#ff0000" stroke-width="0.5" />
|
<LineSymbolizer stroke="#ff0000" stroke-width="0.5" />
|
||||||
|
<PolygonSymbolizer fill="#cccccc" />
|
||||||
</Rule>
|
</Rule>
|
||||||
<Rule>
|
<Rule>
|
||||||
<Filter>([NAME] = 'Canada')</Filter>
|
<Filter>([NAME] = 'Canada')</Filter>
|
||||||
@ -25,13 +26,12 @@
|
|||||||
<LineSymbolizer stroke="#ff0000" stroke-width="0.5" />
|
<LineSymbolizer stroke="#ff0000" stroke-width="0.5" />
|
||||||
</Rule>
|
</Rule>
|
||||||
</Style>
|
</Style>
|
||||||
<Layer
|
<Layer name="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">
|
||||||
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">
|
|
||||||
<StyleName>world</StyleName>
|
<StyleName>world</StyleName>
|
||||||
<Datasource>
|
<Datasource>
|
||||||
<Parameter name="file">[absolute path]</Parameter>
|
<Parameter name="file"><![CDATA[[absolute path]]]></Parameter>
|
||||||
<Parameter name="type">shape</Parameter>
|
<Parameter name="type"><![CDATA[shape]]></Parameter>
|
||||||
</Datasource>
|
</Datasource>
|
||||||
</Layer>
|
</Layer>
|
||||||
|
|
||||||
@ -39,8 +39,8 @@
|
|||||||
<Rule>
|
<Rule>
|
||||||
<MaxScaleDenominator>12500000</MaxScaleDenominator>
|
<MaxScaleDenominator>12500000</MaxScaleDenominator>
|
||||||
<Filter>([NAME] = 'United States')</Filter>
|
<Filter>([NAME] = 'United States')</Filter>
|
||||||
<PolygonSymbolizer fill="#aaffcc" />
|
|
||||||
<LineSymbolizer stroke-width="0.5" stroke="#cccccc" />
|
<LineSymbolizer stroke-width="0.5" stroke="#cccccc" />
|
||||||
|
<PolygonSymbolizer fill="#aaffcc" />
|
||||||
</Rule>
|
</Rule>
|
||||||
<Rule>
|
<Rule>
|
||||||
<MinScaleDenominator>12500000</MinScaleDenominator>
|
<MinScaleDenominator>12500000</MinScaleDenominator>
|
||||||
@ -50,8 +50,8 @@
|
|||||||
</Rule>
|
</Rule>
|
||||||
<Rule>
|
<Rule>
|
||||||
<MaxScaleDenominator>12500000</MaxScaleDenominator>
|
<MaxScaleDenominator>12500000</MaxScaleDenominator>
|
||||||
<LineSymbolizer stroke-width="0.5" stroke="#cccccc" />
|
|
||||||
<PolygonSymbolizer fill="#eeeeee" />
|
<PolygonSymbolizer fill="#eeeeee" />
|
||||||
|
<LineSymbolizer stroke-width="0.5" stroke="#cccccc" />
|
||||||
</Rule>
|
</Rule>
|
||||||
<Rule>
|
<Rule>
|
||||||
<MinScaleDenominator>12500000</MinScaleDenominator>
|
<MinScaleDenominator>12500000</MinScaleDenominator>
|
||||||
@ -59,14 +59,12 @@
|
|||||||
<LineSymbolizer stroke="#cccccc" stroke-width="1" />
|
<LineSymbolizer stroke="#cccccc" stroke-width="1" />
|
||||||
</Rule>
|
</Rule>
|
||||||
</Style>
|
</Style>
|
||||||
|
<Layer name="countries"
|
||||||
<Layer
|
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">
|
||||||
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">
|
|
||||||
<StyleName>countries</StyleName>
|
<StyleName>countries</StyleName>
|
||||||
<Datasource>
|
<Datasource>
|
||||||
<Parameter name="file">[absolute path]</Parameter>
|
<Parameter name="file"><![CDATA[[absolute path]]]></Parameter>
|
||||||
<Parameter name="type">shape</Parameter>
|
<Parameter name="type"><![CDATA[shape]]></Parameter>
|
||||||
</Datasource>
|
</Datasource>
|
||||||
</Layer>
|
</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": [
|
"Stylesheet": [
|
||||||
"filters.mss"
|
"filters.mss"
|
||||||
],
|
],
|
||||||
"Layer": [{
|
"Layer": [{
|
||||||
"name": "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 +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": {
|
"Datasource": {
|
||||||
"file": "http://tilemill-data.s3.amazonaws.com/test_data/shape_demo.zip",
|
"file": "http://tilemill-data.s3.amazonaws.com/test_data/shape_demo.zip",
|
||||||
"type": "shape"
|
"type": "shape"
|
||||||
|
@ -1,23 +1,21 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<!DOCTYPE Map[]>
|
<!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">
|
<Style name="world" filter-mode="first">
|
||||||
<Rule>
|
<Rule>
|
||||||
<Filter>([POP2005] > 100.1)</Filter>
|
<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>
|
</Rule>
|
||||||
</Style>
|
</Style>
|
||||||
<Layer
|
<Layer name="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">
|
||||||
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">
|
|
||||||
<StyleName>world</StyleName>
|
<StyleName>world</StyleName>
|
||||||
<Datasource>
|
<Datasource>
|
||||||
<Parameter name="file">[absolute path]</Parameter>
|
<Parameter name="file"><![CDATA[[absolute path]]]></Parameter>
|
||||||
<Parameter name="type">shape</Parameter>
|
<Parameter name="type"><![CDATA[shape]]></Parameter>
|
||||||
</Datasource>
|
</Datasource>
|
||||||
</Layer>
|
</Layer>
|
||||||
|
|
||||||
|
@ -5,12 +5,11 @@
|
|||||||
|
|
||||||
<Style name="ab" filter-mode="first">
|
<Style name="ab" filter-mode="first">
|
||||||
<Rule>
|
<Rule>
|
||||||
<LineSymbolizer stroke="#00ff00" />
|
|
||||||
<PolygonSymbolizer fill="#ff0000" />
|
<PolygonSymbolizer fill="#ff0000" />
|
||||||
|
<LineSymbolizer stroke="#00ff00" />
|
||||||
</Rule>
|
</Rule>
|
||||||
</Style>
|
</Style>
|
||||||
<Layer
|
<Layer name="ab"
|
||||||
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">
|
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>
|
<StyleName>ab</StyleName>
|
||||||
<Datasource>
|
<Datasource>
|
||||||
@ -21,12 +20,11 @@
|
|||||||
|
|
||||||
<Style name="bc" filter-mode="first">
|
<Style name="bc" filter-mode="first">
|
||||||
<Rule>
|
<Rule>
|
||||||
<MarkersSymbolizer fill="#0000ff" />
|
|
||||||
<LineSymbolizer stroke="#00ff00" />
|
<LineSymbolizer stroke="#00ff00" />
|
||||||
|
<MarkersSymbolizer fill="#0000ff" />
|
||||||
</Rule>
|
</Rule>
|
||||||
</Style>
|
</Style>
|
||||||
<Layer
|
<Layer name="bc"
|
||||||
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">
|
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>
|
<StyleName>bc</StyleName>
|
||||||
<Datasource>
|
<Datasource>
|
||||||
|
Loading…
Reference in New Issue
Block a user