Updated ShieldSymbolizer (markdown)
parent
65c625f60d
commit
d36adc521e
1 changed files with 8 additions and 7 deletions
|
@ -69,27 +69,27 @@ http://groups.google.com/group/cugos/browse_thread/thread/b62b4890e1933bba
|
||||||
#### XML
|
#### XML
|
||||||
|
|
||||||
|
|
||||||
#!xml
|
```xml
|
||||||
<Style name="My Style">
|
<Style name="My Style">
|
||||||
<Rule>
|
<Rule>
|
||||||
<ShieldSymbolizer name="NAME" face-name="DejaVu Sans Bold" size="6" fill="#000000" file="images/ushighway_shield_20.png" type="png" width="20" height="20" spacing="100" min-distance="50"></ShieldSymbolizer>
|
<ShieldSymbolizer name="NAME" face-name="DejaVu Sans Bold" size="6" fill="#000000" file="images/ushighway_shield_20.png" type="png" width="20" height="20" spacing="100" min-distance="50"></ShieldSymbolizer>
|
||||||
</Rule>
|
</Rule>
|
||||||
</Style>
|
</Style>
|
||||||
|
```
|
||||||
|
|
||||||
#### Python
|
#### Python
|
||||||
|
|
||||||
|
```python
|
||||||
#!python
|
|
||||||
shield = ShieldSymbolizer('NAME','DejaVu Sans Bold',6,Color('#000000'),'images/ushighway_shield_20.png','png',20,20)
|
shield = ShieldSymbolizer('NAME','DejaVu Sans Bold',6,Color('#000000'),'images/ushighway_shield_20.png','png',20,20)
|
||||||
# parameters are: (name, font name, font size, font color, image file, image type, width, height)
|
# parameters are: (name, font name, font size, font color, image file, image type, width, height)
|
||||||
shield.min_distance = 50
|
shield.min_distance = 50
|
||||||
shield.label_spacing = 100
|
shield.label_spacing = 100
|
||||||
shield.displacement(dx,dy)
|
shield.displacement(dx,dy)
|
||||||
|
```
|
||||||
|
|
||||||
#### C++
|
#### C++
|
||||||
|
|
||||||
|
```cpp
|
||||||
#!cpp
|
|
||||||
rule_type rule;
|
rule_type rule;
|
||||||
/* Parameters:
|
/* Parameters:
|
||||||
name
|
name
|
||||||
|
@ -106,18 +106,19 @@ http://groups.google.com/group/cugos/browse_thread/thread/b62b4890e1933bba
|
||||||
ss.set_displacement(dx, dy);
|
ss.set_displacement(dx, dy);
|
||||||
ss.set_label_spacing(min_distance);
|
ss.set_label_spacing(min_distance);
|
||||||
rule.append(ss);
|
rule.append(ss);
|
||||||
|
```
|
||||||
|
|
||||||
## SVG shields
|
## SVG shields
|
||||||
|
|
||||||
[[/images/shield_symbolizer_svg.png]]
|
[[/images/shield_symbolizer_svg.png]]
|
||||||
|
|
||||||
|
```xml
|
||||||
#!xml
|
|
||||||
<Style name="My Style">
|
<Style name="My Style">
|
||||||
<Rule>
|
<Rule>
|
||||||
<ShieldSymbolizer name="'ABC'" fontset-name="bold-fonts" size="10" fill="green" placement="line" file="/Users/artem/Desktop/svg/shield.svg" transform="scale(2.0,2.0)" min-distance="100" spacing="250"/>
|
<ShieldSymbolizer name="'ABC'" fontset-name="bold-fonts" size="10" fill="green" placement="line" file="/Users/artem/Desktop/svg/shield.svg" transform="scale(2.0,2.0)" min-distance="100" spacing="250"/>
|
||||||
</Rule>
|
</Rule>
|
||||||
</Style>
|
</Style>
|
||||||
|
```
|
||||||
|
|
||||||
== Resources ==
|
== Resources ==
|
||||||
* http://www.routemarkers.com/
|
* http://www.routemarkers.com/
|
||||||
|
|
Loading…
Reference in a new issue