mapnik/tests/visual_tests/styles/group-symbolizer-line-1.xml
Matt Amos f8097748a4 Added more tests for group symbolizer.
The first test shows how an obstacle under the group being displayed
will cause the whole group to not display. Above is an replica of
the same layout using non-grouped symbolizers, which shows that
only the parts which intersect the obstacle will not be drawn.

The second is a line placement test, which just tests placement
of groups on a line with variable spacing.

The third is a test of repeat key in group symbolizer.
The test shows two items with different repeat keys ("foo" and "bar")
and rows of other group symbolizers sensitive to either one. The
reference images show that the "bar"-sensitive rows are displaced
by the "bar" item, but not the "foo" item.
2014-02-18 15:06:40 -05:00

82 lines
3.2 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- Without unlock-image -->
<!DOCTYPE Map>
<Map background-color="green" srs="+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs" minimum-version="2.0.0">
<Layer name="alpha" srs="+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs">
<StyleName>alpha</StyleName>
<Datasource>
<Parameter name="type">csv</Parameter>
<Parameter name="inline">
wkt,name1,ref1,name2,ref2
"LINESTRING(0 0, 10 2)",One,1,Two,2
</Parameter>
</Datasource>
</Layer>
<Style name="alpha">
<Rule>
<LineSymbolizer stroke-width="0.2" stroke="#ff0000"/>
<GroupSymbolizer start-column="1" num-columns="2" placement="line" avoid-edges="false" minimum-distance="50" spacing="100" repeat-key="[name%]+'-'+[ref%]">
<PairLayout item-margin="1"/>
<GroupRule>
<PointSymbolizer file="../../data/svg/rect.svg"/>
<TextSymbolizer face-name="DejaVu Sans Book" size="16" placement="point" dy="10">[name%]</TextSymbolizer>
<TextSymbolizer face-name="DejaVu Sans Book" size="16" placement="point" dy="0" fill="#ffffff">[ref%]</TextSymbolizer>
</GroupRule>
</GroupSymbolizer>
</Rule>
</Style>
<Layer name="beta" srs="+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs">
<StyleName>beta</StyleName>
<Datasource>
<Parameter name="type">csv</Parameter>
<Parameter name="inline">
wkt,name1,ref1,name2,ref2
"LINESTRING(0 3, 10 5)",One,1,Two,2
</Parameter>
</Datasource>
</Layer>
<Style name="beta">
<Rule>
<LineSymbolizer stroke-width="0.2" stroke="#ff0000"/>
<GroupSymbolizer start-column="1" num-columns="2" placement="line" avoid-edges="false" minimum-distance="40" spacing="80" repeat-key="[name%]+'-'+[ref%]">
<PairLayout item-margin="1"/>
<GroupRule>
<PointSymbolizer file="../../data/svg/rect.svg"/>
<TextSymbolizer face-name="DejaVu Sans Book" size="16" placement="point" dy="10">[name%]</TextSymbolizer>
<TextSymbolizer face-name="DejaVu Sans Book" size="16" placement="point" dy="0" fill="#ffffff">[ref%]</TextSymbolizer>
</GroupRule>
</GroupSymbolizer>
</Rule>
</Style>
<Layer name="gamma" srs="+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs">
<StyleName>gamma</StyleName>
<Datasource>
<Parameter name="type">csv</Parameter>
<Parameter name="inline">
wkt,name1,ref1,name2,ref2
"LINESTRING(0 6, 10 8)",One,1,Two,2
</Parameter>
</Datasource>
</Layer>
<Style name="gamma">
<Rule>
<LineSymbolizer stroke-width="0.2" stroke="#ff0000"/>
<GroupSymbolizer start-column="1" num-columns="2" placement="line" avoid-edges="false" minimum-distance="30" spacing="60" repeat-key="[name%]+'-'+[ref%]">
<PairLayout item-margin="1"/>
<GroupRule>
<PointSymbolizer file="../../data/svg/rect.svg"/>
<TextSymbolizer face-name="DejaVu Sans Book" size="16" placement="point" dy="10">[name%]</TextSymbolizer>
<TextSymbolizer face-name="DejaVu Sans Book" size="16" placement="point" dy="0" fill="#ffffff">[ref%]</TextSymbolizer>
</GroupRule>
</GroupSymbolizer>
<DebugSymbolizer/>
</Rule>
</Style>
</Map>