6.8.4.1. Map styles examples
6.8.4.1.1. Polygon layer with scale range and labels
<map>
<layer>
<labelitem>a_hsnmbr</labelitem>
<class>
<style>
<color red="255" green="170" blue="127"/>
<outlinecolor red="106" green="106" blue="106"/>
<width>0.425196850394</width>
<maxscaledenom>10000</maxscaledenom> <!-- Scale limit -->
</style>
<label>
<type>truetype</type>
<font>regular</font>
<size>8.25</size>
<color blue="0" green="0" red="0"/>
<outlinewidth>3</outlinewidth>
<outlinecolor blue="255" green="255" red="255"/>
<position>ur</position>
<maxscaledenom>10000</maxscaledenom>
</label>
</class>
</layer>
</map>
6.8.4.1.2. White circle marker
<style>
<color red="255" green="255" blue="255"/>
<outlinecolor red="0" green="0" blue="0"/>
<size>8.50393700787</size>
<symbol>std:circle</symbol>
</style>
6.8.4.1.3. A line displayed with small black circles
<style>
<angle>auto</angle>
<gap>-10</gap>
<color red="255" green="255" blue="255"/>
<outlinecolor red="0" green="0" blue="0"/>
<size>2</size>
<symbol>std:circle</symbol>
</style>
6.8.4.1.4. Filtering
<map>
<layer>
<labelitem>NAME</labelitem>
<classitem>PLACE</classitem>
<class>
<expression>"city"</expression>
<style>
<color red="255" green="170" blue="0"/>
<outlinecolor red="0" green="0" blue="0"/>
<size>11.3385826772</size>
<symbol>std:circle</symbol>
</style>
<style>
<color red="255" green="170" blue="0"/>
<outlinecolor red="0" green="0" blue="0"/>
<size>5.66929133858</size>
<symbol>std:circle</symbol>
</style>
<label>
<type>truetype</type>
<font>regular</font>
<size>18</size>
<color blue="0" green="0" red="0"/>
<outlinewidth>3</outlinewidth>
<outlinecolor blue="255" green="255" red="255"/>
<position>ur</position>
</label>
</class>
<class>
<expression>"town"</expression>
<style>
<color red="255" green="255" blue="255"/>
<outlinecolor red="0" green="0" blue="0"/>
<size>11.3385826772</size>
<symbol>std:circle</symbol>
</style>
<style>
<color red="0" green="0" blue="0"/>
<outlinecolor red="0" green="0" blue="0"/>
<size>5.66929133858</size>
<symbol>std:circle</symbol>
</style>
<label>
<type>truetype</type>
<font>regular</font>
<size>14</size>
<color blue="0" green="0" red="0"/>
<outlinewidth>3</outlinewidth>
<outlinecolor blue="255" green="255" red="255"/>
<position>ur</position>
</label>
</class>
<class>
<expression>"village"</expression>
<style>
<color red="255" green="255" blue="255"/>
<outlinecolor red="0" green="0" blue="0"/>
<size>6.8031496063</size>
<symbol>std:circle</symbol>
</style>
<label>
<type>truetype</type>
<font>regular</font>
<size>8.25</size>
<color blue="0" green="0" red="0"/>
<outlinewidth>3</outlinewidth>
<outlinecolor blue="255" green="255" red="255"/>
<position>ur</position>
</label>
</class>
<class>
<expression>"hamlet"</expression>
<style>
<color red="255" green="255" blue="255"/>
<outlinecolor red="0" green="0" blue="0"/>
<size>4.25196850394</size>
<symbol>std:circle</symbol>
</style>
<label>
<type>truetype</type>
<font>regular</font>
<size>8.25</size>
<color blue="0" green="0" red="0"/>
<outlinewidth>3</outlinewidth>
<outlinecolor blue="255" green="255" red="255"/>
<position>ur</position>
</label>
</class>
<class>
<expression>"locality"</expression>
<style>
<color red="255" green="255" blue="255"/>
<outlinecolor red="0" green="0" blue="0"/>
<size>2.83464566929</size>
<symbol>std:circle</symbol>
</style>
<label>
<type>truetype</type>
<font>regular</font>
<size>6.5</size>
<color blue="0" green="0" red="0"/>
<outlinewidth>3</outlinewidth>
<outlinecolor blue="255" green="255" red="255"/>
<position>ur</position>
</label>
</class>
<class>
<expression>''</expression>
<style>
<color red="255" green="255" blue="255"/>
<outlinecolor red="0" green="0" blue="0"/>
<size>2.83464566929</size>
<symbol>std:circle</symbol>
</style>
<label>
<type>truetype</type>
<font>regular</font>
<size>8.25</size>
<color blue="0" green="0" red="0"/>
<outlinewidth>3</outlinewidth>
<outlinecolor blue="255" green="255" red="255"/>
<position>ur</position>
</label>
</class>
</layer>
</map>
6.8.4.1.5. Polygon layer with a classification by field values and labels
<map>
<layer>
<labelitem>NAME</labelitem>
<class>
<expression>(([num] gt 18) and ([num] le 26.1))</expression>
<style>
<color red="255" green="255" blue="212"/>
<outlinecolor blue="64" green="64" red="64"/>
</style>
<label>
<type>truetype</type>
<font>regular</font>
<size>8.25</size>
<color blue="0" green="0" red="0"/>
<outlinewidth>3</outlinewidth>
<outlinecolor blue="255" green="255" red="255"/>
<position>ur</position>
<maxscaledenom>7000000</maxscaledenom>
</label>
</class>
<class>
<expression>(([num] gt 26.1) and ([num] le 28.1))</expression>
<style>
<color red="254" green="217" blue="142"/>
<outlinecolor blue="64" green="64" red="64"/>
</style>
<label>
<type>truetype</type>
<font>regular</font>
<size>8.25</size>
<color blue="0" green="0" red="0"/>
<outlinewidth>3</outlinewidth>
<outlinecolor blue="255" green="255" red="255"/>
<position>ur</position>
<maxscaledenom>7000000</maxscaledenom>
</label>
</class>
<class>
<expression>(([num] gt 28.1) and ([num] le 30))</expression>
<style>
<color red="254" green="153" blue="41"/>
<outlinecolor blue="64" green="64" red="64"/>
</style>
<label>
<type>truetype</type>
<font>regular</font>
<size>8.25</size>
<color blue="0" green="0" red="0"/>
<outlinewidth>3</outlinewidth>
<outlinecolor blue="255" green="255" red="255"/>
<position>ur</position>
<maxscaledenom>7000000</maxscaledenom>
</label>
</class>
</layer>
</map>
6.8.4.1.6. OSM settlement-point
<!-- Style with different settings for different scales-->
<!-- Version 2015-07-24 -->
<map>
<layer>
<labelitem>NAME</labelitem>
<classitem>PLACE</classitem>
<class>
<expression>"city"</expression> <!-- City -->
<style>
<color red="255" green="170" blue="0"/>
<outlinecolor red="0" green="0" blue="0"/>
<size>11.3385826772</size>
<symbol>std:circle</symbol>
</style>
<style>
<color red="255" green="170" blue="0"/>
<outlinecolor red="0" green="0" blue="0"/>
<size>5.66929133858</size>
<symbol>std:circle</symbol>
</style>
<label>
<type>truetype</type>
<font>regular</font>
<size>18</size>
<color blue="0" green="0" red="0"/>
<outlinewidth>3</outlinewidth>
<outlinecolor blue="255" green="255" red="255"/>
<position>ur</position>
</label>
</class>
<class>
<expression>"town"</expression> <!-- Small city or town -->
<style>
<color red="255" green="255" blue="255"/>
<outlinecolor red="0" green="0" blue="0"/>
<size>11.3385826772</size>
<symbol>std:circle</symbol>
<maxscaledenom>6000000</maxscaledenom>
</style>
<style>
<color red="0" green="0" blue="0"/>
<outlinecolor red="0" green="0" blue="0"/>
<size>5.66929133858</size>
<symbol>std:circle</symbol>
<maxscaledenom>6000000</maxscaledenom>
</style>
<label>
<type>truetype</type>
<font>regular</font>
<size>14</size>
<color blue="0" green="0" red="0"/>
<outlinewidth>3</outlinewidth>
<outlinecolor blue="255" green="255" red="255"/>
<position>ur</position>
<maxscaledenom>6000000</maxscaledenom>
</label>
</class>
<class>
<expression>"village"</expression> <!-- Village -->
<style>
<color red="255" green="255" blue="255"/>
<outlinecolor red="0" green="0" blue="0"/>
<size>6.8031496063</size>
<symbol>std:circle</symbol>
<maxscaledenom>1000000</maxscaledenom>
</style>
<label>
<type>truetype</type>
<font>regular</font>
<size>8.25</size>
<color blue="0" green="0" red="0"/>
<outlinewidth>3</outlinewidth>
<outlinecolor blue="255" green="255" red="255"/>
<position>ur</position>
<maxscaledenom>1000000</maxscaledenom>
</label>
</class>
<class>
<expression>"hamlet"</expression> <!-- Hamlet -->
<style>
<color red="255" green="255" blue="255"/>
<outlinecolor red="0" green="0" blue="0"/>
<size>4.25196850394</size>
<symbol>std:circle</symbol>
<maxscaledenom>500000</maxscaledenom>
</style>
<label>
<type>truetype</type>
<font>regular</font>
<size>8.25</size>
<color blue="0" green="0" red="0"/>
<outlinewidth>3</outlinewidth>
<outlinecolor blue="255" green="255" red="255"/>
<position>ur</position>
<maxscaledenom>500000</maxscaledenom>
</label>
</class>
<class>
<expression>"locality"</expression> <!-- Non inhabited place -->
<style>
<color red="255" green="255" blue="255"/>
<outlinecolor red="0" green="0" blue="0"/>
<size>2.83464566929</size>
<symbol>std:circle</symbol>
<maxscaledenom>500000</maxscaledenom>
</style>
<label>
<type>truetype</type>
<font>regular</font>
<size>6.5</size>
<color blue="0" green="0" red="0"/>
<outlinewidth>3</outlinewidth>
<outlinecolor blue="255" green="255" red="255"/>
<position>ur</position>
<maxscaledenom>500000</maxscaledenom>
</label>
</class>
<class>
<expression>''</expression>
<style>
<color red="255" green="255" blue="255"/>
<outlinecolor red="0" green="0" blue="0"/>
<size>2.83464566929</size>
<symbol>std:circle</symbol>
</style>
<label>
<type>truetype</type>
<font>regular</font>
<size>8.25</size>
<color blue="0" green="0" red="0"/>
<outlinewidth>3</outlinewidth>
<outlinecolor blue="255" green="255" red="255"/>
<position>ur</position>
</label>
</class>
</layer>
</map>
6.8.4.1.7. OSM highway-lowzoom
Public roads (small roads are in a separate style). Colorscheme from openstreetmap.de
<map>
<!-- Highways for low-zoom from openstreetmap (from motorway to residential)
version 2015-11-06 -->
<layer>
<classitem>Highway</classitem>
<labelitem>Name</labelitem>
<class>
<expression>"motorway"</expression>
<style>
<color red="185" green="49" blue="49" />
<linejoin>round</linejoin>
<width>8</width>
<linecap>round</linecap>
</style>
<style>
<color red="226" green="114" blue="114" />
<linejoin>round</linejoin>
<width>4</width>
<linecap>round</linecap>
</style>
<style>
<color red="255" green="255" blue="255" />
<linejoin>round</linejoin>
<width>1</width>
<linecap>round</linecap>
</style>
<label>
<type>truetype</type>
<font>regular</font>
<size>7</size>
<color blue="0" green="0" red="0" />
<outlinewidth>1</outlinewidth>
<outlinecolor blue="255" green="255" red="255" />
<angle>follow</angle>
<antialias>true</antialias>
<repeatdistance>300</repeatdistance>
<maxoverlapangle>20.0</maxoverlapangle>
</label>
</class>
<class>
<expression>"motorway_link"</expression>
<style>
<color red="185" green="49" blue="49" />
<linejoin>round</linejoin>
<width>8</width>
<linecap>round</linecap>
</style>
<style>
<color red="226" green="114" blue="114" />
<linejoin>round</linejoin>
<width>4</width>
<linecap>round</linecap>
</style>
<style>
<color red="255" green="255" blue="255" />
<linejoin>round</linejoin>
<width>1</width>
<linecap>round</linecap>
</style>
</class>
<class>
<expression>"trunk"</expression>
<style>
<color red="185" green="49" blue="49" />
<linejoin>round</linejoin>
<width>8</width>
<linecap>round</linecap>
</style>
<style>
<color red="226" green="114" blue="114" />
<linejoin>round</linejoin>
<width>4</width>
<linecap>round</linecap>
</style>
<style>
<color red="255" green="255" blue="255" />
<linejoin>round</linejoin>
<width>1</width>
<linecap>round</linecap>
</style>
<label>
<type>truetype</type>
<font>regular</font>
<size>7</size>
<color blue="0" green="0" red="0" />
<outlinewidth>1</outlinewidth>
<outlinecolor blue="255" green="255" red="255" />
<angle>follow</angle>
<antialias>true</antialias>
<repeatdistance>300</repeatdistance>
<maxoverlapangle>20.0</maxoverlapangle>
</label>
</class>
<class>
<expression>"trunk_link"</expression>
<style>
<color red="185" green="49" blue="49" />
<linejoin>round</linejoin>
<width>8</width>
<linecap>round</linecap>
</style>
<style>
<color red="226" green="114" blue="114" />
<linejoin>round</linejoin>
<width>4</width>
<linecap>round</linecap>
</style>
<style>
<color red="255" green="255" blue="255" />
<linejoin>round</linejoin>
<width>1</width>
<linecap>round</linecap>
</style>
</class>
<class>
<expression>"primary"</expression>
<style>
<color red="141" green="67" blue="70" />
<linejoin>round</linejoin>
<width>6.4062992126</width>
<linecap>round</linecap>
</style>
<style>
<color red="226" green="114" blue="114" />
<linejoin>round</linejoin>
<width>3.57165354331</width>
<linecap>round</linecap>
</style>
<label>
<type>truetype</type>
<font>regular</font>
<size>7</size>
<color blue="0" green="0" red="0" />
<outlinewidth>1</outlinewidth>
<outlinecolor blue="255" green="255" red="255" />
<angle>follow</angle>
<antialias>true</antialias>
<repeatdistance>300</repeatdistance>
<maxoverlapangle>20.0</maxoverlapangle>
</label>
</class>
<class>
<expression>"primary_link"</expression>
<style>
<color red="141" green="67" blue="70" />
<linejoin>round</linejoin>
<width>6.4062992126</width>
<linecap>round</linecap>
</style>
<style>
<color red="226" green="114" blue="114" />
<linejoin>round</linejoin>
<width>3.57165354331</width>
<linecap>round</linecap>
</style>
</class>
<class>
<expression>"secondary"</expression>
<style>
<color red="163" green="123" blue="72" />
<linejoin>round</linejoin>
<width>4</width>
<linecap>round</linecap>
</style>
<style>
<color red="246" green="232" blue="86" />
<linejoin>round</linejoin>
<width>3</width>
<linecap>round</linecap>
</style>
<label>
<type>truetype</type>
<font>regular</font>
<size>7</size>
<color blue="0" green="0" red="0" />
<outlinewidth>1</outlinewidth>
<outlinecolor blue="255" green="255" red="255" />
<angle>follow</angle>
<antialias>true</antialias>
<repeatdistance>300</repeatdistance>
<maxoverlapangle>20.0</maxoverlapangle>
</label>
</class>
<class>
<expression>"secondary_link"</expression>
<style>
<color red="163" green="123" blue="72" />
<linejoin>round</linejoin>
<width>4</width>
<linecap>round</linecap>
</style>
<style>
<color red="246" green="232" blue="86" />
<linejoin>round</linejoin>
<width>3</width>
<linecap>round</linecap>
</style>
</class>
<class>
<expression>"tertiary"</expression>
<style>
<color red="187" green="187" blue="187" />
<linejoin>round</linejoin>
<width>4</width>
<linecap>round</linecap>
</style>
<style>
<color red="255" green="255" blue="179" />
<linejoin>round</linejoin>
<width>3</width>
<linecap>round</linecap>
</style>
<label>
<type>truetype</type>
<font>regular</font>
<size>7</size>
<color blue="0" green="0" red="0" />
<outlinewidth>1</outlinewidth>
<outlinecolor blue="255" green="255" red="255" />
<angle>follow</angle>
<antialias>true</antialias>
<repeatdistance>300</repeatdistance>
<maxoverlapangle>20.0</maxoverlapangle>
</label>
</class>
<class>
<expression>"tertiary_link"</expression>
<style>
<color red="187" green="187" blue="187" />
<linejoin>round</linejoin>
<width>4</width>
<linecap>round</linecap>
</style>
<style>
<color red="255" green="255" blue="179" />
<linejoin>round</linejoin>
<width>3</width>
<linecap>round</linecap>
</style>
</class>
<class>
<expression>"unclassified"</expression>
<style>
<color red="187" green="187" blue="187" />
<linejoin>round</linejoin>
<width>4</width>
<linecap>round</linecap>
</style>
<style>
<color red="255" green="255" blue="179" />
<linejoin>round</linejoin>
<width>3</width>
<linecap>round</linecap>
</style>
<label>
<type>truetype</type>
<font>regular</font>
<size>7</size>
<color blue="0" green="0" red="0" />
<outlinewidth>1</outlinewidth>
<outlinecolor blue="255" green="255" red="255" />
<angle>follow</angle>
<antialias>true</antialias>
<repeatdistance>300</repeatdistance>
<maxoverlapangle>20.0</maxoverlapangle>
<minscaledenom>1</minscaledenom>
<maxscaledenom>40000</maxscaledenom>
</label>
</class>
<class>
<expression>"residential"</expression>
<style>
<color red="187" green="187" blue="187" />
<linejoin>round</linejoin>
<width>2</width>
<linecap>round</linecap>
</style>
<style>
<color red="255" green="255" blue="179" />
<linejoin>round</linejoin>
<width>1</width>
<linecap>round</linecap>
</style>
<label>
<type>truetype</type>
<font>regular</font>
<size>7</size>
<color blue="0" green="0" red="0" />
<outlinewidth>1</outlinewidth>
<outlinecolor blue="255" green="255" red="255" />
<angle>follow</angle>
<antialias>true</antialias>
<repeatdistance>300</repeatdistance>
<maxoverlapangle>20.0</maxoverlapangle>
<minscaledenom>1</minscaledenom>
<maxscaledenom>40000</maxscaledenom>
</label>
</class>
<class>
<expression>"living_street"</expression>
<style>
<color red="187" green="187" blue="187" />
<linejoin>round</linejoin>
<width>2</width>
<linecap>round</linecap>
</style>
<style>
<color red="255" green="255" blue="179" />
<linejoin>round</linejoin>
<width>1</width>
<linecap>round</linecap>
</style>
<label>
<type>truetype</type>
<font>regular</font>
<size>7</size>
<color blue="0" green="0" red="0" />
<outlinewidth>1</outlinewidth>
<outlinecolor blue="255" green="255" red="255" />
<angle>follow</angle>
<antialias>true</antialias>
<repeatdistance>300</repeatdistance>
<maxoverlapangle>20.0</maxoverlapangle>
<minscaledenom>1</minscaledenom>
<maxscaledenom>40000</maxscaledenom>
</label>
</class>
</layer>
</map>
6.8.4.1.8. OSM highway-maxzoom
Access roads, service roads, dirt roads, pedestrian ways
<map>
<!-- Highways for high-zoom from openstreetmap (from service to track)
version 2015-11-06 -->
<layer>
<classitem>Highway</classitem>
<labelitem>Name</labelitem>
<class>
<expression>"service"</expression>
<style>
<color red="187" green="187" blue="187" />
<linejoin>round</linejoin>
<width>2</width>
<linecap>round</linecap>
</style>
<style>
<color red="255" green="255" blue="255" />
<linejoin>round</linejoin>
<width>1</width>
<linecap>round</linecap>
</style>
</class>
<class>
<expression>"footway"</expression>
<style>
<color red="255" green="0" blue="0" />
<linejoin>round</linejoin>
<width>1</width>
<linecap>round</linecap>
</style>
<label>
<type>truetype</type>
<font>regular</font>
<size>7</size>
<color blue="0" green="0" red="0" />
<outlinewidth>1</outlinewidth>
<outlinecolor blue="255" green="255" red="255" />
<angle>follow</angle>
<antialias>true</antialias>
<repeatdistance>300</repeatdistance>
<maxoverlapangle>20.0</maxoverlapangle>
</label>
</class>
<class>
<expression>"pedestrian"</expression>
<style>
<color red="255" green="0" blue="0" />
<linejoin>round</linejoin>
<width>2</width>
<linecap>round</linecap>
</style>
</class>
<class>
<expression>"path"</expression>
<style>
<color red="255" green="0" blue="0" />
<linejoin>round</linejoin>
<width>1</width>
<linecap>round</linecap>
<pattern>5 5</pattern>
</style>
</class>
<class>
<expression>"track"</expression>
<style>
<color red="153" green="116" blue="43" />
<linejoin>round</linejoin>
<width>2</width>
<pattern>16 8</pattern>
<linecap>round</linecap>
</style>
</class>
</layer>
</map>
6.8.4.1.9. OSM railway-line
<!-- railway-line style with different display for different scales
version 2015-07-24 -->
<map>
<layer>
<classitem>RAILWAY</classitem>
<class>
<expression>"abandoned"</expression>
<style>
<color red="255" green="255" blue="255"/>
<linejoin>round</linejoin>
<width>2.83464566929</width>
<linecap>round</linecap>
</style>
<style>
<pattern>2.35275590551 4.70551181102</pattern>
<color red="165" green="165" blue="165"/>
<linejoin>round</linejoin>
<width>2.35275590551</width>
<linecap>round</linecap>
</style>
</class>
<class>
<expression>"razed"</expression>
<style>
<color red="255" green="255" blue="255"/>
<linejoin>round</linejoin>
<width>2.83464566929</width>
<linecap>round</linecap>
</style>
<style>
<pattern>2.35275590551 4.70551181102</pattern>
<color red="255" green="165" blue="210"/>
<linejoin>round</linejoin>
<width>2.35275590551</width>
<linecap>round</linecap>
</style>
</class>
<class>
<expression>"construction"</expression>
<style>
<color red="255" green="255" blue="255"/>
<linejoin>round</linejoin>
<width>2.83464566929</width>
<linecap>round</linecap>
</style>
<style>
<pattern>2.35275590551 4.70551181102</pattern>
<color red="255" green="0" blue="127"/>
<linejoin>round</linejoin>
<width>2.35275590551</width>
<linecap>round</linecap>
</style>
</class>
<class>
<expression>"crossing"</expression>
<style>
<color red="37" green="37" blue="255"/>
<linejoin>bevel</linejoin>
<width>0.737007874016</width>
<linecap>square</linecap>
</style>
</class>
<class>
<expression>"light_rail"</expression>
<style>
<color red="0" green="0" blue="0"/>
<linejoin>bevel</linejoin>
<width>1.41732283465</width>
<linecap>square</linecap>
</style>
</class>
<class>
<expression>"narrow_gauge"</expression>
<style>
<color red="150" green="150" blue="150"/>
<linejoin>bevel</linejoin>
<width>1.41732283465</width>
<linecap>square</linecap>
</style>
</class>
<class>
<expression>"platform"</expression>
<style>
<color red="0" green="0" blue="0"/>
<linejoin>bevel</linejoin>
<width>4.25196850394</width>
<linecap>square</linecap>
</style>
</class>
<class>
<expression>"rail"</expression>
<style>
<color red="0" green="0" blue="0"/>
<linejoin>bevel</linejoin>
<width>2.83464566929</width>
<linecap>square</linecap>
<maxscaledenom>25000</maxscaledenom> <!-- Black and white line at large
scale -->
</style>
<style>
<pattern>9.41102362205 14.1165354331</pattern>
<color red="255" green="255" blue="255"/>
<linejoin>bevel</linejoin>
<width>2.35275590551</width>
<linecap>square</linecap>
<maxscaledenom>25000</maxscaledenom> <!-- Black and white line at large
scale -->
</style>
<style>
<color red="0" green="0" blue="0"/>
<linejoin>bevel</linejoin>
<width>2</width>
<linecap>square</linecap>
<minscaledenom>25000</minscaledenom> <!-- Black line at medium scale -->
</style>
</class>
<class>
<expression>"siding"</expression>
<style>
<color red="145" green="145" blue="145"/>
<linejoin>bevel</linejoin>
<width>1.41732283465</width>
<linecap>square</linecap>
</style>
</class>
<class>
<expression>"subway"</expression>
<style>
<pattern>1.41732283465 2.83464566929</pattern>
<color red="155" green="155" blue="155"/>
<linejoin>round</linejoin>
<width>1.41732283465</width>
<linecap>round</linecap>
</style>
</class>
<class>
<expression>"tram"</expression>
<style>
<color red="0" green="0" blue="0"/>
<linejoin>bevel</linejoin>
<width>1.41732283465</width>
<linecap>square</linecap>
</style>
</class>
</layer>
</map>
6.8.4.1.10. OSM water-line
<!-- water-line style with different display for different scales-->
<!-- Version 2015-07-24 -->
<map>
<layer>
<classitem>Waterway</classitem>
<labelitem>name</labelitem>
<class>
<expression>"river"</expression>
<style>
<color red="102" green="153" blue="204"/>
<linejoin>round</linejoin>
<width>3</width>
<linecap>round</linecap>
<!-- Unprocessed attributes: width_unit, offset_unit, customdash_unit -->
</style>
<label>
<type>truetype</type> <!-- Label -->
<font>bold</font>
<size>7</size>
<color blue="255" green="255" red="255"/>
<outlinewidth>1</outlinewidth>
<outlinecolor red="102" green="153" blue="204"/>
<angle>auto</angle>
<repeatdistance>300</repeatdistance>
<maxoverlapangle>90.0</maxoverlapangle>
<maxscaledenom>500000</maxscaledenom>
</label>
</class>
<class>
<expression>"canal"</expression>
<style><!-- vertical lines -->
<angle>auto</angle>
<gap>-8.50393700787</gap>
<!-- unparsed attributes: interval_unit, placement,
offset_unit, offset -->
<color red="102" green="153" blue="204"/>
<outlinecolor red="0" green="0" blue="0"/>
<size>15.66929133858</size>
<symbol>std:line</symbol>
<!-- Unprocessed attributes: outline_width, offset_unit,
outline_width_unit, size_unit -->
</style>
<style>
<color red="102" green="153" blue="204"/>
<linejoin>round</linejoin>
<width>3</width>
<linecap>round</linecap>
<!-- Unprocessed attributes: width_unit, offset_unit,
customdash_unit -->
</style>
<label>
<type>truetype</type> <!-- Label -->
<font>bold</font>
<size>7</size>
<color blue="255" green="255" red="255"/>
<outlinewidth>1</outlinewidth>
<outlinecolor red="102" green="153" blue="204"/>
<angle>auto</angle>
<repeatdistance>300</repeatdistance>
<maxoverlapangle>90.0</maxoverlapangle>
<maxscaledenom>500000</maxscaledenom>
</label>
</class>
<class>
<expression>"stream"</expression>
<style>
<color red="102" green="153" blue="204"/>
<linejoin>round</linejoin>
<width>1.5</width>
<linecap>round</linecap>
<maxscaledenom>250000</maxscaledenom>
<!-- Unprocessed attributes: width_unit, offset_unit,
customdash_unit -->
</style>
</class>
<class>
<expression>"drain"</expression>
<style>
<color red="102" green="153" blue="204"/>
<linejoin>round</linejoin>
<width>1</width>
<linecap>round</linecap>
<maxscaledenom>250000</maxscaledenom>
<!-- Unprocessed attributes: width_unit, offset_unit,
customdash_unit -->
</style>
</class>
</layer>
</map>
6.8.4.1.11. OSM water-polygon
<!-- water-polygon style
version 2015-07-24
To add
-reservoirs
-swamp hatch
-->
<map>
<layer>
<labelitem>NAME</labelitem>
<classitem>NATURAL</classitem>
<class>
<expression>"water"</expression> <!-- Water -->
<style>
<color red="102" green="153" blue="204"/>
<outlinecolor red="102" green="153" blue="204"/>
</style>
<label>
<type>truetype</type>
<font>regular</font>
<size>7</size>
<color red="102" green="153" blue="204"/>
<outlinewidth>2</outlinewidth>
<outlinecolor red="255" green="255" blue="222"/>
<!-- Label scale range-->
<minscaledenom>1</minscaledenom>
<maxscaledenom>100000</maxscaledenom>
</label>
</class>
<class>
<expression>"wetland"</expression> <!-- Wetland -->
<style>
<color red="102" green="153" blue="204"/>
<outlinecolor red="102" green="153" blue="204"/>
</style>
<label>
<type>truetype</type>
<font>regular</font>
<size>7</size>
<color red="102" green="153" blue="204"/>
<outlinewidth>2</outlinewidth>
<outlinecolor red="255" green="255" blue="222"/>
<!-- Label scale range -->
<minscaledenom>1</minscaledenom>
<maxscaledenom>100000</maxscaledenom>
</label>
</class>
</layer>
</map>
6.8.4.1.12. OSM landuse-polygon
NextGIS Web styles support for different hatched (see Pic. 6.149.).
<map> <!-- A demo of different hatched. Use with dark background.-->
<layer>
<labelitem>OSM_ID</labelitem>
<classitem>LANDUSE</classitem>
<class>
<expression>"residential"</expression>
<!-- Residential -->
<style>
<!-- hatch with right slope -->
<color red="255" green="185" blue="33"/>
<width>1.4</width>
<symbol>std:line</symbol>
<gap>3</gap>
<size>1</size>
<angle>90</angle>
</style>
<style>
<!-- Outline -->
<outlinecolor red="255" green="185" blue="33"/>
<width>0.5</width>
</style>
</class>
<class>
<expression>"grass"</expression>
<!-- Grass zones -->
<style>
<!-- Lines -->
<color red="20" green="255" blue="33"/>
<width>1</width>
<symbol>std:line</symbol>
<gap>6</gap>
<size>4</size>
<angle>0</angle>
<pattern>2.5 4.5</pattern>
</style>
<style>
<!-- Outline -->
<outlinecolor red="20" green="255" blue="33"/>
<width>0.5</width>
</style>
</class>
<class>
<expression>"commercial"</expression>
<!-- Residential -->
<style>
<!-- hatch with right slope -->
<color red="133" green="33" blue="25"/>
<width>1.4</width>
<symbol>std:line</symbol>
<gap>10</gap>
<size>5</size>
<angle>45</angle>
</style>
<style>
<!-- Outline -->
<outlinecolor red="133" green="33" blue="25"/>
<width>0.5</width>
</style>
</class>
<class>
<expression>"industrial"</expression>
<!-- Industrial zones -->
<style>
<!-- hatch with right slope -->
<color red="255" green="50" blue="50"/>
<width>0.4</width>
<symbol>std:hatch</symbol>
<gap>10</gap>
<size>5</size>
<angle>45</angle>
</style>
<style>
<!-- hatch with left slope-->
<color red="255" green="50" blue="50"/>
<width>0.4</width>
<symbol>std:hatch</symbol>
<gap>10</gap>
<size>5</size>
<angle>-45</angle>
</style>
<style>
<!-- Outline -->
<outlinecolor red="255" green="50" blue="50"/>
<width>0.5</width>
</style>
</class>
<class>
<expression>"cemetery"</expression>
<!-- Cemeteries -->
<style>
<!-- fences -->
<color red="14" green="166" blue="0"/>
<width>1.4</width>
<symbol>std:rectangle</symbol>
<gap>20</gap>
<size>11</size>
<angle>0</angle>
</style>
<style>
<!-- fences -->
<color red="0" green="0" blue="0"/>
<width>1.2</width>
<symbol>std:rectangle</symbol>
<gap>20</gap>
<size>10</size>
<angle>0</angle>
</style>
<style>
<!-- crosses -->
<color red="14" green="166" blue="0"/>
<width>1.4</width>
<symbol>std:cross</symbol>
<gap>20</gap>
<size>9</size>
<angle>0</angle>
</style>
<style>
<!-- Outline -->
<outlinecolor red="14" green="166" blue="0"/>
<width>0.5</width>
</style>
</class>
</layer>
</map>
6.8.4.1.13. Individual feature styles from field
It is possible to set up individual style for every vector feature. First create a field that contains style description in ORG Style format. For example,
ogr2ogr -f GeoJSON -sql "select *, OGR_STYLE from Australia" australia.geojson Australia.TAB
Learn more on ORG Style on the Feature Style Specification page.
Now that you have a vector layer with OGR_STYLE field containing the style for the feature, add the following NextGIS Web Mapserver:
<map>
<layer>
<styleitem>OGR_STYLE</styleitem>
<class>
<name>default</name>
</class>
</layer>
</map>