<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (C) 2008 Mark Jaroski

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA

==============================================================================
-->
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
        xmlns:xlink="http://www.w3.org/1999/xlink"
        xmlns:svg="http://www.w3.org/2000/svg" >

    <xsl:output omit-xml-declaration="no" indent="yes" encoding="UTF-8"/>

    <xsl:param name="border"/>
    <xsl:param name="orientation"/>
    <xsl:param name="size"/>
    <xsl:param name="expandForListings" required="yes" select="no"/>
    <xsl:param name="minOffset" required="yes" select="78"/>

    <xsl:param name="cropMarginFactor" required="yes" select="0.04"/>

    <xsl:variable name="dataWidth">
        <xsl:choose>
            <xsl:when test="$size = 'two-page' and $orientation = 'landscape'">346</xsl:when>
            <xsl:when test="$size = 'two-page' and $orientation = 'portrait'">300.8</xsl:when>
            <xsl:when test="$size = 'one-page' and $orientation = 'landscape'">300.8</xsl:when>
            <xsl:when test="$size = 'one-page' and $orientation = 'portrait'">173</xsl:when>
        </xsl:choose>
    </xsl:variable>

    <xsl:variable name="dataHeight">
        <xsl:choose>
            <xsl:when test="$size = 'two-page' and $orientation = 'landscape'">300.8</xsl:when>
            <xsl:when test="$size = 'two-page' and $orientation = 'portrait'">346</xsl:when>
            <xsl:when test="$size = 'one-page' and $orientation = 'landscape'">173</xsl:when>
            <xsl:when test="$size = 'one-page' and $orientation = 'portrait'">300.8</xsl:when>
        </xsl:choose>
    </xsl:variable>

    <xsl:variable name="ratio" select="$dataWidth div $dataHeight"/>

    <xsl:variable name="reldata" select="document('relation.xml')"/>

    <xsl:variable name="bottomLeftLatitude">
        <xsl:for-each select="$reldata/osm/node">
            <xsl:sort select="@lat"/>
            <xsl:if test="position() = 1">
                <xsl:value-of select="@lat"/>
            </xsl:if>
        </xsl:for-each>
    </xsl:variable>

    <xsl:variable name="topRightLatitude">
        <xsl:for-each select="$reldata/osm/node">
            <xsl:sort select="@lat"/>
            <xsl:if test="position() = last()">
                <xsl:value-of select="@lat"/>
            </xsl:if>
        </xsl:for-each>
    </xsl:variable>

    <xsl:variable name="bottomLeftLongitude">
        <xsl:for-each select="$reldata/osm/node">
            <xsl:sort select="@lon"/>
            <xsl:if test="position() = 1">
                <xsl:value-of select="@lon"/>
            </xsl:if>
        </xsl:for-each>
    </xsl:variable>

    <xsl:variable name="topRightLongitude">
        <xsl:for-each select="$reldata/osm/node">
            <xsl:sort select="@lon"/>
            <xsl:if test="position() = last()">
                <xsl:value-of select="@lon"/>
            </xsl:if>
        </xsl:for-each>
    </xsl:variable>

    <!-- Derive the latitude of the middle of the map -->
    <xsl:variable name="middleLatitude" select="($topRightLatitude + $bottomLeftLatitude) div 2.0"/>
    <!--woohoo lets do trigonometry in xslt -->
    <!--convert latitude to radians -->
    <xsl:variable name="latr" select="$middleLatitude * 3.1415926 div 180.0"/>
    <!--taylor series: two terms is 1% error at lat<68 and 10% error lat<83. we probably need polar projection by then -->
    <xsl:variable name="coslat" select="1 - ($latr * $latr) div 2 + ($latr * $latr * $latr * $latr) div 24"/>
    <xsl:variable name="projection" select="1 div $coslat"/>

    <xsl:variable name="horizontalCropOffset" select="($topRightLongitude - $bottomLeftLongitude) * $cropMarginFactor"/>
    <xsl:variable name="verticalCropOffset"   select="($topRightLatitude - $bottomLeftLatitude) * $cropMarginFactor"/>

    <xsl:variable name="bboxWidth" select="( ($topRightLongitude - $bottomLeftLongitude + ( 2 * $horizontalCropOffset ) ) * 10000 )"/>
    <xsl:variable name="bboxHeight" select="( ($topRightLatitude - $bottomLeftLatitude + ( 2 * $verticalCropOffset ) ) * $projection * 10000 )"/>

    <xsl:variable name="relation-ratio" select="$bboxWidth div $bboxHeight"/>

    <xsl:variable name="scale">
        <xsl:choose>
            <xsl:when test="$relation-ratio &lt; $ratio">
                <xsl:variable name="rawScale" select="$dataHeight div $bboxHeight"/>
                <xsl:variable name="testOffset" select="$dataWidth - $bboxWidth * $rawScale"/>
                <xsl:choose>
                    <xsl:when test="$expandForListings = 'yes' and $testOffset &lt; $minOffset">
                        <xsl:value-of select="( $dataWidth - $minOffset ) div $bboxWidth"/>
                    </xsl:when>
                    <xsl:otherwise>
                        <xsl:value-of select="$rawScale"/>
                    </xsl:otherwise>
                </xsl:choose>
            </xsl:when>
            <xsl:when test="$relation-ratio &gt; $ratio">
                <xsl:variable name="rawScale" select="$dataWidth div $bboxWidth"/>
                <xsl:variable name="testOffset" select="( $dataHeight - $bboxHeight * $rawScale ) div $projection"/>
                <xsl:choose>
                    <xsl:when test="$expandForListings = 'yes' and $testOffset &lt; $minOffset">
                        <xsl:value-of select="( $dataHeight - $minOffset ) div $bboxHeight"/>
                    </xsl:when>
                    <xsl:otherwise>
                        <xsl:value-of select="$rawScale"/>
                    </xsl:otherwise>
                </xsl:choose>
            </xsl:when>
            <xsl:otherwise>1</xsl:otherwise>
        </xsl:choose>
    </xsl:variable>

    <xsl:variable name="leftOffset" select="$dataWidth - $bboxWidth * $scale"/>
    <xsl:variable name="bottomOffset" select="( $dataHeight - $bboxHeight * $scale ) div $projection"/>

    <xsl:variable name="dataurl">
        <xsl:text>http://www.openstreetmap.org/api/0.5/map?bbox=</xsl:text>
        <xsl:value-of select="$bottomLeftLongitude - $leftOffset div ( 10000 * $scale ) - $horizontalCropOffset"/>
        <xsl:text>,</xsl:text>
        <xsl:value-of select="$bottomLeftLatitude - $bottomOffset div ( 10000 * $scale ) - $verticalCropOffset"/>
        <xsl:text>,</xsl:text>
        <xsl:value-of select="$topRightLongitude + $horizontalCropOffset"/>
        <xsl:text>,</xsl:text>
        <xsl:value-of select="$topRightLatitude + $verticalCropOffset"/>
    </xsl:variable>

    <xsl:variable name="iconLatitudeScaleFactor">85</xsl:variable>

    <!-- if latitude data is not available, just scale symbols to size 1 -->
    <xsl:variable name="symbolScale">
      <xsl:choose>
        <xsl:when test="$size = 'one-page'">
          <xsl:value-of select="1.2"/>
        </xsl:when>
        <xsl:when test="$size = 'two-page'">
          <xsl:value-of select="1.2"/>
        </xsl:when>
        <xsl:otherwise>
          <xsl:value-of select="1"/>
        </xsl:otherwise>
      </xsl:choose>
    </xsl:variable>


    <xsl:template match="/">

        <xsl:message>

              firstRelNode: <xsl:value-of select="$reldata/osm/node[1]/@id"/>

                 dataWidth: <xsl:value-of select="$dataWidth"/>
                dataHeight: <xsl:value-of select="$dataHeight"/>

                 bboxWidth: <xsl:value-of select="$bboxWidth"/>
                bboxHeight: <xsl:value-of select="$bboxHeight"/>

                     scale: <xsl:value-of select="$scale"/>

                     projection: <xsl:value-of select="$projection"/>

                     ratio: <xsl:value-of select="$ratio"/>
            relation-ratio: <xsl:value-of select="$relation-ratio"/>

                leftOffset: <xsl:value-of select="$leftOffset"/>
              bottomOffset: <xsl:value-of select="$bottomOffset"/>

                   dataurl: <xsl:value-of select="$dataurl"/>

        </xsl:message>

        <rules
            xmlns:xlink="http://www.w3.org/1999/xlink"
            xmlns:svg="http://www.w3.org/2000/svg"
            svgBaseProfile="full"
            data="data.osm"
            textAttenuation="7"
            minimumMapWidth="1"
            minimumMapHeight="1"
            withOSMLayers="yes"
            withUntaggedSegments="no"
            showScale="no"
            showGrid="no"
            showBorder="no"
            showLicense="no"
            showRelationBoundary="yes"
            interactive="no">
            <xsl:attribute name="scale">
                <xsl:value-of select="$scale"/>
            </xsl:attribute>
            <xsl:attribute name="dataurl">
                <xsl:value-of select="$dataurl"/>
            </xsl:attribute>
            <xsl:attribute name="symbolScale">
                <xsl:value-of select="$symbolScale"/>
            </xsl:attribute>
            <xsl:attribute name="leftOffset">
                <xsl:value-of select="$leftOffset"/>
            </xsl:attribute>
            <xsl:attribute name="projection">
                <xsl:value-of select="$projection"/>
            </xsl:attribute>
            <xsl:attribute name="bottomOffset">
                <xsl:value-of select="$bottomOffset"/>
            </xsl:attribute>
            <xsl:attribute name="dataWidth">
                <xsl:value-of select="$dataWidth"/>
            </xsl:attribute>
            <xsl:attribute name="dataHeight">
                <xsl:value-of select="$dataHeight"/>
            </xsl:attribute>

            <xsl:call-template name="background-rule" />

            <rule e="node|way" k="osmarender:render" v="~|yes">
                <xsl:call-template name="landuse-rules" />
                <xsl:call-template name="static-rules" />
                <xsl:call-template name="transport-rules"  />
            </rule>

            <rule e="node|way" k="osmarender:render" v="~|yes" layer="4">
                <xsl:call-template name="non-physical-boundaries" />
                <xsl:call-template name="streetname-rules" />
            </rule>

            <rule e="node" k="railway" v="station" layer="5">
                <rule e="node" s="way" k="railway" v="rail" layer="5">
                    <text k="name" class='caption-casing railway-station-caption-casing' dy='-1.5px' />
                    <text k="name" class='caption-core railway-station-caption-core' dy='-1.5px' />
                </rule>
                <else>
                    <text k="name" class='caption-casing railway-halt-caption-casing' dy='-1px' />
                    <text k="name" class='caption-core railway-halt-caption-core' dy='-1px' />
                </else>
            </rule>

            <rule e="node|way" k="osmarender:render" v="~|yes" layer="5">
                <xsl:call-template name="icon-rules"  />
            </rule>

            <defs>
                <xsl:call-template name="defs" />
                <xsl:call-template name="see-do-symbol" />
                <xsl:call-template name="buy-symbol" />
                <xsl:call-template name="sleep-symbol" />
                <xsl:call-template name="eat-symbol" />
                <xsl:call-template name="drink-symbol" />
            </defs>

        </rules>
    </xsl:template>

    <xsl:template name="background-rule">
        <rule e="relation" k="type" v="boundary" layer="-5">
            <rule e="relation" k="name" layer="-5">
                <xsl:attribute name="v">
                    <xsl:value-of select="$border"/>
                </xsl:attribute>
                <area class='boundary-selected-area' />
            </rule>
        </rule>
    </xsl:template>

    <xsl:template name="transport-rules">
        <rule e="node" k="amenity" v="bus_station">
            <symbol xlink:href="#symbol-bus" width='6px' height='2px' transform='translate(-1,-1)' />
        </rule>
    </xsl:template>

    <xsl:template name="icon-rules">

        <xsl:for-each select="/listings/see|do">
            <rule e="node" k="name:en|name" layer="5">
                <xsl:attribute name="v">
                    <xsl:value-of select="@name"/>
                </xsl:attribute>
                <symbol width='2px' 
                        height='2px' 
                        transform='translate(-1,-1)'>
                    <xsl:attribute name="xlink:href">
                        <xsl:text>#see-</xsl:text>
                        <xsl:value-of select="position()"/>
                    </xsl:attribute>
                </symbol>
            </rule>
        </xsl:for-each>

        <xsl:for-each select="/listings/sleep">
            <rule e="node" k="name:en|name" layer="5">
                <xsl:attribute name="v">
                    <xsl:value-of select="@name"/>
                </xsl:attribute>
                <symbol width='2px' 
                        height='2px' 
                        transform='translate(-1,-1)'>
                    <xsl:attribute name="xlink:href">
                        <xsl:text>#sleep-</xsl:text>
                        <xsl:value-of select="position()"/>
                    </xsl:attribute>
                </symbol>
            </rule>
        </xsl:for-each>

        <xsl:for-each select="/listings/buy">
            <rule e="node" k="name:en|name" layer="5">
                <xsl:attribute name="v">
                    <xsl:value-of select="@name"/>
                </xsl:attribute>
                <symbol width='2px' 
                        height='2px' 
                        transform='translate(-1,-1)'>
                    <xsl:attribute name="xlink:href">
                        <xsl:text>#buy-</xsl:text>
                        <xsl:value-of select="position()"/>
                    </xsl:attribute>
                </symbol>
            </rule>
        </xsl:for-each>

        <xsl:for-each select="/listings/eat">
            <rule e="node" k="name:en|name" layer="5">
                <xsl:attribute name="v">
                    <xsl:value-of select="@name"/>
                </xsl:attribute>
                <symbol width='2px' 
                        height='2px' 
                        transform='translate(-1,-1)'>
                    <xsl:attribute name="xlink:href">
                        <xsl:text>#eat-</xsl:text>
                        <xsl:value-of select="position()"/>
                    </xsl:attribute>
                </symbol>
            </rule>
        </xsl:for-each>

        <xsl:for-each select="/listings/drink">
            <rule e="node" k="name:en|name" layer="5">
                <xsl:attribute name="v">
                    <xsl:value-of select="@name"/>
                </xsl:attribute>
                <symbol width='2px' 
                        height='2px' 
                        transform='translate(-1,-1)'>
                    <xsl:attribute name="xlink:href">
                        <xsl:text>#drink-</xsl:text>
                        <xsl:value-of select="position()"/>
                    </xsl:attribute>
                </symbol>
            </rule>
        </xsl:for-each>

    </xsl:template>

    <xsl:template name="landuse-rules">
        <!-- Landuse -->
        <rule e="way" k="landuse" v="cemetery">
            <rule e="way" k="religion" v="christian">
                <area class='landuse-cemetery-christian' />
            </rule>
			<else>
				<area class='landuse-cemetery' />
			</else>
        </rule>
    </xsl:template>

    <xsl:template name="non-physical-boundaries">
		<!-- Non-physical boundaries -->
		<rule e="way" k="boundary" v="administrative" layer="4">
			<rule e="way" k="border_type" v="state" layer="4">
				<line class="boundary boundary-administrative-state-casing" />
				<line class="boundary boundary-administrative-state-core" />
			</rule>	
			<else>
			        <rule e="way" k="admin_level" v="10" layer="4">
   					<line class="boundary boundary-administrative-parish-core" />
  				</rule>
			        <else>
  	 		        	<rule e="way" k="admin_level" v="8" layer="4">
   						<line class="boundary boundary-administrative-district-core" />
  					</rule>
                                	<else>
  						<line class="boundary boundary-administrative-state-core" />
  					</else>
				</else>
			</else>	
		</rule>
    </xsl:template>

    <xsl:template name="streetname-rules">
        <!-- Waterway and Street names -->
        <rule e="way" k="osmarender:renderName" v="~|yes" layer="4">
            <rule e="way" k="tunnel" v="~|no|false" layer="4">    <!-- no names in tunnels -->
				<rule e="way" k="junction" v="~" layer="4"> <!-- no names on or along junctions -->
    
					<rule e="way" k="waterway" v="drain" layer="4">
					    <text k="name" startOffset='50%' class="waterway-name-casing waterway-drain-name-casing" dy='0.5px' />
					    <text k="name" startOffset='50%' class="waterway-name-core waterway-drain-name-core" dy='0.5px' />
					</rule>
					<rule e="way" k="waterway" v="canal" layer="4">
					    <text k="name" startOffset='50%' class="waterway-name-casing waterway-canal-name-casing" dy='0.5px' />
					    <text k="name" startOffset='50%' class="waterway-name-core waterway-canal-name-core" dy='0.5px' />
					</rule>
					<rule e="way" k="waterway" v="stream" layer="4">
					    <text k="name" startOffset='50%' class="waterway-name-casing waterway-stream-name-casing" dy='0.5px' />
					    <text k="name" startOffset='50%' class="waterway-name-core waterway-stream-name-core" dy='0.5px' />
					</rule>
					<rule e="way" k="waterway" v="river" layer="4">
					    <text k="name" startOffset='50%' class="waterway-name-casing waterway-river-name-casing" dy='0.5px' />
					    <text k="name" startOffset='50%' class="waterway-name-core waterway-river-name-core" dy='0.5px' />
					</rule>
					
					<rule e="way" k="highway" v="pedestrian" layer="4">
					    <text k="name" startOffset='50%' class="highway-name highway-pedestrian-name" dy='0.7px' />
					</rule>

                    <xsl:if test="$scale > 0.6">
                        <rule e="way" k="scramble" v="*" layer="4">
                            <text k="name" startOffset='50%' class="caption-casing highway-scramble-name" dy='0.7px' />
                            <text k="name" startOffset='50%' class="caption-core highway-scramble-name" dy='0.7px' />
                        </rule>
                        <rule e="way" k="highway" v="cycleway" layer="4">
                            <text k="name" startOffset='50%' class="highway-name highway-cycleway-name" dy='0.7px' />
                        </rule>
                        <rule e="way" k="highway" v="steps" layer="4">
                            <text k="name" startOffset='50%' class="highway-name highway-steps-name" dy='0.7px' />
                        </rule>
                        <rule e="way" k="highway" v="footway|footpath" layer="4">
                            <text k="name" startOffset='50%' class="highway-name highway-footway-name" dy='0.7px' />
                        </rule>
                        <rule e="way" k="highway" v="bridleway" layer="4">
                            <text k="name" startOffset='50%' class="highway-name highway-bridleway-name" dy='0.7px' />
                        </rule>
                        <rule e="way" k="highway" v="byway" layer="4">
                            <text k="name" startOffset='50%' class="highway-name highway-byway-name" dy='0.7px' />
                        </rule>
                        <rule e="way" k="highway" v="track" layer="4">
                            <text k="name" startOffset='50%' class="highway-name highway-track-name" dy='0.7px' />
                        </rule>
                        <rule e="way" k="highway" v="unsurfaced" layer="4">
                            <text k="name" startOffset='50%' class="highway-name highway-unsurfaced-name" dy='0.7px' />
                        </rule>
                    </xsl:if>
                    <xsl:if test="$scale > 0.62">
                        <rule e="way" k="highway" v="service" layer="4">
                            <text k="name" startOffset='50%' class="highway-name highway-service-name" dy='0.7px' />
                        </rule>
                    </xsl:if>
                    <xsl:if test="$scale > 0.6">
                        <rule e="way" k="highway" v="unclassified|residential|minor" layer="4">
                            <text k="name" startOffset='50%' class="highway-name highway-unclassified-name" dy='0.7px' />
                        </rule>
                    </xsl:if>
                    <xsl:if test="$scale > 0.5">
                        <rule e="way" k="highway" v="tertiary" layer="4">
                            <text k="name" startOffset='50%' class="highway-name highway-tertiary-name" dy='1px' />
                        </rule>
                    </xsl:if>
                    <xsl:if test="$scale > 0.4">
                        <rule e="way" k="highway" v="secondary" layer="4">
                            <text k="name" startOffset='50%' class="highway-name highway-secondary-name" dy='1px' />
                        </rule>
                    </xsl:if>
					<rule e="way" k="highway" v="primary_link" layer="4">
					    <text k="name" startOffset='50%' class="highway-name highway-primary-link-name" dy='1px' />
					</rule>
					<rule e="way" k="highway" v="trunk_link" layer="4">
					    <text k="name" startOffset='50%' class="highway-name highway-trunk-link-name" dy='0.7px' />
					</rule>
					<rule e="way" k="highway" v="motorway_link" layer="4">
					    <text k="name" startOffset='50%' class="highway-name highway-motorway-link-name" dy='0.7px' />
					</rule>
					<rule e="way" k="highway" v="primary" layer="4">
					    <text k="name" startOffset='50%' class="highway-name highway-primary-name" dy='1px'/>
					</rule>
					<rule e="way" k="highway" v="trunk" layer="4">
					    <text k="name" startOffset='50%' class="highway-name highway-trunk-name" dy='0.7px' />
					</rule>
					<rule e="way" k="highway" v="motorway" layer="4">
					    <text k="name" startOffset='50%' class="highway-name highway-motorway-name" dy='0.7px' />
					</rule>
				</rule>
				<rule e="way" k="junction" v="*" layer="4"> <!-- Roundabouts, motorway exits etc -->
                    <rule e="way" k="highway" v="secondary" layer="4">
                        <areaText k="name" startOffset='50%' class="highway-name highway-secondary-name" dy='2px' />
                    </rule>
                    <rule e="way" k="highway" v="primary|primary_link" layer="4">
                        <areaText k="name" startOffset='50%' class="highway-name highway-primary-name" dy='2px' />
                    </rule>
                    <rule e="way" k="highway" v="trunk|trunk_link" layer="4">
                        <areaText k="name" startOffset='50%' class="highway-name highway-trunk-name" dy='3px' />
                    </rule>
                    <rule e="way" k="highway" v="motorway|motorway_link" layer="4">
                        <areaText k="name" startOffset='50%' class="highway-name highway-motorway-name" dy='3px' />
                    </rule>
				</rule>
            </rule>
        </rule>
    </xsl:template>

    <xsl:template name="static-rules">

        <!-- Natural features -->
        <rule e="way" k="natural" v="coastline">
            <area class='natural-coastline'/>
        </rule>
        <rule e="way" k="natural" v="land">
            <area class='natural-land' />
        </rule>
        <rule e="way" k="natural" v="beach">
            <area class='natural-beach' />
        </rule>
        <rule e="way" k="natural" v="forest|wood|heath|scrub">
            <area class='landuse-wood'/>
        </rule>

		<!-- Artificial landuse -->
        <rule e="way" k="amenity" v="school|college|university">
            <area class='amenity-school'/>
        </rule>
        <rule e="way" k="leisure" v="park|playground|playing_fields|garden|pitch|golf_course|common|green">
            <area class='leisure-park'/>
        </rule>
        <rule e="way" k="leisure" v="stadium|sports_centre">
            <area class='leisure-stadium'/>
        </rule>
        <rule e="way" k="leisure" v="track">
            <area class='leisure-track'/>
        </rule>

		<!-- Airports and runways -->
		<rule e="way" k="aeroway" v="apron">
			<area class='aeroway-apron'/>			
		</rule>
		<rule e="way" k="landuse" v="runway">
			<rule e="way" k="use_status" v="~">
				<area class='landuse-runway' />
			</rule>
			<rule e="way" k="use_status" v="disused">
				<area class='landuse-runway-disused' />
			</rule>
			<rule e="way" k="use_status" v="dismantled">
				<area class='landuse-runway-dismantled' />
			</rule>
		</rule>

		<!-- Raceways and racetracks (cars and horses etc) -->
		<rule e="way" k="landuse" v="raceway">
			<rule e="way" k="use_status" v="~">
				<area class='landuse-raceway' />
			</rule>
			<rule e="way" k="use_status" v="disused">
				<area class='landuse-raceway-disused' />
			</rule>
			<rule e="way" k="use_status" v="dismantled">
				<area class='landuse-raceway-dismantled' />
			</rule>
		</rule>

        <!-- Man-made areas -->
        <rule e="way" k="sport" v="*">
            <area class='sport'/>
        </rule>
        <rule e="way" k="amenity" v="parking">
            <area class='amenity-parking'/>
        </rule>
        <rule e="way" k="tourism" v="attraction">
            <area class='tourism-attraction'/>
        </rule>
        <rule e="way" k="aeroway" v="terminal">
            <area class='building-block'/>
        </rule>
        <rule e="way" k="building" v="*">
            <area class='building-block'/>
        </rule>


        <!-- Airfields and airports -->
        <rule e="segment|way" k="aeroway" v="runway">
            <line class='aeroway-runway-casing'/>
        </rule>
        <rule e="segment|way" k="aeroway" v="taxiway">
            <line class='aeroway-taxiway-casing'/>
        </rule>


        <!-- Waterways -->
        <rule e="way" k="waterway" v="riverbank">
            <area class='waterway-riverbank'/>
        </rule>
        <rule e="segment|way" k="waterway" v="river">
            <line class='waterway-casing waterway-river-casing'/>
        </rule>
        <rule e="segment|way" k="waterway" v="stream">
            <line class='waterway-casing waterway-stream-casing'/>
        </rule>
        <rule e="segment|way" k="waterway" v="canal">
            <line class='waterway-casing waterway-canal-casing'/>
        </rule>
        <rule e="segment|way" k="waterway" v="drain">
            <line class='waterway-casing waterway-drain-casing'/>
        </rule>
        <rule e="segment|way" k="waterway" v="river">
            <line class='waterway-core waterway-river-core'/>
        </rule>
        <rule e="segment|way" k="waterway" v="stream">
            <line class='waterway-core waterway-stream-core'/>
        </rule>
        <rule e="segment|way" k="waterway" v="canal">
            <line class='waterway-core waterway-canal-core'/>
        </rule>
        <rule e="segment|way" k="waterway" v="drain">
            <line class='waterway-core waterway-drain-core'/>
        </rule>
        <rule e="way" k="waterway" v="dock">
            <area class='natural-water' />
        </rule>
        <rule e="way" k="natural" v="water|pond|lake">
            <area class='natural-water' />
        </rule>
        <rule e="way" k="landuse" v="reservoir">
            <area class='natural-water' />
        </rule>
        <rule e="way" k="landuse" v="basin">
            <area class='natural-water' />
        </rule>

        <!-- Bridge casings -->
        <rule e="way" k="bridge" v="yes|true">
            <rule e="way" k="railway" v="rail">
                <line class='bridge-casing railway-rail-bridge-casing' smart-linecap='no'/>
            </rule>
            <rule e="way" k="railway" v="light_rail">
                <line class='bridge-casing railway-light-rail-bridge-casing' smart-linecap='no'/>
            </rule>
            <rule e="way" k="railway" v="subway">
                <line class='bridge-casing railway-subway-bridge-casing' smart-linecap='no'/>
            </rule>
            <rule e="way" k="railway" v="tram">
                <line class='bridge-casing railway-tram-bridge-casing' smart-linecap='no'/>
            </rule>
            <rule e="way" k="railway" v="narrow_gauge">
                <line class='bridge-casing railway-narrow-gauge-bridge-casing' smart-linecap='no'/>
            </rule>
            <rule e="way" k="railway" v="preserved">
                <line class='bridge-casing railway-preserved-bridge-casing' smart-linecap='no'/>
            </rule>
            <rule e="way" k="railway" v="monorail">
                <line class='bridge-casing railway-monorail-bridge-casing' smart-linecap='no'/>
            </rule>
            <rule e="way" k="highway" v="motorway">
                <line class='bridge-casing highway-motorway-bridge-casing' smart-linecap='no'/>
            </rule>
            <rule e="way" k="highway" v="trunk">
                <line class='bridge-casing highway-trunk-bridge-casing' smart-linecap='no'/>
            </rule>
            <rule e="way" k="highway" v="primary">
                <line class='bridge-casing highway-primary-bridge-casing' smart-linecap='no'/>
            </rule>
            <rule e="way" k="highway" v="motorway_link">
                <line class='bridge-casing highway-motorway-link-bridge-casing' smart-linecap='no'/>
            </rule>
            <rule e="way" k="highway" v="trunk-link">
                <line class='bridge-casing highway-trunk-link-bridge-casing' smart-linecap='no'/>
            </rule>
            <rule e="way" k="highway" v="primary-link">
                <line class='bridge-casing highway-primary-link-bridge-casing' smart-linecap='no'/>
            </rule>
            <rule e="way" k="highway" v="secondary">
                <line class='bridge-casing highway-secondary-bridge-casing' smart-linecap='no'/>
            </rule>
            <rule e="way" k="highway" v="tertiary">
                <line class='bridge-casing highway-tertiary-bridge-casing' smart-linecap='no'/>
            </rule>
            <rule e="way" k="highway" v="unclassified|residential|minor">
                <line class='bridge-casing highway-unclassified-bridge-casing' smart-linecap='no'/>
            </rule>
            <rule e="way" k="highway" v="service">
                <line class='bridge-casing highway-service-bridge-casing' smart-linecap='no'/>
            </rule>
            <rule e="way" k="highway" v="unsurfaced">
                <line class='bridge-casing highway-unsurfaced-bridge-casing' smart-linecap='no'/>
            </rule>
            <rule e="way" k="highway" v="track">
                <line class='bridge-casing highway-track-bridge-casing' smart-linecap='no'/>
            </rule>
            <rule e="way" k="highway" v="byway">
                <line class='bridge-casing highway-byway-bridge-casing' smart-linecap='no'/>
            </rule>
            <rule e="way" k="highway" v="bridleway">
                <line class='bridge-casing highway-bridleway-bridge-casing' smart-linecap='no'/>
            </rule>
            <rule e="way" k="highway" v="cycleway">
                <line class='bridge-casing highway-cycleway-bridge-casing' smart-linecap='no'/>
            </rule>
            <rule e="way" k="highway" v="pedestrian">
                <line class='bridge-casing highway-pedestrian-bridge-casing' smart-linecap='no'/>
            </rule>
            <rule e="way" k="highway" v="footway|footpath">
                <line class='bridge-casing highway-footway-bridge-casing' smart-linecap='no'/>
            </rule>
            <rule e="way" k="highway" v="steps">
                <line class='bridge-casing highway-steps-bridge-casing' smart-linecap='no'/>
            </rule>
        </rule>


        <!-- Bridge cores -->
        <rule e="way" k="bridge" v="yes|true">
            <rule e="way" k="railway" v="rail">
                <line class='bridge-core railway-rail-bridge-core' smart-linecap='no'/>
            </rule>
            <rule e="way" k="railway" v="light_rail">
                <line class='bridge-core railway-light-rail-bridge-core' smart-linecap='no'/>
            </rule>
            <rule e="way" k="railway" v="subway">
                <line class='bridge-core railway-subway-bridge-core' smart-linecap='no'/>
            </rule>
            <rule e="way" k="railway" v="tram">
                <line class='bridge-core railway-tram-bridge-core' smart-linecap='no'/>
            </rule>
            <rule e="way" k="railway" v="narrow_gauge">
                <line class='bridge-core railway-narrow-gauge-bridge-core' smart-linecap='no'/>
            </rule>
            <rule e="way" k="railway" v="preserved">
                <line class='bridge-core railway-preserved-bridge-core' smart-linecap='no'/>
            </rule>
            <rule e="way" k="railway" v="monorail">
                <line class='bridge-core railway-monorail-bridge-core' smart-linecap='no'/>
            </rule>
            <rule e="way" k="highway" v="motorway">
                <line class='bridge-core highway-motorway-bridge-core' smart-linecap='no'/>
            </rule>
            <rule e="way" k="highway" v="trunk">
                <line class='bridge-core highway-trunk-bridge-core' smart-linecap='no'/>
            </rule>
            <rule e="way" k="highway" v="primary">
                <line class='bridge-core highway-primary-bridge-core' smart-linecap='no'/>
            </rule>
            <rule e="way" k="highway" v="motorway_link">
                <line class='bridge-core highway-motorway-link-bridge-core' smart-linecap='no'/>
            </rule>
            <rule e="way" k="highway" v="trunk-link">
                <line class='bridge-core highway-trunk-link-bridge-core' smart-linecap='no'/>
            </rule>
            <rule e="way" k="highway" v="primary-link">
                <line class='bridge-core highway-primary-link-bridge-core' smart-linecap='no'/>
            </rule>
            <rule e="way" k="highway" v="secondary">
                <line class='bridge-core highway-secondary-bridge-core' smart-linecap='no'/>
            </rule>
            <rule e="way" k="highway" v="tertiary">
                <line class='bridge-core highway-tertiary-bridge-core' smart-linecap='no'/>
            </rule>
            <rule e="way" k="highway" v="unclassified|residential|minor">
                <line class='bridge-core highway-unclassified-bridge-core' smart-linecap='no'/>
            </rule>
            <rule e="way" k="highway" v="service">
                <line class='bridge-core highway-service-bridge-core' smart-linecap='no'/>
            </rule>
            <rule e="way" k="highway" v="unsurfaced">
                <line class='bridge-core highway-unsurfaced-bridge-core' smart-linecap='no'/>
            </rule>
            <rule e="way" k="highway" v="track">
                <line class='bridge-core highway-track-bridge-core' smart-linecap='no'/>
            </rule>
            <rule e="way" k="highway" v="byway">
                <line class='bridge-core highway-byway-bridge-core' smart-linecap='no'/>
            </rule>
            <rule e="way" k="highway" v="bridleway">
                <line class='bridge-core highway-bridleway-bridge-core' smart-linecap='no'/>
            </rule>
            <rule e="way" k="highway" v="cycleway">
                <line class='bridge-core highway-cycleway-bridge-core' smart-linecap='no'/>
            </rule>
            <rule e="way" k="highway" v="pedestrian">
                <line class='bridge-core highway-pedestrian-bridge-core' smart-linecap='no'/>
            </rule>
            <rule e="way" k="highway" v="footway|footpath">
                <line class='bridge-core highway-footway-bridge-core' smart-linecap='no'/>
            </rule>
            <rule e="way" k="highway" v="steps">
                <line class='bridge-core highway-steps-bridge-core' smart-linecap='no'/>
            </rule>
        </rule>

        <!-- Linear casings -->
        <rule e="way" k="tunnel" v="~|no">
			<rule e="way" k="highway" v="raceway">
				<rule e="way" k="use_status" v="~">
					<line class='highway-raceway-casing' />
				</rule>
				<rule e="way" k="use_status" v="disused">
					<line class='highway-raceway-casing-disused' />
				</rule>
				<rule e="way" k="use_status" v="dismantled">
					<line class='highway-raceway-casing-dismantled' />
				</rule>
			</rule>
            <rule e="way" k="highway" v="steps">
                <line class='highway-casing highway-steps-casing' />
            </rule>
            <rule e="way" k="highway" v="footway|footpath">
                <line class='highway-casing highway-footway-casing' smart-linecap='no'/>
            </rule>
            <rule e="way" k="highway" v="pedestrian">
                <line class='highway-casing highway-pedestrian-casing' />
            </rule>
            <rule e="way" k="highway" v="cycleway">
                <line class='highway-casing highway-cycleway-casing' smart-linecap='no'/>
            </rule>
            <rule e="way" k="highway" v="bridleway">
                <line class='highway-casing highway-bridleway-casing' smart-linecap='no'/>
            </rule>
            <rule e="way" k="highway" v="byway">
                <line class='highway-casing highway-byway-1-casing' smart-linecap='no'/>
                <line class='highway-casing highway-byway-2-casing' smart-linecap='no'/>
                <line class='highway-casing highway-byway-3-casing' smart-linecap='no'/>
            </rule>
            <rule e="way" k="highway" v="track">
                <line class='highway-casing highway-track-casing'/>
            </rule>
            <rule e="way" k="highway" v="unsurfaced">
                <line class='highway-casing highway-unsurfaced-casing' smart-linecap='no'/>
            </rule>
            <rule e="way" k="highway" v="service">
                <line class='highway-casing highway-service-casing' />
            </rule>
            <rule e="way" k="highway" v="unclassified|residential|minor">
                <line class='highway-casing highway-unclassified-casing' />
            </rule>
            <rule e="way" k="highway" v="tertiary">
                <line class='highway-casing highway-tertiary-casing' />
            </rule>
            <rule e="way" k="highway" v="secondary">
                <line class='highway-casing highway-secondary-casing' />
            </rule>
            <rule e="way" k="highway" v="primary_link">
                <line class='highway-casing highway-primary-link-casing' />
            </rule>
            <rule e="way" k="highway" v="trunk_link">
                <line class='highway-casing highway-trunk-link-casing' />
            </rule>
            <rule e="way" k="highway" v="motorway_link">
                <line class='highway-casing highway-motorway-link-casing' />
            </rule>
            <rule e="way" k="highway" v="primary">
                <line class='highway-casing highway-primary-casing' />
            </rule>
            <rule e="way" k="highway" v="trunk">
                <line class='highway-casing highway-trunk-casing' />
            </rule>
            <rule e="way" k="highway" v="motorway">
                <line class='highway-casing highway-motorway-casing' />
            </rule>
            <rule e="way" k="railway" v="monorail">
                <line class='railway-casing railway-monorail-casing' />
            </rule>
            <rule e="way" k="railway" v="preserved">
                <line class='railway-casing railway-preserved-casing' />
            </rule>
            <rule e="way" k="railway" v="narrow_gauge">
                <line class='railway-casing railway-narrow-gauge-casing' />
            </rule>
            <rule e="way" k="railway" v="tram">
                <line class='railway-casing railway-tram-casing' />
            </rule>
            <rule e="way" k="railway" v="subway">
                <line class='railway-casing railway-subway-casing' />
            </rule>
            <rule e="way" k="railway" v="light_rail">
                <line class='railway-casing railway-light-rail-casing' />
            </rule>
            <rule e="way" k="railway" v="rail">
                <line class='railway-casing railway-rail-casing' />
            </rule>
        </rule>

        <!-- Linear cores -->
        <rule e="way" k="tunnel" v="~|false|no">
			<rule e="way" k="highway" v="raceway">
				<rule e="way" k="use_status" v="~">
					<line class='highway-raceway-core' />
				</rule>
				<rule e="way" k="use_status" v="disused">
					<line class='highway-raceway-core-disused' />
				</rule>
				<rule e="way" k="use_status" v="dismantled">
					<line class='highway-raceway-core-dismantled' />
				</rule>
			</rule>
            <rule e="way" k="scramble" v="*">
                <line class='highway-core highway-scramble-core' />
            </rule>
			<rule e="way" k="highway" v="steps">
				<line class='highway-core highway-steps-core' smart-linecap='no'/>
			</rule>
			<rule e="way" k="highway" v="footway|footpath">
				<line class='highway-core highway-footway-core' />
			</rule>
			<rule e="way" k="highway" v="pedestrian">
				<line class='highway-core highway-pedestrian-core' />
			</rule>
			<rule e="way" k="highway" v="cycleway">
				<line class='highway-core highway-cycleway-core' />
			</rule>
			<rule e="way" k="highway" v="bridleway">
				<line class='highway-core highway-bridleway-core' />
			</rule>
			<rule e="way" k="highway" v="byway">
				<line class='highway-core highway-byway-2-casing' smart-linecap='no'/>
				<line class='highway-core highway-byway-3-casing' smart-linecap='no'/>
				<line class='highway-core highway-byway-1-core' />
			</rule>
			<rule e="way" k="highway" v="track">
				<line class='highway-core highway-track-core' />
			</rule>
            <rule e="way" k="highway" v="unsurfaced">
                <line class='highway-core highway-unsurfaced-core' />
            </rule>
            <rule e="way" k="highway" v="service">
                <line class='highway-core highway-service-core' />
            </rule>
            <rule e="way" k="highway" v="unclassified|residential|minor">
                <line class='highway-core highway-unclassified-core' />
            </rule>
            <rule e="way" k="highway" v="tertiary">
                <line class='highway-core highway-tertiary-core' />
            </rule>
            <rule e="way" k="highway" v="secondary">
                <line class='highway-core highway-secondary-core' />
            </rule>
            <rule e="way" k="highway" v="primary_link">
                <line class='highway-core highway-primary-link-core' />
            </rule>
			<rule e="way" k="highway" v="trunk_link">
				<line class='highway-core highway-trunk-link-core' />
			</rule>
			<rule e="way" k="highway" v="motorway_link">
				<line class='highway-core highway-motorway-link-core' />
			</rule>
			<rule e="way" k="highway" v="primary">
				<line class='highway-core highway-primary-core' />
			</rule>
			<rule e="way" k="highway" v="trunk">
				<line class='highway-core highway-trunk-core' />
			</rule>
			<rule e="way" k="highway" v="motorway">
				<line class='highway-core highway-motorway-core' />
			</rule>
            <rule e="way" k="railway" v="monorail">
                <line class='railway-core railway-monorail-core' />
            </rule>
            <rule e="way" k="railway" v="preserved">
                <line class='railway-core railway-preserved-core' />
            </rule>
            <rule e="way" k="railway" v="narrow_gauge">
                <line class='railway-core railway-narrow-gauge-core' />
            </rule>
            <rule e="way" k="railway" v="tram">
                <line class='railway-core railway-tram-core' />
            </rule>
            <rule e="way" k="railway" v="subway">
                <line class='railway-core railway-subway-core' />
            </rule>
            <rule e="way" k="railway" v="light_rail">
                <line class='railway-core railway-light-rail-core' />
            </rule>
            <rule e="way" k="railway" v="rail">
                <line class='railway-core railway-rail-1-core' />
                <line class='railway-core railway-rail-2-core' smart-linecap='no'/>
            </rule>
			<rule e="way" k="aeroway" v="runway">
			    <line class='aeroway-runway-core'/>
			</rule>
			<rule e="way" k="aeroway" v="taxiway">
			    <line class='aeroway-taxiway-core'/>
			</rule>
        </rule>

        <!-- Tunnels -->
        <rule e="way" k="tunnel" v="true|yes">
            <rule e="way" k="highway" v="steps">
				<line class='tunnel-casing highway-steps-casing tunnel' mask-class='tunnel-core highway-steps-core'/>
				<line class='highway-steps-casing highway-tunnel-ends'/>
            </rule>
            <rule e="way" k="highway" v="footway|footpath">
				<line class='tunnel-casing highway-footway-casing tunnel' mask-class='tunnel-core highway-footway-core'/>
				<line class='highway-footway-casing highway-tunnel-ends'/>
            </rule>
            <rule e="way" k="highway" v="pedestrian">
				<line class='tunnel-casing highway-pedestrian-casing tunnel' mask-class='tunnel-core highway-pedestrian-core'/>
				<line class='highway-pedestrian-casing highway-tunnel-ends'/>
            </rule>
            <rule e="way" k="highway" v="cycleway">
				<line class='tunnel-casing highway-cycleway-casing tunnel' mask-class='tunnel-core highway-cycleway-core'/>
				<line class='highway-cycleway-casing highway-tunnel-ends'/>
            </rule>
            <rule e="way" k="highway" v="bridleway">
				<line class='tunnel-casing highway-bridleway-casing tunnel' mask-class='tunnel-core highway-bridleway-core'/>
				<line class='highway-bridleway-casing highway-tunnel-ends'/>
            </rule>
            <rule e="way" k="highway" v="byway">
				<line class='tunnel-casing highway-byway-1-casing tunnel' mask-class='tunnel-core highway-byway-1-core'/>
				<line class='highway-byway-1-casing highway-tunnel-ends'/>
            </rule>
            <rule e="way" k="highway" v="track">
				<line class='tunnel-casing highway-track-casing tunnel' mask-class='tunnel-core highway-track-core'/>
				<line class='highway-track-casing highway-tunnel-ends'/>
            </rule>
            <rule e="way" k="highway" v="unsurfaced">
				<line class='tunnel-casing highway-unsurfaced-casing tunnel' mask-class='tunnel-core highway-unsurfaced-core'/>
				<line class='highway-unsurfaced-casing highway-tunnel-ends'/>
            </rule>
            <rule e="way" k="highway" v="service">
				<line class='tunnel-casing highway-service-casing tunnel' mask-class='tunnel-core highway-service-core'/>
				<line class='highway-service-casing highway-tunnel-ends'/>
            </rule>
            <rule e="way" k="highway" v="unclassified|residential|minor|tertiary">
				<line class='tunnel-casing highway-unclassified-casing tunnel' mask-class='tunnel-core highway-unclassified-core'/>
				<line class='highway-unclassified-casing highway-tunnel-ends'/>
            </rule>
            <rule e="way" k="highway" v="tertiary">
				<line class='tunnel-casing highway-tertiary-casing tunnel' mask-class='tunnel-core highway-tertiary-core'/>
				<line class='highway-tertiary-casing highway-tunnel-ends'/>
            </rule>
            <rule e="way" k="highway" v="secondary">
				<line class='tunnel-casing highway-secondary-casing tunnel' mask-class='tunnel-core highway-secondary-core'/>
				<line class='highway-secondary-casing highway-tunnel-ends'/>
            </rule>
            <rule e="way" k="highway" v="primary_link">
				<line class='tunnel-casing highway-primary-link-casing tunnel' mask-class='tunnel-core highway-primary-link-core'/>
				<line class='highway-primary-link-casing highway-tunnel-ends'/>
            </rule>
            <rule e="way" k="highway" v="trunk_link">
				<line class='tunnel-casing highway-trunk-link-casing tunnel' mask-class='tunnel-core highway-trunk-link-core'/>
				<line class='highway-trunk-link-casing highway-tunnel-ends'/>
            </rule>
            <rule e="way" k="highway" v="motorway_link">
				<line class='tunnel-casing highway-motorway-link-casing tunnel' mask-class='tunnel-core highway-motorway-link-core'/>
				<line class='highway-motorway-link-casing highway-tunnel-ends'/>
            </rule>
            <rule e="way" k="highway" v="primary">
				<line class='tunnel-casing highway-primary-casing tunnel' mask-class='tunnel-core highway-primary-core'/>
				<line class='highway-primary-casing highway-tunnel-ends'/>
            </rule>
            <rule e="way" k="highway" v="trunk">
				<line class='tunnel-casing highway-trunk-casing tunnel' mask-class='tunnel-core highway-trunk-core'/>
				<line class='highway-trunk-casing highway-tunnel-ends'/>
            </rule>
            <rule e="way" k="highway" v="motorway">
				<line class='tunnel-casing highway-motorway-casing tunnel' mask-class='tunnel-core highway-motorway-core'/>
				<line class='highway-motorway-casing highway-tunnel-ends'/>
            </rule>
            <rule e="way" k="railway" v="monorail">
				<line class='tunnel-casing railway-monorail-casing tunnel' mask-class='tunnel-core railway-monorail-core'/>
				<line class='railway-monorail-casing highway-tunnel-ends'/>
            </rule>
            <rule e="way" k="railway" v="preserved">
				<line class='tunnel-casing railway-preserved-casing tunnel' mask-class='tunnel-core railway-preserved-core'/>
				<line class='railway-preserved-casing highway-tunnel-ends'/>
            </rule>
            <rule e="way" k="railway" v="narrow_gauge">
				<line class='tunnel-casing railway-narrow-gauge-casing tunnel' mask-class='tunnel-core railway-narrow-gauge-core'/>
				<line class='railway-narrow-gauge-casing highway-tunnel-ends'/>
            </rule>
            <rule e="way" k="railway" v="tram">
				<line class='tunnel-casing railway-tram-casing tunnel' mask-class='tunnel-core railway-tram-core'/>
				<line class='railway-tram-casing highway-tunnel-ends'/>
            </rule>
            <rule e="way" k="railway" v="subway">
				<line class='tunnel-casing railway-subway-casing tunnel' mask-class='tunnel-core railway-subway-core'/>
				<line class='railway-subway-casing highway-tunnel-ends'/>
            </rule>
            <rule e="way" k="railway" v="light_rail">
				<line class='tunnel-casing railway-light-rail-casing tunnel' mask-class='tunnel-core railway-light-rail-core'/>
				<line class='railway-light-rail-casing highway-tunnel-ends'/>
            </rule>
			<rule e="way" k="railway" v="rail">
				<line class='tunnel-casing railway-rail-casing tunnel' mask-class='tunnel-core railway-rail-1-core'/>
				<line class='railway-rail-casing highway-tunnel-ends'/>
			</rule>
        </rule>

        <!-- highway motorway-junctions -->
        <rule e="node" k="highway" v="motorway_junction">
          <circle r="2.25" class="highway-motorway-junction" />
          <text k="name" class='highway-motorway-junction-caption' dy='-2px' />
          <text k="ref" class='highway-motorway-junction-caption' dy='+6px' />
        </rule>
        
        <!-- Linear cores (under construction) -->
        <rule e="way" k="highway" v="construction">
			<rule e="way" k="construction" v="steps">
				<line class='highway-core highway-steps-core under-construction' />
			</rule>
			<rule e="way" k="construction" v="footway|footpath">
				<line class='highway-core highway-footway-core under-construction' />
			</rule>
			<rule e="way" k="construction" v="pedestrian">
				<line class='highway-core highway-pedestrian-core under-construction' />
			</rule>
			<rule e="way" k="construction" v="cycleway">
				<line class='highway-core highway-cycleway-core under-construction' />
			</rule>
			<rule e="way" k="construction" v="bridleway">
				<line class='highway-core highway-bridleway-core under-construction' />
			</rule>
			<rule e="way" k="construction" v="byway">
				<line class='highway-core highway-byway-1-core under-construction' />
			</rule>
			<rule e="way" k="construction" v="track">
				<line class='highway-core highway-track-core under-construction' />
			</rule>
            <rule e="way" k="construction" v="unsurfaced">
                <line class='highway-core highway-unsurfaced-core under-construction' />
            </rule>
            <rule e="way" k="construction" v="service">
                <line class='highway-core highway-service-core under-construction' />
            </rule>
            <rule e="way" k="construction" v="unclassified|residential|minor">
                <line class='highway-core highway-unclassified-core under-construction' />
            </rule>
            <rule e="way" k="construction" v="tertiary">
                <line class='highway-core highway-tertiary-core under-construction' />
            </rule>
            <rule e="way" k="construction" v="secondary">
                <line class='highway-core highway-secondary-core under-construction' />
            </rule>
            <rule e="way" k="construction" v="primary_link">
                <line class='highway-core highway-primary-link-core under-construction' />
            </rule>
			<rule e="way" k="construction" v="trunk_link">
				<line class='highway-core highway-trunk-link-core under-construction' />
			</rule>
			<rule e="way" k="construction" v="motorway_link">
				<line class='highway-core highway-motorway-link-core under-construction' />
			</rule>
			<rule e="way" k="construction" v="primary">
				<line class='highway-core highway-primary-core under-construction' />
			</rule>
			<rule e="way" k="construction" v="trunk">
				<line class='highway-core highway-trunk-core under-construction' />
			</rule>
			<rule e="way" k="construction" v="motorway">
				<line class='highway-core highway-motorway-core under-construction' />
			</rule>
		</rule>
		<rule e="way" k="highway" v="construction">
            <rule e="way" k="construction" v="monorail">
                <line class='railway-core railway-monorail-core under-construction' />
            </rule>
            <rule e="way" k="construction" v="preserved">
                <line class='railway-core railway-preserved-core under-construction' />
            </rule>
            <rule e="way" k="construction" v="narrow_gauge">
                <line class='railway-core railway-narrow-gauge-core under-construction' />
            </rule>
            <rule e="way" k="construction" v="tram">
                <line class='railway-core railway-tram-core under-construction' />
            </rule>
            <rule e="way" k="construction" v="subway">
                <line class='railway-core railway-subway-core under-construction' />
            </rule>
            <rule e="way" k="construction" v="light_rail">
                <line class='railway-core railway-light-rail-core under-construction' />
            </rule>
            <rule e="way" k="construction" v="rail">
                <line class='railway-core railway-rail-1-core under-construction' />
            </rule>
        </rule>

		<!-- Mini-roundabouts -->
        <rule e="node" k="highway" v="mini_roundabout">
	        <rule e="node" k="direction" v="clockwise">
				<symbol xlink:href="#symbol-roundabout_left" width='4px' height='4px' transform='translate(0,0)'/>
			</rule>
			<else> <!-- Default is anti-clockwise -->
				<symbol xlink:href="#symbol-roundabout_right" width='4px' height='4px' transform='translate(0,0)'/>
            </else>
        </rule>


		<!-- Oneway markers -->
        <rule e="way" k="tunnel" v="~|false|no">
			<rule e="way" k="highway" v="*">
	            <rule e="way" k="oneway" v="1|yes|true">
					<line class="oneway-casing oneway-casing-1" smart-linecap='no' />
					<line class="oneway-casing oneway-casing-2" smart-linecap='no' />
					<line class="oneway-casing oneway-casing-3" smart-linecap='no' />
					<line class="oneway-casing oneway-casing-4" smart-linecap='no' />
					<line class="oneway-casing oneway-casing-5" smart-linecap='no' />
					<line class="oneway-casing oneway-casing-6" smart-linecap='no' />
					<line class="oneway-casing oneway-casing-7" smart-linecap='no' />
					<line class="oneway-casing oneway-casing-8" smart-linecap='no' />
					<line class="oneway-core oneway-core-1" smart-linecap='no' />
					<line class="oneway-core oneway-core-2" smart-linecap='no' />
					<line class="oneway-core oneway-core-3" smart-linecap='no' />
					<line class="oneway-core oneway-core-4" smart-linecap='no' />
					<line class="oneway-core oneway-core-5" smart-linecap='no' />
					<line class="oneway-core oneway-core-6" smart-linecap='no' />
					<line class="oneway-core oneway-core-7" smart-linecap='no' />
				</rule>
	            <rule e="way" k="oneway" v="-1">
					<line class="otherway" />
				</rule>
			</rule>
			<!-- Motorway implies oneway-ness -->
			<rule e="way" k="highway" v="motorway|motorway_link">
					<line class="oneway-casing oneway-casing-1" smart-linecap='no'/>
					<line class="oneway-casing oneway-casing-2" smart-linecap='no'/>
					<line class="oneway-casing oneway-casing-3" smart-linecap='no'/>
					<line class="oneway-casing oneway-casing-4" smart-linecap='no'/>
					<line class="oneway-casing oneway-casing-5" smart-linecap='no'/>
					<line class="oneway-casing oneway-casing-6" smart-linecap='no'/>
					<line class="oneway-casing oneway-casing-7" smart-linecap='no'/>
					<line class="oneway-casing oneway-casing-8" smart-linecap='no'/>
					<line class="oneway-core oneway-core-1" smart-linecap='no'/>
					<line class="oneway-core oneway-core-2" smart-linecap='no'/>
					<line class="oneway-core oneway-core-3" smart-linecap='no'/>
					<line class="oneway-core oneway-core-4" smart-linecap='no'/>
					<line class="oneway-core oneway-core-5" smart-linecap='no'/>
					<line class="oneway-core oneway-core-6" smart-linecap='no'/>
					<line class="oneway-core oneway-core-7" smart-linecap='no'/>
			</rule>
			<!-- Roundabouts are oneway in the direction of the segments -->
			<rule e="way" k="junction" v="roundabout">
					<line class="oneway-casing oneway-casing-1" smart-linecap='no'/>
					<line class="oneway-casing oneway-casing-2" smart-linecap='no'/>
					<line class="oneway-casing oneway-casing-3" smart-linecap='no'/>
					<line class="oneway-casing oneway-casing-4" smart-linecap='no'/>
					<line class="oneway-casing oneway-casing-5" smart-linecap='no'/>
					<line class="oneway-casing oneway-casing-6" smart-linecap='no'/>
					<line class="oneway-casing oneway-casing-7" smart-linecap='no'/>
					<line class="oneway-casing oneway-casing-8" smart-linecap='no'/>
					<line class="oneway-core oneway-core-1" smart-linecap='no'/>
					<line class="oneway-core oneway-core-2" smart-linecap='no'/>
					<line class="oneway-core oneway-core-3" smart-linecap='no'/>
					<line class="oneway-core oneway-core-4" smart-linecap='no'/>
					<line class="oneway-core oneway-core-5" smart-linecap='no'/>
					<line class="oneway-core oneway-core-6" smart-linecap='no'/>
					<line class="oneway-core oneway-core-7" smart-linecap='no'/>
			</rule>
 		</rule>


        <!-- Aerialways -->
        <rule e="node|way" k="aerialway" v="*">
            <line class='aerialway-line'/>
            <line class='aerialway-struts'/>
        </rule>


		<!-- Natural features -->
		<rule e="node" k="natural" v="peak">
			<symbol xlink:href="#symbol-peak" width='4px' height='4px' transform='translate(-2,-2)' />
		</rule>


		<!-- Draw marine features -->
		<rule e="way" k="man_made" v="pier">
			<line class="artificial-pier-casing"/>
		</rule>

		<rule e="way" k="man_made" v="pier">
			<line class="artificial-pier-core"/>
		</rule>


        <!-- Power lines and pylons -->
        <rule e="node" k="power" v="tower">
            <symbol xlink:href="#power-tower" width='2px' height='2px' transform='translate(-1,-1)'/>
        </rule>
        <rule e="way" k="power" v="line">
            <line class='power-line'/>
        </rule>


        <!-- Non-pysical routes -->
        <rule e="segment|way" k="route" v="ferry">
            <line class='route-ferry' />
        </rule>


        <!-- Railway stations -->
        <rule e="node" k="railway" v="station">
			<rule e="node" s="way" k="railway" v="rail">
	            <circle r="1.5" class="railway-station" />
			</rule>
			<else>
	            <circle r="1" class="railway-halt" />
			</else>
        </rule>
        <rule e="node" k="railway" v="halt">
            <circle r="1" class="railway-halt" />
        </rule>

        <!-- Level crossings -->
        <!-- For everything, except trams, if it shares a node with a road then render a railroad crossing symbol.  -->
        <rule e="node" s="way" k="railway" v="rail|light_rail|subway|narrow_gauge|preserved|monorail">
			<rule e="node" s="way" k="railway" v="rail">
				<rule e="node" s="way" k="highway" v="motorway|trunk|primary|secondary|tertiary|minor|unclassified|residential|service|unsurfaced|track">
					<symbol xlink:href="#symbol-railway-crossing" width='7px' height='7px' transform='translate(-3.5,-3.5)' />
				</rule>
			</rule>
			<else>
			    <rule e="node" s="way" k="highway" v="motorway|trunk|primary|secondary|tertiary|minor|unclassified|residential|service|unsurfaced|track">
					<symbol xlink:href="#symbol-railway-crossing" width='6px' height='6px' transform='translate(-3,-3)' />
			    </rule>
			</else>
        </rule>


        <!-- Gates -->
        <rule e="node" k="highway" v="gate">
			<rule e="node" k="status" v="open">
				<wayMarker class='gate-open' />
			</rule>
			<else>
				<rule e="node" k="status" v="locked">
					<wayMarker class='gate-locked' />
				</rule>
				<else>
					<wayMarker class='gate-closed' />
				</else>
			</else>
        </rule>

    </xsl:template>

    <xsl:template name="defs">
        <!-- SVG Definitions - markers, symbols etc go here -->

            <style id="styles" type="text/css" xmlns="http://www.w3.org/2000/svg">
                /* DO NOT DELETE - Used by osmarender.xsl */
                .untagged-segments {
                    stroke-width: 0.5px;
                    stroke-linejoin: round;
                    stroke-linecap: butt;
                    stroke: #e0e0e0;
                    stroke-dasharray: 0.5,0.5;
                }

                .gate-locked {
                    fill: none;
                    stroke: red;
                    stroke-width: 2px;
                    stroke-opacity: 0;
                    marker-mid: url(#marker-gate-locked);
                }

                .gate-closed {
                    fill: none;
                    stroke: red;
                    stroke-width: 2px;
                    stroke-opacity: 0;
                    marker-mid: url(#marker-gate-closed);
                }

                .gate-open {
                    fill: none;
                    stroke: red;
                    stroke-width: 2px;
                    stroke-opacity: 0;
                    marker-mid: url(#marker-gate-open);
                }
                
                /* Railways - generic styles */
                .railway-casing {
                    stroke-linecap: butt;
                    stroke-linejoin: round;
                    fill: none;
                }

                .railway-core {
                    stroke-linecap: butt;
                    stroke-linejoin: round;
                    fill: none;
                }				


                /* Highways - generic styles */
                .highway-casing {
                    stroke-linecap: square;
                    stroke-linejoin: round;
                    fill: none;
                }

                .highway-core {
                    stroke-linecap: square;
                    stroke-linejoin: round;
                    fill: none;
                }

                .highway-ref {
                    fill: #666666;
                    stroke: white;
                    font-family: "DejaVu Sans";
                    font-weight: normal;
                    text-anchor: middle;
                }

                .highway-name {
                    fill: black;
                    font-family: "DejaVu Sans";
                    font-weight: normal;
                    stroke: white;
                    text-anchor: middle;
                 }

                .bridge-casing {
                    stroke-linecap: butt;
                    stroke-linejoin: round;
                    stroke: #777777;
                    fill: none;
                    marker-start: url(#bridge-casing-start);
                    marker-end: url(#bridge-casing-end);
                }
                
                .bridge-core {
                    stroke-linecap: butt;
                    stroke-linejoin: round;
                    stroke: #f8f8f8;
                    fill: none;
                }

                .tunnel-casing {
                    stroke-linecap: butt;
                    stroke-linejoin: round;
                    fill: none;
                }

                .tunnel-core {
                    stroke-linecap: butt;
                    stroke-linejoin: round;
                    fill: none;
                }

                .tunnel { stroke-dasharray: 0.8, 0.8; }


                .railway-rail-bridge-casing             { stroke-width: 5.5px; }
                .railway-rail-bridge-core               { stroke-width: 4.5px; }
                .railway-rail-casing                    { stroke-width: 2.0px; stroke: #aaaaaa; }
                .railway-rail-1-core                    { stroke-width: 1.6px; stroke: #ffffff; }
                .railway-rail-2-core                    { stroke-width: 3.0px; stroke: #aaaaaa; stroke-dasharray: 0.2, 2.0; }

                .railway-light-rail-bridge-casing       { stroke-width: 4.1px; }
                .railway-light-rail-bridge-core         { stroke-width: 3.1px; }
                .railway-light-rail-casing              { stroke-width: 1.6px; stroke: #aaaaaa; }
                .railway-light-rail-core                { stroke-width: 1.2px; stroke: #ec2d2d; stroke-dasharray: 1, 3; }

                .railway-subway-bridge-casing           { stroke-width: 4.1px; }
                .railway-subway-bridge-core             { stroke-width: 3.1px; }
                .railway-subway-casing                  { stroke-width: 1.6px; stroke: #aaaaaa; }
                .railway-subway-core                    { stroke-width: 1.2px; stroke: #ec2d2d; stroke-dasharray: 1, 3; }

                .railway-tram-bridge-casing             { stroke-width: 4.1px; }
                .railway-tram-bridge-core               { stroke-width: 3.1px; }
                .railway-tram-casing                    { stroke-width: 1.2px; stroke: #aaaaaa; }
                .railway-tram-core                      { stroke-width: 1.0px; stroke: #ec2d2d; stroke-dasharray: 1, 3; }

                .railway-narrow-gauge-bridge-casing     { stroke-width: 4.1px; }
                .railway-narrow-gauge-bridge-core       { stroke-width: 3.1px; }
                .railway-narrow-gauge-casing            { stroke-width: 1.6px; stroke: #aaaaaa; }
                .railway-narrow-gauge-core              { stroke-width: 1.2px; stroke: #ec2d2d; stroke-dasharray: 1, 3;}

                .railway-preserved-bridge-casing        { stroke-width: 4.7px; }
                .railway-preserved-bridge-core          { stroke-width: 3.7px; }
                .railway-preserved-casing               { stroke-width: 2.2px; stroke: #666666; }
                .railway-preserved-core                 { stroke-width: 1.8px; stroke: #666666; }
          
                .railway-monorail-bridge-casing         { stroke-width: 4.5px; }
                .railway-monorail-bridge-core           { stroke-width: 3.5px; }
                .railway-monorail-casing                { stroke-width: 2.0px; stroke: #666666; }
                .railway-monorail-core                  { stroke-width: 1.6px; stroke: #a65ca3; }

                .highway-motorway-bridge-casing         { stroke-width: 4.6px; }
                .highway-motorway-bridge-core           { stroke-width: 4.2px; }
                .highway-motorway-casing				{ stroke-width: 3.8px;  stroke: #777777; }
                .highway-motorway-core					{ stroke-width: 3.4px;  stroke: #809BC0; }
                .highway-motorway-name                  { stroke-width: 0px;     font-size: 3px; }
                .highway-motorway-ref                   { stroke-width: 0px;     font-size: 4px; }

                .highway-trunk-bridge-casing            { stroke-width: 4.6px; }
                .highway-trunk-bridge-core              { stroke-width: 4.2px; }
                .highway-trunk-casing                   { stroke-width: 3.4px;     stroke: #777777; }
                .highway-trunk-core                     { stroke-width: 3px;  stroke: #ffffff; }
                .highway-trunk-name                     { stroke-width: 0px;     font-size: 3px; }
                .highway-trunk-ref                      { stroke-width: 0px;     font-size: 4px; }

                .highway-primary-bridge-casing          { stroke-width: 4.6px; }
                .highway-primary-bridge-core            { stroke-width: 4.2px; }
                .highway-primary-casing                 { stroke-width: 3.4px;     stroke: #777777; }
                .highway-primary-core                   { stroke-width: 3px;  stroke: #ffffff; }
                .highway-primary-name                   { stroke-width: 0px;     font-size: 3px; }
                .highway-primary-ref					{ stroke-width: 0px;     font-size: 4px; }

                .highway-motorway-link-bridge-casing    { stroke-width: 4.6px; }
                .highway-motorway-link-bridge-core      { stroke-width: 4.2px; }
                .highway-motorway-link-casing           { stroke-width: 3.4px;     stroke: #777777; }
                .highway-motorway-link-core             { stroke-width: 3px;  stroke: #ffffff; }
                .highway-motorway-link-name             { stroke-width: 0px;     font-size: 3px; }
                .highway-motorway-link-ref              { stroke-width: 0px;     font-size: 4px; }

                .highway-trunk-link-bridge-casing       { stroke-width: 4.6px; }
                .highway-trunk-link-bridge-core         { stroke-width: 4.2px; }
                .highway-trunk-link-casing              { stroke-width: 3.4px;     stroke: #777777; }
                .highway-trunk-link-core                { stroke-width: 3px;  stroke: #ffffff; }
                .highway-trunk-link-name                { stroke-width: 0px;     font-size: 3px; }
                .highway-trunk-link-ref                 { stroke-width: 0px;     font-size: 4px; }

                .highway-primary-link-bridge-casing     { stroke-width: 4.6px; }
                .highway-primary-link-bridge-core       { stroke-width: 4.2px; }
                .highway-primary-link-casing            { stroke-width: 3.4px;  stroke: #777777; }
                .highway-primary-link-core              { stroke-width: 3px;   stroke: #ffffff; }
                .highway-primary-link-name              { stroke-width: 0px;     font-size: 3px; }
                .highway-primary-link-ref               { stroke-width: 0px;     font-size: 4px; }

                .highway-secondary-bridge-casing        { stroke-width: 4.6px; }
                .highway-secondary-bridge-core          { stroke-width: 4.2px; }
                .highway-secondary-casing				{ stroke-width: 3.4px;	 stroke: #777777; }
                .highway-secondary-core                 { stroke-width: 3px;  stroke: #ffffff; }
                .highway-secondary-name                 { stroke-width: 0px;     font-size: 3px;}
                .highway-secondary-ref                  { stroke-width: 0px;     font-size: 4px; }

                .highway-tertiary-bridge-casing         { stroke-width: 4.6px; }
                .highway-tertiary-bridge-core           { stroke-width: 4.2px; }
                .highway-tertiary-casing                { stroke-width: 3.4px;  stroke: #777777; }
                .highway-tertiary-core                  { stroke-width: 3px;   stroke: #ffffff; }
                .highway-tertiary-name                  { stroke-width: 0px;     font-size: 3px; }
                .highway-tertiary-ref					{ stroke-width: 0px;     font-size: 3px; }

                .highway-unclassified-bridge-casing     { stroke-width: 3.1px; }
                .highway-unclassified-bridge-core       { stroke-width: 2.9px; }
                .highway-unclassified-casing            { stroke-width: 2.5px;  stroke: #777777; }
                .highway-unclassified-core              { stroke-width: 2.25px;   stroke: #ffffff; }
                .highway-unclassified-name              { stroke-width: 0px;     font-size: 2.5px; }
                .highway-unclassified-ref               { stroke-width: 0px;     font-size: 2.5px; }

                .highway-service-bridge-casing          { stroke-width: 2.8px; }
                .highway-service-bridge-core            { stroke-width: 2.6px; }
                .highway-service-casing                 { stroke-width: 2.2px;   stroke: #777777; }
                .highway-service-core                   { stroke-width: 2px;   stroke: #ffffff; }
                .highway-service-name                   { stroke-width: 0px;     font-size: 2.5px; }
                .highway-service-ref                    { stroke-width: 0px;     font-size: 2.5px; }

                .highway-unsurfaced-bridge-casing       { stroke-width: 2.8px; }
                .highway-unsurfaced-bridge-core         { stroke-width: 2.6px; }
                .highway-unsurfaced-casing              { stroke-width: 2.2px;   stroke: #777777; stroke-dasharray: 2, 1; stroke-linecap: butt; }
                .highway-unsurfaced-core                { stroke-width: 2px;   stroke: #ffffff; }
                .highway-unsurfaced-name                { stroke-width: 0px;     font-size: 3px; }
                .highway-unsurfaced-ref                 { stroke-width: 0px;     font-size: 3px; }

                .highway-track-bridge-casing            { stroke-width: 2.8px; }
                .highway-track-bridge-core              { stroke-width: 2.6px; }
                .highway-track-casing                   { stroke-width: 2.2px;   stroke: #d79331; }
                .highway-track-core                     { stroke-width: 2px;   stroke: #ffffff; }
                .highway-track-name                     { stroke-width: 0px;     font-size: 3px; }
                .highway-track-ref                      { stroke-width: 0px;     font-size: 3px; }

                .highway-byway-bridge-casing            { stroke-width: 2.8px; }
                .highway-byway-bridge-core              { stroke-width: 2.6px; }
                .highway-byway-1-casing                 { stroke-width: 2px;     stroke: #555555;  stroke-dasharray: 1.4, 0.4; stroke-linecap: butt;}
                .highway-byway-2-casing                 { stroke-width: 1.6px;   stroke: #efadaa; }
                .highway-byway-3-casing                 { stroke-width: 2.8px;   stroke: #555555;  stroke-dasharray: 0.2, 1.6; stroke-dashoffset: 1.2; stroke-linecap: butt; }
                .highway-byway-1-core                   { stroke-width: 0.8px;   stroke: #efadaa; }
                .highway-byway-name                     { stroke-width: 0px;     font-size: 2.5px; }
                .highway-byway-ref                      { stroke-width: 0px;     font-size: 2.5px; }

                .highway-bridleway-bridge-casing        { stroke-width: 3.0px; }
                .highway-bridleway-bridge-core          { stroke-width: 2.8px; }
                .highway-bridleway-casing               { stroke-width: 2px;     stroke: #777777;  stroke-dasharray: 1.4, 0.4; stroke-linecap: butt; }
                .highway-bridleway-core                 { stroke-width: 1.6px;   stroke: #e3e9f1; }
                .highway-bridleway-name                 { stroke-width: 0px;     font-size: 3px; }
                .highway-bridleway-ref                  { stroke-width: 0px;     font-size: 3px; }

                .highway-cycleway-bridge-casing         { stroke-width: 2.8px; }
                .highway-cycleway-bridge-core           { stroke-width: 2.6px; }
                .highway-cycleway-casing                { stroke-width: 1.8px;     stroke: #777777; stroke-dasharray: 0.4, 0.4; stroke-linecap: butt;}
                .highway-cycleway-core                  { stroke-width: 1.6px;   stroke: #d1ead1; }
                .highway-cycleway-name                  { stroke-width: 0px;     font-size: 3px; }
                .highway-cycleway-ref                   { stroke-width: 0px;     font-size: 3px; }

                .highway-pedestrian-bridge-casing       { stroke-width: 3.4px; }
                .highway-pedestrian-bridge-core         { stroke-width: 3.2px; }
                .highway-pedestrian-casing              { stroke-width: 2.2px;   stroke: #aaaaaa; }
                .highway-pedestrian-core                { stroke-width: 2px;     stroke: #eeeeee; }
                .highway-pedestrian-name                { stroke-width: 0px;     font-size: 3px; }
                .highway-pedestrian-ref                 { stroke-width: 0px;     font-size: 3px; }

                .highway-footway-bridge-casing          { stroke-width: 2.2px; }
                .highway-footway-bridge-core            { stroke-width: 2px; }
                .highway-footway-casing                 { stroke-width: 1.2px;   stroke: #777777; stroke-dasharray: 0.4, 0.4; stroke-linecap: butt;}
                .highway-footway-core                   { stroke-width: 1px;     stroke: #efeaa0; }
                .highway-footway-name                   { stroke-width: 0px;     font-size: 3px; }
                .highway-footway-ref                    { stroke-width: 0px;     font-size: 3px; }

                .highway-steps-bridge-casing            { stroke-width: 2.2px; }
                .highway-steps-bridge-core              { stroke-width: 2px; }
                .highway-steps-casing                   { stroke-width: 1.2px;   stroke: #777777; }
                .highway-steps-core                     { stroke-width: 1px;     stroke: #e5e0c2; stroke-dasharray: 0.6, 0.2; stroke-linecap: butt;}
                .highway-steps-name                     { stroke-width: 0px;     font-size: 3px; }
                .highway-steps-ref                      { stroke-width: 0px;     font-size: 3px; }

                .highway-scramble-core                  { stroke-width: 0.3px;   stroke: #777777; stroke-dasharray: 1.6, 0.4; stroke-linecap: butt;}
                .highway-scramble-name                  { stroke-width: 1.0px;   fill: black;  font-size: 3px; }
                
                /* Aeroways */
                .aeroway-apron {
                    stroke-width: 0.6px;
                    stroke: none;
                    fill: #f0f0f0;
                }

                .aeroway-taxiway-casing {
                    stroke-width: 6px;
                    stroke-linecap: butt;
                    stroke-linejoin: round;
                    stroke: #000000;
                    fill: none;
                }

                .aeroway-taxiway-core {
                    stroke-width: 4px;
                    stroke-linecap: butt;
                    stroke-linejoin: round;
                    stroke: #d4dcbd;
                    fill: none;
                }

                .aeroway-runway-core {
                    stroke-width: 10px;
                    stroke-linecap: square;
                    stroke-linejoin: round;
                    stroke: #d4dcbd;
                    fill: none;
                }

                .aeroway-runway-casing {
                    stroke-width: 14px;
                    stroke-linecap: square;
                    stroke-linejoin: round;
                    stroke: #000000;
                    fill: none;
                }

                .aeroway-aerodrome-caption {
                    fill: black;
                    stroke: white;
                    stroke-width: 0.6px;
                    font-family: "DejaVu Sans";
                    font-size: 12px;
                    font-weight: bold;
                }

                .aeroway-airport-caption {
                    fill: black;
                    stroke: white;
                    stroke-width: 0.6px;
                    font-family: "DejaVu Sans";
                    font-size: 20px;
                    font-weight: bold;
                }


                /* Waterways */
                .waterway-name-casing { 
                    stroke: #333333; 
                    fill: white; 
                    font-family: "DejaVu Sans"; 
                    font-weight: bold; 
                    text-anchor: middle; 
                    stroke-miterlimit: 1.5;
                }

                .waterway-name-core {
                    stroke: green;
                    fill: white;
                    stroke-width: 0px;
                    font-family: "DejaVu Sans";
                    font-weight: bold;
                    text-anchor: middle;
                    stroke-miterlimit: 1.5;
                }

                .waterway-casing {
                    stroke-linecap: round;
                    stroke-linejoin: round;
                    stroke: #424de8;
                    fill: none;
                }

                .waterway-core {
                    stroke-linecap: round;
                    stroke-linejoin: round;
                    stroke: #424de8;
                    fill: none;
                }

                .waterway-riverbank {
                    fill: #424de8;
                    stroke: #aaaaaa;
                    stroke-width: 0px;
                }

                .waterway-river-casing                  { stroke-width: 6px; }
                .waterway-river-core                    { stroke-width: 4px; }
                .waterway-river-name-casing             { font-size: 3px; stroke-width: 0.2px;}
                .waterway-river-name-core               { font-size: 3px; }

                .waterway-stream-casing                 { stroke-width: 1px; }
                .waterway-stream-core                   { stroke-width: 0.8px; }
                .waterway-stream-name-casing            { font-size: 3px; stroke-width: 0.2px;}
                .waterway-stream-name-core              { font-size: 3px; }

                .waterway-canal-casing                  { stroke-width: 4px; }
                .waterway-canal-core                    { stroke-width: 2px; }
                .waterway-canal-name-casing             { font-size: 3px; stroke-width: 0.2px;}
                .waterway-canal-name-core               { font-size: 3px; }

                .waterway-drain-casing                  { stroke-width: 2px; }
                .waterway-drain-core                    { stroke-width: 1px; }
                .waterway-drain-name-casing             { font-size: 3px; stroke-width: 0.2px;}
                .waterway-drain-name-core               { font-size: 3px; }


                /* Generic under-construction style - makes any way dashed */
                .under-construction { stroke: #f8f8f8; stroke-dasharray: 8, 10; }


                /* Ferry */
                .route-ferry {
                    stroke-width: 1px;
                    stroke-dasharray: 6,4;
                    stroke-linecap: butt;
                    stroke-linejoin: round;
                    stroke: #777777;
                    fill: none;
                }


                /* Place names */
                /* General style for captions */
                .place-caption {
                    fill: black;
                    stroke: none;
                    font-family: "DejaVu Sans";
                    font-weight: bold;
                    text-anchor: middle;
                }

                .caption-casing {
                    fill: white;
                    stroke: white;
                    font-family: "DejaVu Sans";
                    font-weight: bold;
                    text-anchor: middle;
                    stroke-miterlimit: 1.5;
                }

                .caption-core {
                    stroke: white;
                    stroke-width: 0px;
                    font-family: "DejaVu Sans";
                    font-weight: bold;
                    text-anchor: middle;
                    stroke-miterlimit: 1.5;
                }

                .peak-caption           { font-size: 4px; }
                .village-caption        { font-size: 6px; }
                .suburb-caption         { font-size: 6px; }
                .hamlet-caption         { font-size: 4px; }
                .farm-caption           { font-size: 3px; }


                /* Natural */
                .natural-water {
                    fill: url(#water-pattern);
                    stroke: #3333aa;
                    stroke-width: 0.2px;
                }

                .natural-coastline {
                    fill: #424de8;
                    stroke: #424de8;
                    stroke-width: 0.8px;
                }

                .natural-land {
                    fill: #ffffff;
                    stroke: #e0e0e0;
                    stroke-width: 0.2px;
                }

                .natural-beach {
                    fill: #eecc55;
                    stroke: none;
                }

                /* Landuse */
                .landuse-wood {
                    fill: #72bf81;
                    stroke: #6fc18e;
                    stroke-width: 0.2px;
                }

                .landuse-cemetery {
                    fill: url(#cemetery-pattern);
                    stroke: #eeeeee;
                    stroke-width: 0.2px;
                }

                .landuse-cemetery-christian {
                    fill: url(#cemetery-christian-pattern);
                    stroke: #eeeeee;
                    stroke-width: 0.2px;
                }

                .landuse-field {
                    fill: #bde3cb;
                    stroke: #6fc13d;
                    stroke-width: 0.2px;
                }

                .landuse-residential {
                    stroke: none;
                    fill: #f2f2f2;
                }

                .landuse-retail {
                    stroke: none;
                    fill: #ffebeb;
                }

                .landuse-industrial {
                    fill: #f8f8f8;
                    stroke: #eeeeee;
                    stroke-width: 0.2px;
                }

                .landuse-commercial {
                    fill: #fcffc9;
                    stroke: #eeeeee;
                    stroke-width: 0.2px;
                }

                .landuse-retail {
                    fill: #ffebeb;
                    stroke: #eeeeee;
                    stroke-width: 0.2px;
                }

                .landuse-runway {
                  stroke-width: 0.6px;
                  stroke: #808080;
                  fill: #d4dcbd;
                  }

                .landuse-runway-disused {
                  stroke-width: 0.6px;
                  stroke: #808080;
                  fill: #d4dcbd;
                  stroke-dasharray: 2, 2;
                  }

                .landuse-runway-dismantled {
                  stroke-width: 0.6px;
                  stroke: #808080;
                  fill: #fcffef;
                  stroke-dasharray: 0.6, 3.4;
                  opacity: 0.5;
                  }

                .artificial-pier-core {
                  stroke-width: 0.6px;
                  stroke-linecap: butt;
                  stroke-linejoin: round; 
                  stroke: #eeeeee;
                  fill: none;
                  }

                .artificial-pier-casing {
                  stroke-width: 0.8px;
                  stroke-linecap: butt;
                  stroke-linejoin: round; 
                  stroke: #cccccc;
                  fill: none;
                  }

                /* Leisure */
                .leisure-park {
                    fill: #c7f1a3;
                    stroke: #6fc18e;
                    stroke-width: 0.2px;
                }

                .leisure-stadium {
                    fill: #bde3cb;
                    stroke: #6fc18e;
                    stroke-width: 0.2px;
                }

                .leisure-track {
                    fill: #bde3cb;
                    stroke: #6fc18e;
                    stroke-width: 0.2px;
                }

                .sport {
                    fill: #bde3cb;
                    stroke: #6fc18e;
                    stroke-width: 0.2px;
                }

                .amenity-parking {
                    fill: #f7efb7;
                    stroke: #e9dd72;
                    stroke-width: 0.2px;
                }

                .amenity-school {
                    fill: #dfafdd;
                    stroke: #e9dd72;
                    stroke-width: 0.2px;
                }


                /* Non-physical boundaries */
                .boundary {
                    display: none;
                    stroke-linecap: butt;
                    stroke-linejoin: round;
                    fill: none;
                }

                .boundary-administrative-state-casing {
                    display: none;
                    stroke-width: 5px; 
                    stroke: #ffff00;
                    opacity: 0.5;
                }

                .boundary-administrative-state-core {
                    display: none;
                    stroke-width: 0.5px; 
                    stroke: #f9574b;
                    stroke-dasharray: 5, 1, 1, 1;
                }


                .boundary-administrative-parish-core {
                    display: none;
                    stroke-width: 0.5px; 
                    stroke: #f9574b;
                    stroke-dasharray: 5, 1, 1, 1;
                }


                /* Racetracks */
                .highway-raceway-casing {
                  stroke-width: 4px; 
                  stroke-linecap: butt; 
                  stroke-linejoin: round; 
                  fill: none;
                  stroke: #101010;
                  }

                .highway-raceway-casing-disused {
                  stroke-width: 4px; 
                  stroke-linecap: butt; 
                  stroke-linejoin: round; 
                  fill: none;
                  stroke: #808080;
                  stroke-dasharray: 2, 2;
                  }

                .highway-raceway-casing-dismantled {
                  stroke-width: 4px; 
                  stroke-linecap: butt; 
                  stroke-linejoin: round; 
                  fill: none;
                  stroke: #808080;
                  stroke-dasharray: 0.6, 3.4;
                  opacity: 0.5;
                  }

                .highway-raceway-core {
                  stroke-width: 3px; 
                  stroke-linecap: butt; 
                  stroke-linejoin: round; 
                  fill: none;
                  stroke: #f0f0f0;
                  }

                .highway-raceway-core-disused {
                  stroke-width: 3px; 
                  stroke-linecap: butt; 
                  stroke-linejoin: round; 
                  fill: none;
                  stroke-dasharray: 2, 2;
                  stroke: #f7f7f7;
                  }

                .highway-raceway-core-dismantled {
                  stroke-width: 3px; 
                  stroke-linecap: butt; 
                  stroke-linejoin: round; 
                  fill: none;
                  stroke: #fbfbfb;
                  stroke-dasharray: 0.6, 3.4;
                  opacity: 0.5;
                  }
                  
                .landuse-raceway {
                  stroke-width: 0.6px; 
                  stroke-linecap: butt; 
                  stroke-linejoin: round; 
                  fill: #f0f0f0;
                  stroke: #101010;
                  }

                .landuse-raceway-disused {
                  stroke-width: 0.6px; 
                  stroke-linecap: butt; 
                  stroke-linejoin: round; 
                  fill: #f7f7f7;
                  stroke: #808080;
                  stroke-dasharray: 2, 2;
                  }

                .landuse-raceway-dismantled {
                  stroke-width: 0.6px; 
                  stroke-linecap: butt; 
                  stroke-linejoin: round; 
                  fill: #fbfbfb;
                  stroke: #808080;
                  stroke-dasharray: 0.6, 3.4;
                  opacity: 0.5;
                  }


                .railway-station                        { fill: #ec2d2d;        stroke: #666666; stroke-width: 0.5px; }
                .railway-station-caption-casing         { stroke-width: 0.5px;  font-size: 3px; }
                .railway-station-caption-core           { fill: #ec2d2d;        font-size: 3px; }

                .railway-halt                           { fill: #ec2d2d;        stroke: #666666; stroke-width: 0.2px; }
                .railway-halt-caption-casing            { stroke-width: 0.4px;  font-size: 2.5px; }
                .railway-halt-caption-core              { fill: #ec2d2d;        font-size: 2.5px; }


                /* Tourism */
                .tourism-attraction {
                    fill: #f2caea;
                    stroke: #f124cb;
                    stroke-width: 0px;
                }

                .tourism-attraction-caption {
                    fill: #f124cb;
                    stroke: white;
                    stroke-width: 0px;
                    font-family: "DejaVu Sans";
                    font-size: 3px;
                    font-weight: bold;
                    text-anchor: middle;
                }


                .generic-caption-casing              { stroke-width: 1px;   font-size: 2px; }
                .generic-caption-core                { fill: #2e3ae6;        font-size: 2px; }

                .generic-poi {
                    fill: #2e3ae6;
                    stroke: #666666;
                    stroke-width: 0.2px;
                }

                /* Building */
                .building {
                    fill: #dddddd;
                    stroke: #cccccc;
                    stroke-width: 0.2px;
                }

                .building-block {
                    fill: #F3D6B6;
                    stroke: #6a5a8e;
                    stroke-width: 0.2px;
                }

                .building-residential {
                    fill: #c95e2a;
                    stroke: #80290a;
                    stroke-width: 0.2px;
                }


                /* Aerialway */
                .aerialway-line {
                    fill: none;
                    stroke: #202020;
                    stroke-width: 0.4px;
                }

                .aerialway-struts {
                    fill: none;
                    stroke: #202020;
                    stroke-width: 4px;
                    stroke-dasharray: 0.4,20;
                }

                /* Power line */
                .power-line {
                    stroke-width: 0.1px;
                    stroke-linecap: butt;
                    stroke-linejoin: round;
                    stroke: #cccccc;
                    stroke-dasharray: 2 ,2;
                    fill: none;
                }


                /* Area captions */
                .park-name {
                    fill: #444444;
                    font-family: "DejaVu Sans";
                    font-weight: normal;
                    stroke: white;
                    font-size: 4.5px;
                    stroke-width: 0.0px;
                 }

                .landuse-reservoir-name {
                    fill: #444444;
                    font-family: "DejaVu Sans";
                    font-weight: normal;
                    stroke: white;
                    font-size: 4.5px;
                    stroke-width: 0.0px;
                 }


                /* Oneway */
                .oneway-casing {
                    fill: none;
                    stroke-linecap: butt;
                    stroke: #777777;
                }

                .oneway-core {
                    fill: none;
                    stroke-linecap: butt;
                    stroke: #ffffff;
                }
                
                .oneway-casing-1 {
                    stroke-width: 0.4px;
                    stroke-dasharray: 4.2,55.8;
                    stroke-dashoffset: 46.2;
                }

                .oneway-casing-2 {
                    stroke-width: 0.95px;
                    stroke-dasharray: 0.6,59.4;
                    stroke-dashoffset: 43.4;
                }

                .oneway-casing-3 {
                    stroke-width: 0.8px;
                    stroke-dasharray: 0.6,59.4;
                    stroke-dashoffset: 43.2;
                }

                .oneway-casing-4 {
                    stroke-width: 0.65px;
                    stroke-dasharray: 0.8,59.2;
                    stroke-dashoffset: 43.2;
                }

                .oneway-casing-5 {
                    stroke-width: 0.5px;
                    stroke-dasharray: 1.0,59;
                    stroke-dashoffset: 43.2;
                }

                .oneway-casing-6 {
                    stroke-width: 0.35px;
                    stroke-dasharray: 1.2,58.8;
                    stroke-dashoffset: 43.2;
                }

                .oneway-casing-7 {
                    stroke-width: 0.2px;
                    stroke-dasharray: 1.4,58.6;
                    stroke-dashoffset: 43.2;
                }

                .oneway-casing-8 {
                    stroke-width: 0.1px;
                    stroke-dasharray: 1.6,58.4;
                    stroke-dashoffset: 43.2;
                }

                .oneway-core-1 {
                    stroke-width: 0.2px;
                    stroke-dasharray: 4,56;
                    stroke-dashoffset: 46;
                }

                .oneway-core-2 {
                    stroke-width: 0.85px;
                    stroke-dasharray: 0.4,59.6;
                    stroke-dashoffset: 43.2;
                }

                .oneway-core-3 {
                    stroke-width: 0.7px;
                    stroke-dasharray: 0.6,59.4;
                    stroke-dashoffset: 43.2;
                }

                .oneway-core-4 {
                    stroke-width: 0.55px;
                    stroke-dasharray: 0.8,59.2;
                    stroke-dashoffset: 43.2;
                }

                .oneway-core-5 {
                    stroke-width: 0.4px;
                    stroke-dasharray: 1.0,59;
                    stroke-dashoffset: 43.2;
                }

                .oneway-core-6 {
                    stroke-width: 0.25px;
                    stroke-dasharray: 1.2,58.8;
                    stroke-dashoffset: 43.2;
                }

                .oneway-core-7 {
                    stroke-width: 0.1px;
                    stroke-dasharray: 1.4,58.6;
                    stroke-dashoffset: 43.2;
                }

                .otherway {
                    fill: none;
                    stroke: red;
                    stroke-width: 2px;
                    stroke-opacity: 0;
                    /* marker-start: url(#marker-otherway-start); */
                    marker-end: url(#marker-otherway-end);
                }


                /* Map decoration */
                .map-grid-line {
                    fill: none;
                    stroke: #8080ff;
                    stroke-width: 0.1px;
                    stroke-opacity: 0.5;
                }

                .map-border-casing {
                    fill: none;
                    stroke: #8080ff;
                    stroke-width: 3px;
                    stroke-miterlimit: 4;
                    stroke-dasharray: none;
                    stroke-opacity: 1;
                    stroke-linecap: round;
                }

                .map-border-core {
                    fill: none;
                    fill-opacity: 1;
                    fill-rule: nonzero;
                    stroke: #ffffff;
                    stroke-width: 2px;
                    stroke-miterlimit: 0;
                    stroke-dashoffset: -0.5px;
                    stroke-opacity: 1;
                }

                .map-scale-casing {
                    fill: none;
                    stroke: #8080ff;
                    stroke-width: 4px;
                    stroke-linecap: butt;
                }

                .map-scale-core {
                    fill: none;
                    stroke: #ffffff;
                    stroke-width: 3px;
                    stroke-linecap: butt;
                }

                .map-scale-bookend {
                    fill: none;
                    stroke: #8080ff;
                    stroke-width: 1px;
                    stroke-linecap: butt;
                }

                .map-scale-caption {
                    font-family: "DejaVu Sans";
                    font-size: 10px;
                    fill: #8080ff;
                }

                <!-- map background must be the same for all zooms or else empty tile detection will fail -->
                .map-background {
                    fill: #d4d4d4;
                    stroke: none;
                }

                .boundary-selected-area {
                    fill: #f8f8f8;
                    stroke: none;
                }

                .map-title {
                    font-family: "DejaVu Sans";
                    font-size: 20px;
                    text-anchor: middle;
                    fill: black;
                }

                .map-title-background {
                    fill: white;
                }

                .map-marginalia-background {
                    fill: white;
                }

                .highway-tunnel-ends {
                    stroke-opacity: 0;
                    fill: none;
                    marker-start: url(#marker-tunnel-start);
                    marker-end: url(#marker-tunnel-end);
                 }

                 .icon-see {
                      fill: #3077bd;
                      fill-opacity: 1;
                      fill-rule: evenodd;
                      font-size: 12;
                      stroke: none;
                 }

                 .icon-sleep {
                      fill: #000088;
                      fill-opacity: 1;
                      fill-rule: evenodd;
                      font-size: 12;
                      stroke: none;
                 }

                 .icon-buy {
                      fill: #00ae98;
                      fill-opacity: 1;
                      fill-rule: evenodd;
                      font-size: 12;
                      stroke: none;
                 }

                 .icon-eat {
                    font-size: 12px;
                    fill: #ac2100;
                    fill-opacity: 1;
                    fill-rule: evenodd;
                 }

                 .icon-drink {
                    font-size: 12px;
                    fill: #810061;
                    fill-opacity: 1;
                    fill-rule: evenodd
                 }

                 .icon-label {
                    font-style: normal;
                    font-variant: normal;
                    font-weight: bold;
                    font-stretch: normal;
                    text-align: center;
                    line-height: 100%;
                    writing-mode: lr-tb;
                    text-anchor: middle;
                    fill: #ffffff;
                    fill-opacity: 1;
                    stroke: none;
                    stroke-width: 1pt;
                    stroke-linecap: butt;
                    stroke-linejoin: miter;
                    stroke-opacity: 1;
                    font-family: Bitstream Vera Sans Mono
                 }

                 .icon-see-label {
                    font-size: 2.8px;
                 }
                 .icon-see-label-big {
                    font-size: 3.2px;
                 }

                 .icon-buy-label {
                    font-size: 2.4px;
                 }
                 .icon-buy-label-big {
                    font-size: 3.0px;
                 }

                 .icon-sleep-label {
                    font-size: 2.6px;
                 }
                 .icon-sleep-label-big {
                    font-size: 3.0px;
                 }

                 .icon-eat-label {
                    font-size: 2.2px;
                 }
                 .icon-eat-label-big {
                    font-size: 2.6px;
                 }

                 .icon-drink-label {
                    font-size: 2.6px;
                 }
                 .icon-drink-label-big {
                    font-size: 3.0px;
                 }

                /* Osmarender built-in styles - do not remove */
                .osmarender-stroke-linecap-round { stroke-linecap: round; }
                .osmarender-stroke-linecap-butt { stroke-linecap: butt; }
                .osmarender-mask-black { stroke: black; }
                .osmarender-mask-white { stroke: white; }
                .osmarender-no-marker-start { marker-start: none; }
                .osmarender-no-marker-end { marker-end: none; }

            </style>

            <svg:pattern id="cemetery-pattern" x="0" y="0" width="10" height="10" patternUnits="userSpaceOnUse" patternTransform="scale(0.25)">
               <svg:rect fill="#bde3cb" width="10" height="10" x="0" y="0" />
               <svg:path fill="#b5b5b5" stroke-width="0.1" d="M 1.48,0.13 C 2.12,0.13 2.63,0.64 2.63,1.28 L 2.63,4.27 L 0.33,4.27 L 0.33,1.28 C 0.33,0.64 0.85,0.13 1.48,0.13 z " />
               <svg:path fill="#b5b5b5" stroke-width="0.1" d="M 6.64,5.78 C 7.27,5.78 7.79,6.29 7.79,6.92 L 7.79,9.91 L 5.49,9.91 L 5.49,6.92 C 5.49,6.29 6.00,5.78 6.64,5.78 z " />
            </svg:pattern>

            <svg:pattern id="cemetery-christian-pattern" x="0" y="0" width="10" height="10" patternUnits="userSpaceOnUse" patternTransform="scale(0.25)">
               <svg:rect fill="#bde3cb" width="11" height="11" x="0" y="0" />
                <svg:path stroke="black" stroke-width="0.2" d="M1,1 L3,1 M2,0 L2,3 M6,6 L8,6 M7,5 L7,8"/>
            </svg:pattern>

            <svg:pattern
               patternUnits="userSpaceOnUse"
               width="5.3520603"
               height="3.2112362"
               patternTransform="translate(268.68454,370.84126)"
               id="water-pattern">
              <svg:g
                 id="g170911"
                 transform="translate(-268.68454,-370.84126)">
                <svg:rect
                   style="fill:#8f96f9;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.89999998;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
                   width="5.3520603"
                   height="3.2112362"
                   x="268.68454"
                   y="370.84125" />
                <svg:path
                   style="color:#000000;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#ffffff;stroke-width:0.24698929;stroke-linecap:butt;stroke-linejoin:bevel;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
                   d="M 269.1498,372.00768 C 269.9042,371.97249 269.91405,371.53117 270.46203,371.51559 C 270.96115,371.5014 270.68347,372.01588 271.83989,372.02409"
                   />
                <svg:path
                   style="color:#000000;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#ffffff;stroke-width:0.24698929;stroke-linecap:butt;stroke-linejoin:bevel;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
                   d="M 270.96408,373.53792 C 271.71848,373.50274 271.72833,373.06142 272.27631,373.04583 C 272.77543,373.03165 272.49775,373.54613 273.65417,373.55434"
                   />
              </svg:g>
            </svg:pattern>


            <svg:marker
                id="bridge-casing-start"
                fill='none'
                stroke-width='0.1px'
                stroke='#777777'
                markerWidth="1px"
                markerHeight="1px"
                orient="auto">
                <svg:path d="M-0.25,0.75 L0.5,0 L-0.25,-0.75" />
            </svg:marker>

            <svg:marker
                id="bridge-casing-end"
                fill='none'
                stroke-width='0.1px'
                stroke='#777777'
                markerWidth="1px"
                markerHeight="1px"
                orient="auto">
                <svg:path d="M0.25,0.75 L-0.5,0 L0.25,-0.75" />
            </svg:marker>

            <svg:marker
                id="marker-tunnel-start"
                viewBox="0 0 10 10"
                refX="5px" refY="5px"
                markerUnits="strokeWidth"
                fill='none'
                stroke-width='0.5px'
                stroke='#777777'
                markerWidth="2px"
                markerHeight="2px"
                orient="auto">
                <svg:path d="M 4,1 A5,4.25 0 0,1 4,9" />
            </svg:marker>

            <svg:marker
                id="marker-tunnel-end"
                viewBox="0 0 10 10"
                refX="5px" refY="5px"
                markerUnits="strokeWidth"
                fill='none'
                stroke-width='0.5px'
                stroke='#777777'
                markerWidth="2px"
                markerHeight="2px"
                orient="auto">
                <svg:path d="M 6,1 A5,4.25 0 0,0 6,9" /> 
            </svg:marker>

            <svg:marker
                id="marker-gate-locked"
                viewBox="0 0 10 10"
                refX="2px" refY="5px"
                markerUnits="userSpaceOnUse"
                fill='none'
                stroke-width='0.4px'
                stroke='#777777'
                markerWidth="3px"
                markerHeight="3px"
                orient="auto">
                <svg:path d="M 1,0 L 1,10 M 3,0 L 3,10" />
            </svg:marker>

            <svg:marker
                id="marker-gate-closed"
                viewBox="0 0 10 10"
                refX="1px" refY="5px"
                markerUnits="userSpaceOnUse"
                fill='none'
                stroke-width='0.4px'
                stroke='#777777'
                markerWidth="3px"
                markerHeight="3px"
                orient="auto">
                <svg:path d="M 1,0 L 1,10" />
            </svg:marker>

            <svg:marker
                id="marker-gate-open"
                viewBox="0 0 11 11"
                refX="1px" refY="5px"
                markerUnits="userSpaceOnUse"
                fill='none'
                stroke-width='0.4px'
                stroke='#777777'
                markerWidth="3px"
                markerHeight="3px"
                orient="auto">
                <svg:path d="M1,0 L1,1 M1,2 L1,3 M1,4 L1,5 M1,6 L1,7 M1,8 L1,9 M1,10 L1,11" />
            </svg:marker>

            <svg:marker
                id="marker-stile"
                viewBox="0 0 10 10"
                refX="5px" refY="5px"
                markerUnits="userSpaceOnUse"
                fill='none'
                stroke-width='0.5px'
                stroke='#777777'
                markerWidth="2px"
                markerHeight="2px"
                orient="auto">
                <svg:path d="M3.5,0 L3.5,10 M6.5,0 L6.5,10 M 10,1 L 1,10" />
            </svg:marker>

            <svg:marker id="marker-otherway-start"   viewBox="0 0 10 10"
                refX="-30px" refY="5px" 
                markerUnits="userSpaceOnUse" 
                fill='#FFFFFF' 
                stroke-width='1px' 
                stroke='#000000' 
                markerWidth="1px" 
                markerHeight="1px" 
                orient="auto">
                <svg:path d="M 10,4 L 4,4 L 4,2 L 0,5 L 4,8 L 4,6 L 10,6 z" />
            </svg:marker>

            <svg:marker id="marker-otherway-end" viewBox="0 0 10 10"
                refX="30px" refY="5px" 
                markerUnits="userSpaceOnUse" 
                fill='#FFFFFF' 
                stroke-width='1px'
                stroke='#000000' 
                markerWidth="1px" 
                markerHeight="1px" 
                orient="auto">
                <svg:path d="M 10,4 L 4,4 L 4,2 L 0,5 L 4,8 L 4,6 L 10,6 z" />
            </svg:marker>

            <svg:symbol
              id="church"
              viewBox="0 0 5 10"
              fill='#000000'>
                <svg:path d="M 0 10 L 0 5 L 5 5 L 5 10 z M 0 2 L 5 2 L 5 3 L 0 3 z M 2 0 L 2 5 L 3 5 L 3 0 z" />
            </svg:symbol>

            <svg:symbol
              id="mosque"
              viewBox="0 0 120 120"
              fill='#00ab00'>
                <svg:path d="M 4,60 C 11,75 60,107 84,73 C 103,40 76,22 50,7 C 76,6 130,35 103,84 C 72,124 8,97 4,60 z M 35,52 C 35,52 20,55 20,55 L 30,43 C 30,43 21,30 21,30 L 35,35 L 45,23 L 45,38 L 60,45 L 45,50 L 45,65 L 35,52 z"/>
            </svg:symbol>

            <svg:symbol
              id="synagogue"
              viewBox="0 0 20 20"
              stroke='#0000d0'
              fill='none'
              stroke-width="1.5px"
              stroke-linecap="butt"
              stroke-linejoin="miter">
                <svg:path d="M 10,0 L 20,15 L 0,15 L 10,0 z M 10,20 L 0,5 L 20,5 L 10,20 z" />
            </svg:symbol>

            <!-- derived from http://www.sodipodi.com/index.php3?section=clipart -->
            <svg:symbol
              id="campSite"
              viewBox="0 0 100 100"
              fill='#0000dc'
              fill-opacity="1">
                <svg:path d="M 35,0 L 50,24 L 65,0 L 80,0 L 60,35 L 100,100 L 0,100 L 40,35 L 20,0 L 35,0 z "/>
            </svg:symbol>

     
            <svg:symbol
              id="airport"
              viewBox="0 0 10 10"
              fill="black"
              fill-opacity="1"
              fill-rule="evenodd"
              stroke="none">
                <svg:path d="M 9.2,5 C 9.2,4.5 9.8,3.2 10,3 L 9,3 L 8,4 L 5.5,4 L 8,0 L 6,0 L 3,4 C 2,4 1,4.2 0.5,4.5 C 0,5 0,5 0.5,5.5 C 1,5.8 2,6 3,6 L 6,10 L 8,10 L 5.5,6 L 7.8,6 L 9,7 L 10,7 C 9.8,6.8 9.2,5.5 9.2,5 z " />
            </svg:symbol>

            <svg:symbol
              id="power-tower"
              viewBox="0 0 10 10"
              stroke-width='1px'
              stroke='#cccccc'>
              <svg:path d="M 0 0 L 10 10 M 0 10 L 10 0" />
            </svg:symbol>

            <!-- derived from http://www.sodipodi.com/index.php3?section=clipart -->
            <svg:symbol
              id="petrolStation"
              viewBox="0 0 115 115"
              fill='#000000'
              fill-rule="evenodd"
              stroke-width="3px">
                <svg:path d="M 22.7283 108.087 C 4.26832 107.546 23.6818 43.3596 32.6686 21.0597 C 33.8491 17.0245 60.28 18.4952 60.0056 19.8857 C 59.0889 25.9148 54.8979 23.2429 52.0142 26.8579 L 51.7464 36.8066 C 48.6085 40.8144 40.2357 34.4677 38.078 42.8773 C 31.3694 92.5727 45.0689 108.819 22.7283 108.087 z M 85.3122 9.52799 L 29.1766 9.52847 C 28.4855 17.5896 -11.559 113.573 22.9292 113.284 C 48.5214 113.073 39.5312 104.08 42.6984 51.03 C 41.8513 49.3228 50.871 48.6585 50.8739 51.4448 L 51.0453 116.604 L 97.6129 116.188 L 97.6129 26.544 C 96.0669 24.2073 93.899 25.2958 90.584 22.394 C 87.7907 19.4131 92.2353 9.52799 85.3122 9.52799 z M 64.0766 35.3236 C 61.5443 36.7258 61.5443 45.2814 64.0766 46.6836 C 68.3819 49.0684 80.2848 49.0684 84.5902 46.6836 C 87.1225 45.2814 87.1225 36.7258 84.5902 35.3236 C 80.2848 32.9393 68.3819 32.9393 64.0766 35.3236 z "/>
            </svg:symbol>

            <!-- derived from http://www.sodipodi.com/index.php3?section=clipart -->
            <svg:symbol
              id="golfCourse"
              viewBox="0 0 100 100"
              fill='#000000'
              fill-rule="evenodd"
              fill-opacity="1"
              stroke="none">
                <svg:path d="M 61.6421 25.2514 C 61.6421 25.2514 48.7712 34.4528 48.1727 38.766 C 47.574 43.0787 56.5537 48.8295 56.8529 52.2802 C 57.1522 55.7303 56.5537 87.3594 56.5537 87.3594 C 56.5537 87.3594 37.3978 104.036 36.7993 105.474 C 36.2006 106.912 41.5878 117.55 43.9826 117.263 C 46.3769 116.975 43.3841 109.787 44.2819 108.349 C 45.1798 106.912 64.0363 92.5353 65.2335 90.5221 C 65.5327 91.0979 65.8321 76.7208 65.5327 76.7208 L 66.7305 76.7208 L 66.1319 91.0979 C 66.1319 91.0979 59.2473 108.349 60.1451 113.237 C 60.1451 115.824 70.6212 122.15 72.1176 121 C 73.6145 119.85 68.5261 115.536 68.8254 112.375 C 67.6283 109.212 73.016 97.4233 73.3153 94.2605 C 73.6145 91.0979 73.9138 56.3053 72.7167 51.9927 C 72.7161 48.542 69.424 42.5037 67.9276 40.2035 C 67.6283 37.9029 65.8326 31.2897 65.8326 31.2897 C 65.8326 31.2897 59.547 39.341 59.5465 39.341 C 58.0501 37.9035 68.2268 28.702 68.2268 25.8268 C 68.2268 22.9513 49.9689 9.72452 49.9689 9.72452 C 49.9689 9.72452 25.126 63.2064 25.4254 65.5065 C 25.7246 67.8065 29.9146 72.9824 32.908 70.6823 C 35.9009 68.3822 27.8197 62.9194 27.8197 62.9194 L 49.3703 14.6122 L 52.6624 18.3506 L 58.3494 18.638 L 58.0501 19.5005 C 58.0501 19.5005 51.7645 18.9255 50.5675 19.788 C 49.3703 20.6506 47.574 22.0887 47.574 25.5388 C 47.574 28.9896 52.0638 30.4271 53.5603 30.7146 L 60.8936 24.6764 L 61.6421 25.2514 z "/>
            </svg:symbol>

            <svg:symbol
              id="slipway"
              viewBox="0 0 50 45"
              fill='#0087ff'
              stroke='none'
              fill-opacity='0.7'>
                <svg:path d="M 45,33 L 45,45 L 2,45 C 2,45 45,33 45,33 z M 0,35 L 43,22 L 43,26 C 43,26 37,32 26,36 C 15,40 0,35 0,35 z M 3,32 C 3,32 13,0 13,0 L 22,26 L 3,32 z M 16,0 L 42,20 L 25,25 L 16,0 z "/>
            </svg:symbol>
            
            <svg:symbol id="cinema" viewBox="150.3 200 320 420">
                <svg:path fill="black" d="M123.7,393.2l-35.9,9L0,50.9l35.9-9L123.7,393.2z"/>
                <svg:path fill="black" d="M291.5,351.2l-35.9,9L167.8,9l35.9-9L291.5,351.2z"/>
                <svg:path fill="black" d="M201.9,27.8l9,35.9L19.8,111.5l-9-35.9L201.9,27.8z"/>
                <svg:path fill="black" d="M234.8,159.2l9,35.9L52.6,242.9l-9-35.9L234.8,159.2z"/>
                <svg:path fill="black" d="M267.7,290.7l9,35.9L85.5,374.4l-9-35.9L267.7,290.7z"/>
                <svg:path fill="#FFFFFF" d="M40.5,97.5l-21.3,5.3l-5.3-21.3l21.3-5.3L40.5,97.5z"/>
                <svg:path fill="#FFFFFF" d="M56.9,163l-21.3,5.3L30.2,147l21.3-5.3L56.9,163z"/>
                <svg:path fill="#FFFFFF" d="M73.3,228.5l-21.3,5.3l-5.3-21.3l21.3-5.3L73.3,228.5z"/>
                <svg:path fill="#FFFFFF" d="M89.6,294l-21.3,5.3L63,278l21.3-5.3L89.6,294z"/>
                <svg:path fill="#FFFFFF" d="M106,359.4l-21.3,5.3l-5.3-21.3l21.3-5.3L106,359.4z"/>
                <svg:path fill="#FFFFFF" d="M209.1,54.3l-21.3,5.3l-5.3-21.3l21.3-5.3L209.1,54.3z"/>
                <svg:path fill="#FFFFFF" d="M225.4,119.8l-21.3,5.3l-5.3-21.3l21.3-5.3L225.4,119.8z"/>
                <svg:path fill="#FFFFFF" d="M241.8,185.3l-21.3,5.3l-5.3-21.3l21.3-5.3L241.8,185.3z"/>
                <svg:path fill="#FFFFFF" d="M258.2,250.8l-21.3,5.3l-5.3-21.3l21.3-5.3L258.2,250.8z"/>
                <svg:path fill="#FFFFFF" d="M274.6,316.3l-21.3,5.3l-5.3-21.3l21.3-5.3L274.6,316.3z"/>
            </svg:symbol>

            <svg:symbol id="theatre" viewBox="220 207 440 550">
                <svg:g stroke="none" fill-opacity="1" fill-rule="nonzero">
                    <svg:path d="M192.4,22c0,0,50,26,112,20s94-39,98-42s17,32,17,32l4,33l-3,29l5,24l7,39l-5,32l-6,32l-19,55l-25,49l-59,21l-30-14l-22-22l-29-47l4-40l-20-28l-18-24l1-34l2-54l-8-35L192.4,22z"/>
                    <svg:path fill="none" stroke="#FFFFFF" stroke-width="10" d="M210.4,44.5c0,0,43.8,22.8,98,17.5s82.3-34.1,85.8-36.8s14.9,28,14.9,28l3.5,28.9l-2.6,25.4l4.4,21l6.1,34.1l-4.4,28l-5.3,28l-16.6,48.1l-21.9,42.9L320.6,328l-26.3-12.3l-19.3-19.3l-25.4-41.1l3.5-35l-17.5-24.5l-15.8-21l0.9-29.8l1.8-47.3l-7-30.6L210.4,44.5z"/>
                    <svg:path fill="#FFFFFF" d="M293.4,152c0,8.3-11.4,15-25.5,15s-25.5-6.7-25.5-15s11.4-15,25.5-15S293.4,143.7,293.4,152z"/>
                    <svg:path fill="#FFFFFF" d="M406.4,140.5c0,8.6-13.2,15.5-29.5,15.5s-29.5-6.9-29.5-15.5s13.2-15.5,29.5-15.5S406.4,131.9,406.4,140.5z"/>
                    <svg:path fill="none" stroke="#FFFFFF" stroke-width="10" d="M248.4,124l14-43l15,27"/>
                    <svg:path fill="none" stroke="#FFFFFF" stroke-width="10" d="M336.4,110l7-32l35,23"/>
                    <svg:path fill="none" stroke="#FFFFFF" stroke-width="10" d="M317.4,146l-7,72l22-1L317.4,146z"/>
                    <path fill="none" stroke="#FFFFFF" stroke-width="10" d="M305.4,297c0,0,2-55,27-57s37,16,41,30"/>
                    <svg:path fill="#FFFFFF" stroke="#000000" stroke-width="10" d="M207.4,90c0,0-19,18-61,17s-42,5-83-33s-31-38-31-38l-9,105l-5,22l-13,15l26,128l37,82c0,0,3,9,38,9s30-10,40-20s15-35,34-49s41-47,41-47l17-21l3-34l-23-29l-12-32L207.4,90z"/>
                    <svg:path fill="none" stroke="#000000" stroke-width="10" d="M51.4,150c0,0-2-15,25-15s31,17,31,17"/>
                    <svg:path fill="none" stroke="#000000" stroke-width="10" d="M153.4,168c0,0,6-11,12-14s22,5,22,5"/>
                    <svg:path d="M51.4,193l23-19c0,0,12-2,25,2s7,14,7,14L51.4,193z"/>
                    <svg:path d="M164.4,199c0,0,14-13,27-10s16,19,16,19s-7,6-26,1S164.4,199,164.4,199z"/>
                    <svg:path d="M125.4,188l-25,83h29L125.4,188z"/>
                    <svg:path d="M61.4,258c0,0,0-4,14,16s10,36,44,34s38-45,55-42s13,8,7,20s-23,23-32,35s5,40-39,38s-43-44-49-48S61.4,258,61.4,258z"/>
                </svg:g>
            </svg:symbol>

            <svg:symbol id="symbol-windmill" viewBox="158 240 315.9 480.2" >
                <svg:path fill="#000000" d="M106.7,148.2l104-1l61,333l-231-1" />
                <svg:path fill="none" stroke="#000000" stroke-width="24" d="M6.7,201 l284-191" />
                <svg:path fill="none" stroke="#000000" stroke-width="24" d="M19.7,17.5 l290,176" />
            </svg:symbol>

            <!-- derived from http://www.sodipodi.com/index.php3?section=clipart -->
            <svg:symbol
              id="hotel"
              viewBox="0 0 90 90"
              fill="black"
              fill-opacity="1"
              stroke="black"
              stroke-width="1px"
              stroke-miterlimit="4">
                <svg:path d="M 0,60 C 0,65 10,65 10,60 L 10,50 L 35,70 L 35,85 C 35,90 45,90 45,85 L 45,70 L 75,70 L 75,85 C 75,90 85,90 85,85 L 85,60 L 40,60 L 5,30 C 9,20 45,20 50,25 L 50,10 C 50,5 40,5 40,10 L 40,15 L 10,15 L 10,10 C 10,5 0,5 0,10 C 0,10 0,60 0,60 z M 10,35 C 15,25 45,25 55,35 L 85,60 C 75,50 40,50 40,60 L 10,35 z "/>
            </svg:symbol>

            <!-- derived from http://www.sodipodi.com/index.php3?section=clipart -->
            <svg:symbol
              id="hostel"
              viewBox="0 0 12.5 8"
              fill="#286a9d"
              fill-opacity="1"
              fill-rule="nonzero"
              stroke="none">
                <svg:path d="M 5.5,4 L 9,0 L 12.5,4 L 11.5,4 L 11.5,8 L 10,8 L 10,5 L 8,5 L 8,8 L 6.5,8 L 6.5,4 L 5.5,4 z M 0.5,3.5 C 2,2.5 2.3,1 2.5,0 C 2.7,1 3,2.5 4.5,3.5 L 3.3,3.5 C 3.3,4 4,5 5,6 L 3,6 L 3,8 L 2,8 L 2,6 L 0,6 C 1,5 1.7,4 1.7,3.5 L 0.5,3.5 z M 0,8 L 0,7.5 L 12.5,7.5 L 12.5,8 L 0,8 z " />
            </svg:symbol>

            <svg:symbol
              id="recycling"
              viewBox="0 0 100 100"
              stroke='none'
              fill='#00ba00'>
                <svg:path d="M 55.0,37.3 L 72.1,27.0 L 79.8,41.9 C 81.6,50.0 71.5,52.9 63.3,52.4 L 55.0,37.3 z" />
                <svg:path d="M 51.1,47.9 L 42.1,63.8 L 51.1,80.0 L 51.3,73.5 L 59.5,73.5 C 62.5,73.8 66.4,71.8 67.9,69.0 L 78.4,49.5 C 75.0,53.0 70.5,53.9 65.3,53.9 L 51.4,53.9 L 51.1,47.9 z " />
                <svg:path d="M 31.0,28.2 L 13.7,18.2 L 22.9,4.2 C 29.0,-1.3 36.6,6.1 40.1,13.5 L 30.9,28.2 z " />
                <svg:path d="M 42.1,26.5 L 60.4,26.6 L 70.1,10.9 L 64.3,13.8 L 60.3,6.6 C 59.1,3.9 55.5,1.4 52.3,1.5 L 30.2,1.7 C 34.9,3.1 37.9,6.6 40.4,11.1 L 47.2,23.3 L 42.1,26.5 z " />
                <svg:path d="M 0.4,27.4 L 5.8,31.5 L 0.8,40.5 C -1.8,45.3 2.6,49.6 5.3,51.0 C 8.0,52.5 12.2,52.7 16.2,52.7 L 23.3,41.3 L 28.6,44.1 L 19.3,27.2 L 0.4,27.4 z " />
                <svg:path d="M 1.2,49.3 L 12.7,70.1 C 15.0,73.0 19.4,73.7 23.9,73.6 L 36.0,73.6 L 36.0,53.9 L 13.0,53.7 C 9.5,53.9 4.8,53.2 1.2,49.3 z " />
            </svg:symbol>

            <svg:symbol
              id="hospital"
              viewBox="0 0 15 15"
              stroke='red'
              stroke-width="2px"
              fill="none">
                <svg:path d="M 12.5,7.5 L 2.5,7.5 L 2.5,7.5 L 12.5,7.5 z M 7.5,2.3 L 7.5,12.5 L 7.5,12.5"/>
                <svg:path stroke-width="1px" d="M 14.5 7.5 A 7 7 0 1 1 0.5,7.5 A 7 7 0 1 1 14.5 7.5 z" />
            </svg:symbol>

            <svg:symbol id="symbol-doctor" viewBox="18 18 36 36">
                <svg:ellipse fill="#00cc00" cx="18" cy="18" rx="18" ry="18"/>
                <svg:path fill="#ffffff" d="M32 21.44 A16 16 -180 1 0 0 21.44 A16 16 -180 1 0 32 21.44 Z M10 6.94 L22 6.94 L22 15.44 L30.5 15.44 L30.5 27.44 L22 27.44 L22 35.94 L10 35.94 L10 27.44 L1.5 27.44 L1.5 15.44 L10 15.44 L 10 6.94 Z" transform="translate(2,-3.44)"/>
            </svg:symbol>

           <svg:symbol id="symbol-pharmacy" viewBox="18 18 36 36">
                <svg:rect style="fill:#00cc00" x="0" y="0" width="36" height="36" rx="2" ry="2"/>
                <svg:path style="fill:#ffffff" d="M20.14 17.3 L20.14 9.44 L11.86 9.44 L11.86 17.3 L4 17.3 
                L4 25.58 L11.86 25.58 L11.86 33.44 L20.14 33.44 L20.14 25.58 L28 25.58 L28 17.3 L20.14 17.3 Z
                M0.5 37.44 L31.5 37.44 a0.5 0.5 -180 0 0 0.5 -0.5 L32 5.94 a0.5 0.5 -180 0 0 -0.5 -0.5 
                L0.5 5.44 a0.5 0.5 -180 0 0 -0.5 0.5 L0 36.94 a0.5 0.5 -180 0 0 0.5 0.5 Z M2 35.44 L2
                7.44 L30 7.44 L30 35.44 L2 35.44 Z"
                transform="translate(2,-3.44)"/>
            </svg:symbol>
            
            <svg:symbol id="postoffice" viewBox="0 0 36 36">
                <svg:ellipse style="fill:#ff0000" cx="18" cy="18" rx="18" ry="18"/>
                <svg:path style="fill:#ffffff" d="M26 25.44 L26 35.44 L2 35.44 L2 25.44 L14 31.44 L26 25.44 Z M2 23.44 L26 23.44 L14 29.44 L2 23.44 Z M0 37.44 L28 37.44 L28 21.44 L0 21.44 L0 37.44 Z" transform="translate(4,-11.44)"/>
            </svg:symbol>
            
            <svg:symbol id="postbox" viewBox="0 0 36 36" xml:space="preserve">
                <svg:ellipse style="fill:#ff0000" cx="18" cy="18" rx="18" ry="18"/>
                <svg:ellipse style="fill:#ffffff" cx="18" cy="18" rx="16" ry="16"/>
                <svg:path style="fill:#ff0000" d="M26 25.44 L26 35.44 L2 35.44 L2 25.44 L14 31.44 L26 25.44 Z M2 23.44 L26 23.44 L14 29.44 L2 23.44 Z M0 37.44 L28 37.44 L28 21.44 L0 21.44 L0 37.44 Z" transform="translate(4,-11.44)"/>
            </svg:symbol>

            <svg:symbol
              id="parking"
              viewBox="0 -10 20 20"
              stroke="none"
              fill-opacity="1"
              fill-rule="nonzero">
                <svg:rect fill="#0087ff" width="20" height="20" x="0" y="-10" rx="4" ry="4" />
                <svg:path fill="white" d="M 5,8 L 5,-7 L 12,-7 C 14,-7 15.5,-5.3 16,-4 C 16.5,-2.77 16.5,-1.23 16,0 C 15.41,1.42 14,3 12,3 L 8,3 L 8,8 L 5,8 z M 8,-4 L 8,0 C 9.3,0 11,0 12.32,-0.31 C 13.6,-0.76 13.5,-2.8 12.5,-3.48 C 11.5,-4.1 8.6,-4 8,-4 z "/>
            </svg:symbol>
            
            <svg:symbol id="symbol-traffic_signal" viewBox="106 278.6 557.3 557.3" >
                <svg:path d="M212.1,105c0,58-47.5,105-106,105c-58.6,0-106-47-106-105 C0,47,47.5,0,106,0C164.6,0,212.1,47,212.1,105z"/>
                <svg:path d="M212.1,452.3c0,58-47.5,105-106,105c-58.6,0-106-47-106-105 c0-58,47.5-105,106-105C164.6,347.3,212.1,394.3,212.1,452.3z"/>
                <svg:path d="M211.3,458.9H0V106.7h211.3V458.9z"/>
                <svg:path fill="#F90000" d="M190,103c0,46.4-37.6,84-84,84 c-46.4,0-84-37.6-84-84s37.6-84,84-84C152.4,19,190,56.6,190,103z"/>
                <svg:path fill="#00D305" d="M190,455c0,46.4-37.6,84-84,84 c-46.4,0-84-37.6-84-84c0-46.4,37.6-84,84-84C152.4,371.1,190,408.7,190,455z"/>
                <svg:path fill="#F9FF00" d="M190,279c0,46.4-37.6,84-84,84 c-46.4,0-84-37.6-84-84c0-46.4,37.6-84,84-84C152.4,195,190,232.6,190,279z"/>
            </svg:symbol>

            <svg:symbol id="symbol-school" viewBox="160 216 320.8 432.5">
                <svg:path fill="#AF7519" d="M93,284.7c0,11-9,20-20,20s-20-9-20-20s9-20,20-20S93,273.7,93,284.7z" />
                <svg:path fill="#AF7519" d="M237,328.7c0,11-9,20-20,20s-20-9-20-20s9-20,20-20S237,317.7,237,328.7z" />
                <svg:path fill="none" stroke="#AF7519" stroke-width="20" d="M163,4.7l-116,361" />
                <svg:path fil