Skip to content

Instantly share code, notes, and snippets.

@talaj
Last active August 29, 2015 14:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save talaj/8458222159f55b4afb0e to your computer and use it in GitHub Desktop.
Save talaj/8458222159f55b4afb0e to your computer and use it in GitHub Desktop.
parameter binding
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE Map [
<!ENTITY scale_factor "1.33">
]>
<Map>
<Style name="lines">
<Rule>
<LineSymbolizer
stroke-width="[stroke_width]"
stroke="yellow"
offset="[offset]"
/>
</Rule>
</Style>
<Style name="texts">
<Rule>
<TextSymbolizer
allow-overlap="true"
placement="line"
spacing="10"
max-char-angle-delta="120"
face-name="DejaVu Sans Book"
size="[size] * &scale_factor;"
horizontal-alignment="middle"
dx="[dx]"
dy="[dy]"
>"Stockholmgata"</TextSymbolizer>
</Rule>
</Style>
<Style name="markers">
<Rule>
<MarkersSymbolizer
marker-type="ellipse"
placement="line"
transform= "scale([scale]) translate([translate])"
/>
</Rule>
</Style>
<Layer name="layer">
<StyleName>lines</StyleName>
<StyleName>texts</StyleName>
<StyleName>markers</StyleName>
<Datasource>
<Parameter name="type">csv</Parameter>
<Parameter name="inline">
wkt, size, stroke_width, offset, dy, dx, scale, translate
"LINESTRING(0 0, 1 0, 1 1, 2 1, 2 2, 3 2, 3 3, 4 3, 4 4, 5 4, 5 5, 6 5, 6 6, 7 6, 7 7, 8 7, 8 8, 9 8, 9 9, 10 9, 10 10)", 13.5, 5.5, 50.5, 20.5, 10.0, 3.33, 13 15
</Parameter>
</Datasource>
</Layer>
</Map>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment