Add full set of tests for text placement.

This commit is contained in:
Hermann Kraus 2012-01-20 00:18:37 +01:00
parent e977df778a
commit a1c80d1a4c
21 changed files with 94 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

View file

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE Map>
<Map background-color="white" srs="+proj=latlong +datum=WGS84">
<Layer name="layer" srs="+proj=latlong +datum=WGS84">
<StyleName>My Style</StyleName>
<Datasource>
<!--
<Parameter name="type">osm</Parameter>
<Parameter name="file">points.osm</Parameter>-->
<Parameter name="type">shape</Parameter>
<Parameter name="file">points.shp</Parameter>
</Datasource>
</Layer>
<Style name="My Style">
<Rule>
<PointSymbolizer/>
<TextSymbolizer face-name="DejaVu Sans Book" size="16" placement="point" dy="8" fill="blue" placement-type="list">[name]
<Placement size="10" dy="-8" fill="red"/>
<Placement fill="green">'S'+[nr]</Placement>
<Placement fill="orange" dy="8">[nr]</Placement>
</TextSymbolizer>
</Rule>
</Style>
</Map>

Binary file not shown.

View file

@ -0,0 +1,43 @@
<?xml version='1.0' encoding='UTF-8'?>
<osm version='0.6' generator='JOSM'>
<node id='-1' lat='0' lon='0'>
<tag k='name' v='Test one' />
<tag k='nr' v='1' />
</node>
<node id='-2' lat='0' lon='0.1'>
<tag k='name' v='Test two' />
<tag k='nr' v='2' />
</node>
<node id='-3' lat='0' lon='0.2'>
<tag k='name' v='Test three' />
<tag k='nr' v='3' />
</node>
<node id='-4' lat='0' lon='0.3'>
<tag k='name' v='Test four' />
<tag k='nr' v='4' />
</node>
<node id='-5' lat='0' lon='0.4'>
<tag k='name' v='Test five' />
<tag k='nr' v='5' />
</node>
<node id='-6' lat='0' lon='0.5'>
<tag k='name' v='Test six' />
<tag k='nr' v='6' />
</node>
<node id='-7' lat='0' lon='0.6'>
<tag k='name' v='Test seven' />
<tag k='nr' v='7' />
</node>
<node id='-8' lat='0' lon='0.7'>
<tag k='name' v='Test eight' />
<tag k='nr' v='8' />
</node>
<node id='-9' lat='0' lon='0.8'>
<tag k='name' v='Test nine' />
<tag k='nr' v='9' />
</node>
<node id='-10' lat='0' lon='0.9'>
<tag k='name' v='Test ten' />
<tag k='nr' v='10' />
</node>
</osm>

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

View file

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE Map>
<Map background-color="white" srs="+proj=latlong +datum=WGS84">
<Layer name="layer" srs="+proj=latlong +datum=WGS84">
<StyleName>My Style</StyleName>
<Datasource>
<!--
<Parameter name="type">osm</Parameter>
<Parameter name="file">points.osm</Parameter>
-->
<Parameter name="type">shape</Parameter>
<Parameter name="file">points.shp</Parameter>
</Datasource>
</Layer>
<Style name="My Style">
<Rule>
<PointSymbolizer/>
<TextSymbolizer face-name="DejaVu Sans Book" size="16" placement="point" dx="5" dy="16" placement-type="simple" placements="N,S,E,W,SW,10,5">[name]</TextSymbolizer>
</Rule>
</Style>
</Map>