Skip to content

Commit

Permalink
Test for less#192 to keep it closed
Browse files Browse the repository at this point in the history
  • Loading branch information
tmcw committed Sep 29, 2012
1 parent afdac4b commit 3d216f6
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 0 deletions.
14 changes: 14 additions & 0 deletions test/rendering/instance_names.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": [
"instance_names.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"
}
}]
}
15 changes: 15 additions & 0 deletions test/rendering/instance_names.mss
@@ -0,0 +1,15 @@
#world[zoom >= 13] {
center/line-width: 1;
center/line-color: black;
}

#world[zoom >= 14] {
center/line-width: 5;
center/line-color: blue;
}

#world[highway='primary'][zoom >= 14] {
dash/line-color: red;
dash/line-width: 15;
dash/line-dasharray: 5,15;
}
38 changes: 38 additions & 0 deletions test/rendering/instance_names.result
@@ -0,0 +1,38 @@
<?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.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over" maximum-extent="-20037508.34,-20037508.34,20037508.34,20037508.34">


<Style name="world" filter-mode="first" >
<Rule>
<MaxScaleDenominator>50000</MaxScaleDenominator>
<Filter>([highway] = 'primary')</Filter>
<LineSymbolizer stroke-width="5" stroke="#0000ff" />
<LineSymbolizer stroke="#ff0000" stroke-width="15" stroke-dasharray="5, 15" />
</Rule>
<Rule>
<MaxScaleDenominator>100000</MaxScaleDenominator>
<MinScaleDenominator>50000</MinScaleDenominator>
<Filter>([highway] = 'primary')</Filter>
<LineSymbolizer stroke-width="1" stroke="#000000" />
</Rule>
<Rule>
<MaxScaleDenominator>50000</MaxScaleDenominator>
<LineSymbolizer stroke-width="5" stroke="#0000ff" />
</Rule>
<Rule>
<MaxScaleDenominator>100000</MaxScaleDenominator>
<MinScaleDenominator>50000</MinScaleDenominator>
<LineSymbolizer stroke-width="1" stroke="#000000" />
</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.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over">
<StyleName>world</StyleName>
<Datasource>
<Parameter name="file"><![CDATA[[absolute path]]]></Parameter>
<Parameter name="type"><![CDATA[shape]]></Parameter>
</Datasource>
</Layer>

</Map>

0 comments on commit 3d216f6

Please sign in to comment.