Add:Core:Added support for a subset of xinclude/xpath
authormartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>
Thu, 24 Apr 2008 15:45:10 +0000 (15:45 +0000)
committermartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>
Thu, 24 Apr 2008 15:45:10 +0000 (15:45 +0000)
git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@1027 ffa7fe5e-494d-0410-b361-a75ebd5db220

navit/src/maps/Makefile.am
navit/src/navit.xml
navit/src/xmlconfig.c

index 12c9d70..ac5e41e 100644 (file)
@@ -2,7 +2,7 @@ include $(top_srcdir)/Makefile.inc
 
 SAMPLE_MAP=osm_bbox_11.3,47.9,11.7,48.2
 
-maps_DATA = $(SAMPLE_MAP).bin
+maps_DATA = $(SAMPLE_MAP).bin $(SAMPLE_MAP).xml
 
 samplemap: $(SAMPLE_MAP).bin
 
@@ -11,10 +11,11 @@ $(SAMPLE_MAP).osm.bz2:
        wget -O $(SAMPLE_MAP).osm.bz2.tmp http://navit.sourceforge.net/maps/$(SAMPLE_MAP).osm.bz2
        mv $(SAMPLE_MAP).osm.bz2.tmp $(SAMPLE_MAP).osm.bz2
 
-$(SAMPLE_MAP).bin: $(SAMPLE_MAP).osm.bz2 $(top_builddir)/src/osm2navit
+$(SAMPLE_MAP).bin $(SAMPLE_MAP).xml: $(SAMPLE_MAP).osm.bz2 $(top_builddir)/src/osm2navit
        echo "Converting osm sample map"
        bzcat $(SAMPLE_MAP).osm.bz2 | $(top_builddir)/src/osm2navit --attr-debug-level=5 $(SAMPLE_MAP).bin.tmp
        mv $(SAMPLE_MAP).bin.tmp $(SAMPLE_MAP).bin
+       echo '<map type="binfile" enabled="yes" data="$$NAVIT_SHAREDIR/maps/osm_bbox_11.3,47.9,11.7,48.2.bin"/>' >$(SAMPLE_MAP).xml
 
 distclean-local:
        rm -f $(SAMPLE_MAP).osm.bz2 $(SAMPLE_MAP).bin
index c1bd64d..b81f09f 100644 (file)
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!DOCTYPE navit SYSTEM "navit.dtd">
-<config>
+<config xmlns:xi="http://www.w3.org/2001/XInclude">
 <plugins>
        <plugin path="$NAVIT_LIBDIR/*/${NAVIT_LIBPREFIX}lib*.so"/>
        <plugin path="$NAVIT_LIBDIR/*/${NAVIT_LIBPREFIX}libgraphics_null.so" active="no" />
@@ -13,7 +13,7 @@ Center coordinates format:
 [-]0xX [-]0xX 
 Change to your home coordinates.
 -->
-<navit center="4808 N 1134 E" zoom="256" tracking="1" cursor="1" orientation="0">
+<navit id="nase" center="4808 N 1134 E" zoom="256" tracking="1" cursor="1" orientation="0">
 <!--
        <osd type="compass" />
        <osd type="eta" />
@@ -70,9 +70,9 @@ Change to your home coordinates.
                <map type="mg" enabled="yes" data="/opt/reiseplaner/travel/DE.map/smp4.smp" />
                <map type="mg" enabled="yes" data="/opt/reiseplaner/travel/DE.map/smp5.smp" />
        </mapset>
-<!-- If you dont want to use the sample map, set enabled="no" in the next line -->
+<!-- If you dont want to use the sample map, either set enabled="no" in the next line or remove the xml file from the maps directory -->
        <mapset enabled="yes">
-               <map type="binfile" enabled="yes" data="$NAVIT_SHAREDIR/maps/osm_bbox_11.3,47.9,11.7,48.2.bin"/>
+               <xi:include href="$NAVIT_SHAREDIR/maps/*.xml" />
        </mapset>
 <!-- Sample mapset for garmin maps -->
        <mapset enabled="no">
@@ -80,7 +80,7 @@ Change to your home coordinates.
        </mapset>
 
        <layout name="Car" color= "#ffefb7">
-               <layer name="sea" details="0">
+               <layer name="polygons">
                        <item type="image" order="0-">
                                <image />
                        </item>
@@ -236,6 +236,8 @@ Change to your home coordinates.
                        <item type="height_line_2" order="0-">
                                <polyline color="#000000" width="2" /> 
                        </item>
+               </layer>
+               <layer name="streets">  
                        <item type="street_route" order="2">
                                <polyline color="#0000a0" width="4" /> 
                        </item>
@@ -642,6 +644,8 @@ Change to your home coordinates.
                        <item type="street_nopass,street_0,street_1_city,street_1_land" order="12-18">
                                <label label_size="9" />
                        </item>
+               </layer>
+               <layer name="polylines">
                        <item type="aeroway_taxiway" order="10">
                                <polyline color="#989994" width="4" />
                                <polyline color="#d3dbbc" width="2" />
@@ -728,6 +732,8 @@ Change to your home coordinates.
                        <item type="rail_tram" order="10-">
                                <polyline color="#606060" width="2" />
                        </item>
+               </layer>
+               <layer name="labels">
                        <item type="town_label,district_label,town_label_0e0,town_label_1e0,town_label_2e0,town_label_5e0,town_label_1e1,town_label_2e1,town_label_5e1,town_label_1e2,town_label_2e2,town_label_5e2,district_label_0e0,district_label_1e0,district_label_2e0,district_label_5e0,district_label_1e1,district_label_2e1,district_label_5e1,district_label_1e2,district_label_2e2,district_label_5e2" order="12-">
                                <circle color="#000000" radius="3" label_size="7" />
                        </item>
@@ -758,6 +764,8 @@ Change to your home coordinates.
                        <item type="town_label_1e7,district_label_1e7" order="1-">
                                <circle color="#000000" radius="3" label_size="15" />
                        </item>
+               </layer>
+               <layer name="points">
                        <item type="mini_roundabout" order="12-">
                                 <icon src="mini_roundabout.xpm" />
                         </item>
@@ -1185,1116 +1193,729 @@ Change to your home coordinates.
                        </item>
                </layer>
        </layout>
-<layout name="Bike" color= "#ffefb7">
-       <layer name="sea" details="0">
-               <item type="image" order="0-">
-                       <image />
-               </item>
-               <item type="poly_wood" order="0-">
-                       <polygon color="#8ec78d" /> 
-               </item>
-               <item type="poly_town" order="0-">
-                       <polygon color="#ffc895" /> 
-                       <polyline color="#ebb481" /> 
-               </item>
-               <item type="poly_park" order="0-">
-                       <polygon color="#7cc334" /> 
-                       <label label_size="5" /> 
-               </item>
-               <item type="poly_water" order="0-">
-                       <polygon color="#82c8ea" /> 
-                       <polyline color="#5096b8" /> 
-                       <label label_size="5" /> 
-               </item>
-               <item type="poly_land" order="0-">
-                       <polygon color="#ffefb7" /> 
-                       <polyline color="#ffefb7" /> 
-                       <label label_size="5" /> 
-               </item>
-               <item type="poly_airport" order="0-">
-                       <polygon color="#a0a0a0" /> 
-               </item>
-               <item type="sport_poly,poly_sport" order="0-">
-                       <polygon color="#ff8c00" /> 
-               </item>
-               <item type="poly_industry,poly_place,poly_railway" order="0-">
-                       <polygon color="#e6e6e6" /> 
-               </item>
-               <item type="poly_commercial" order="0-">
-                       <polygon color="#fff8dc" /> 
-               </item>
-               
-               <!-- landuse=industrial -->
-               <item type="industry_poly,building_poly,place_poly,poly_brownfield,poly_greenfield,poly_construction,poly_railway" order="0-">
-                       <polygon color="#ecd8ff" /> 
-               </item>
-               <!-- landuse=farm -->
-               <item type="poly_farm" order="0-">
-                       <polygon color="#c7f1a3" /> 
-                       <polyline color="#79c691" /> 
-                       <label label_size="5" /> 
-               </item>
-               <item type="poly_scree,poly_scrub,poly_fell,poly_heath" order="0-">
-                       <polygon color="#c7f1a3" /> 
-                       <polyline color="#79c691" /> 
-                       <label label_size="5" /> 
-               </item>
-               <item type="poly_marsh,poly_mud,poly_quarry" order="0-">
-                       <polygon color="#DEB887" /> 
-                       <polyline color="#DEB887" /> 
-                       <label label_size="5" /> 
-               </item>
-               
-               <item type="poly_allotments,poly_playground,poly_village_green,poly_recreation_ground,poly_common,poly_garden" order="0-">
-                       <polygon color="#c7f1a3" /> 
-                       <polyline color="#79c691" /> 
-                       <label label_size="5" /> 
-               </item>
-               
-               <item type="poly_building" order="0-">
-                       <polygon color="#ff6347" />
-               </item>
-               <item type="water_line" order="0-">
-                       <polyline color="#82c8ea" width="2" /> 
-                       <label label_size="5" /> 
-               </item>
-               <item type="water_river" order="0-">
-                       <polyline color="#82c8ea" width="4" /> 
-                       <label label_size="5" /> 
-               </item>
-               <item type="water_canal" order="0-">
-                       <polyline color="#82c8ea" width="3" /> 
-                       <label label_size="5" /> 
-               </item>
-               <item type="water_stream" order="0-">
-                       <polyline color="#82c8ea" width="2" /> 
-                       <label label_size="5" /> 
-               </item>
-               <item type="water_drain" order="0-">
-                       <polyline color="#82c8ea" width="1" /> 
-                       <label label_size="5" /> 
-               </item>
-               <item type="poly_apron" order="0-">
-                       <polygon color="#d0d0d0" />
-               </item>
-               <item type="poly_terminal" order="7-">
-                       <polygon color="#e3c6a6" />
-               </item>
-               <item type="poly_cemetery" order="1-">
-                       <polygon color="#bde3cb" />
-               </item>
-               <item type="poly_car_parking" order="1-">
-                       <polygon color="#d2d2d2" />
-               </item>
-               
-               <!-- borders -->
-               <item type="border_state" order="0-5">
-                       <polyline color="#778899" dash="3,2,1,3" width="3" /> 
-               </item>
-               <item type="border_country" order="0-5">
-                       <polyline color="#778899" dash="3,2,1,3" width="2" /> 
-               </item>
-               
-               <item type="border_state" order="6-11">
-                       <polyline color="#778899" dash="6,6,1,6" width="3" /> 
-               </item>
-               <item type="border_country" order="6-11">
-                       <polyline color="#778899" dash="6,6,1,6" width="2" /> 
-               </item>
-               
-               <item type="border_state" order="12-20">
-                       <polyline color="#778899" dash="10,10,2,10" width="3" /> 
-               </item>
-               <item type="border_country" order="12-20">
-                       <polyline color="#778899" dash="10,10,2,10" width="2" /> 
-               </item>
-               
-               <item type="height_line_1" order="0-">
-                       <polyline color="#000000" width="1" /> 
-               </item>
-               <item type="height_line_2" order="0-">
-                       <polyline color="#000000" width="2" /> 
-               </item>
-               <item type="street_route" order="2">
-                       <polyline color="#0000a0" width="4" /> 
-               </item>
-               <item type="street_route" order="3-5">
-                       <polyline color="#0000a0" width="8" /> 
-               </item>
-               <item type="street_route" order="6">
-                       <polyline color="#0000a0" width="10" /> 
-               </item>
-               <item type="street_route" order="7-8">
-                       <polyline color="#0000a0" width="16" /> 
-               </item>
-               <item type="street_route" order="9-10">
-                       <polyline color="#0000a0" width="20" /> 
-               </item>
-               <item type="street_route" order="11">
-                       <polyline color="#0000a0" width="28" /> 
-               </item>
-               <item type="street_route" order="12">
-                       <polyline color="#0000a0" width="32" /> 
-               </item>
-               <item type="street_route" order="13">
-                       <polyline color="#0000a0" width="52" /> 
-               </item>
-               <item type="street_route" order="14">
-                       <polyline color="#0000a0" width="64" /> 
-               </item>
-               <item type="street_route" order="15">
-                       <polyline color="#0000a0" width="68" /> 
-               </item>
-               <item type="street_route" order="16">
-                       <polyline color="#0000a0" width="132" /> 
-               </item>
-               <item type="street_route" order="17">
-                       <polyline color="#0000a0" width="268" /> 
-               </item>
-               <item type="street_route" order="18">
-                       <polyline color="#0000a0" width="530" /> 
-               </item>
-               <item type="street_nopass" order="10-">
-                       <polyline color="#000000" width="1" /> 
-               </item>
-               <item type="track_paved" order="9-">
-                       <polyline color="#d2d2d2" width="4" />
-                       <polyline color="#fefefe" width="2" />
-               </item>
-               <item type="track_gravelled" order="10-">
-                       <polyline color="#d2d2d2" width="3" />
-                       <polyline color="#fefefe" width="1" />
-               </item>
-               <item type="track_unpaved" order="11-">
-                       <polyline color="#fff0f5" width="2" />
-                       <polyline color="#fff0f5" width="1" />
-               </item>
-               <item type="track_ground" order="12-">
-                       <polyline color="#fff0f5" width="2" />
-                       <polyline color="#fff0f5" width="1" />
-               </item>
-               <item type="track_grass" order="13-">
-                       <polyline color="#ffffe0" width="2" />
-                       <polyline color="#ffffe0" width="1" />
-               </item>
-               <item type="bridleway" order="10-">
-                       <polyline color="#8b4513" width="3" />
-                       <polyline color="#f4a460" width="1" />
-               </item>
-               <item type="cycleway" order="10-">
-                       <polyline color="#006400" width="4" />
-                       <polyline color="#3cb371" width="2" />
-               </item>
-               <item type="footway" order="12-">
-                       <polyline color="#8b4513" width="3" />
-                       <polyline color="#CD853F" width="1" />
-               </item>
-               <item type="steps" order="12-">
-                       <polyline color="#8b4513" width="3" />
-                       <polyline color="#CD853F" width="1" dash="5,5" />
-               </item>
-               <item type="poly_pedestrian,poly_plaza" order="0-">
-                       <polygon color="#d2d2d2" />
-               </item>
-               <item type="street_pedestrian,living_street" order="10">
-                       <polyline color="#d2d2d2" width="3" />
-                       <polyline color="#dddddd" width="1" />
-               </item>
-               <item type="street_pedestrian,living_street" order="11">
-                       <polyline color="#d2d2d2" width="5" />
-                       <polyline color="#dddddd" width="3" />
-               </item>
-               <item type="street_pedestrian,living_street" order="12">
-                       <polyline color="#d2d2d2" width="8" />
-                       <polyline color="#dddddd" width="6" />
-               </item>
-               <item type="street_pedestrian,living_street" order="13">
-                       <polyline color="#d2d2d2" width="9" />
-                       <polyline color="#dddddd" width="7" />
-               </item>
-               <item type="street_pedestrian,living_street" order="14">
-                       <polyline color="#d2d2d2" width="13" />
-                       <polyline color="#dddddd" width="9" />
-               </item>
-               <item type="street_pedestrian,living_street" order="15">
-                       <polyline color="#d2d2d2" width="18" />
-                       <polyline color="#dddddd" width="14" />
-               </item>
-               <item type="street_pedestrian,living_street" order="16">
-                       <polyline color="#d2d2d2" width="21" />
-                       <polyline color="#dddddd" width="17" />
-               </item>
-               <item type="street_pedestrian,living_street" order="17">
-                       <polyline color="#d2d2d2" width="25" />
-                       <polyline color="#dddddd" width="21" />
-               </item>
-               <item type="street_pedestrian,living_street" order="18">
-                       <polyline color="#d2d2d2" width="40" />
-                       <polyline color="#dddddd" width="34" />
-               </item>
-               <item type="street_service"     order="9">
-                       <polyline color="#d2d2d2" width="2" />
-                       <polyline color="#fefefe" width="1" />
-               </item>
-               <item type="street_service"     order="10">
-                       <polyline color="#d2d2d2" width="3" />
-                       <polyline color="#fefefe" width="2" />
-               </item>
-               <item type="street_service"     order="11">
-                       <polyline color="#d2d2d2" width="4" />
-                       <polyline color="#fefefe" width="2" />
-               </item>
-               <item type="street_service"     order="12">
-                       <polyline color="#d2d2d2" width="5" />
-                       <polyline color="#fefefe" width="3" />
-               </item>
-               <item type="street_service"     order="13">
-                       <polyline color="#d2d2d2" width="6" />
-                       <polyline color="#fefefe" width="4" />
-               </item>
-               <item type="street_service"     order="14">
-                       <polyline color="#d2d2d2" width="7" />
-                       <polyline color="#fefefe" width="5" />
-               </item>
-               <item type="street_service"     order="15">
-                       <polyline color="#d2d2d2" width="8" />
-                       <polyline color="#fefefe" width="6" />
-               </item>
-               <item type="street_service"     order="16">
-                       <polyline color="#d2d2d2" width="9" />
-                       <polyline color="#fefefe" width="7" />
-               </item>
-               <item type="street_service"     order="17">
-                       <polyline color="#d2d2d2" width="10" />
-                       <polyline color="#fefefe" width="8" />
-               </item>
-               <item type="street_service"     order="18">
-                       <polyline color="#d2d2d2" width="11" />
-                       <polyline color="#fefefe" width="9" />
-               </item>
-               <item type="street_0,street_1_city,street_1_land" order="8-10">
-                       <polyline color="#d2d2d2" width="4" /> 
-                       <polyline color="#ffffff" width="2" /> 
-               </item>
-               <item type="street_0,street_1_city,street_1_land" order="11">
-                       <polyline color="#d2d2d2" width="6" /> 
-                       <polyline color="#ffffff" width="4" /> 
-               </item>
-               <item type="street_0,street_1_city,street_1_land" order="12">
-                       <polyline color="#d2d2d2" width="10" /> 
-                       <polyline color="#ffffff" width="8" /> 
-               </item>
-               <item type="street_0,street_1_city,street_1_land" order="13">
-                       <polyline color="#d2d2d2" width="12" /> 
-                       <polyline color="#ffffff" width="9" /> 
-               </item>
-               <item type="street_0,street_1_city,street_1_land" order="14">
-                       <polyline color="#d2d2d2" width="15" /> 
-                       <polyline color="#ffffff" width="13" /> 
-               </item>
-               <item type="street_0,street_1_city,street_1_land" order="15">
-                       <polyline color="#d2d2d2" width="17" /> 
-                       <polyline color="#ffffff" width="14" /> 
-               </item>
-               <item type="street_0,street_1_city,street_1_land" order="16">
-                       <polyline color="#d2d2d2" width="33" /> 
-                       <polyline color="#ffffff" width="26" /> 
-               </item>
-               <item type="street_0,street_1_city,street_1_land" order="17">
-                       <polyline color="#d2d2d2" width="69" /> 
-                       <polyline color="#ffffff" width="61" /> 
-               </item>
-               <item type="street_0,street_1_city,street_1_land" order="18">
-                       <polyline color="#d2d2d2" width="132" /> 
-                       <polyline color="#ffffff" width="126" /> 
-               </item>
-               <item type="street_2_city,street_2_land" order="7-8">
-                       <polyline color="#c0c0c0" width="3" /> 
-                       <polyline color="#ffff00" width="1" /> 
-               </item>
-               <item type="street_2_city,street_2_land" order="9">
-                       <polyline color="#c0c0c0" width="4" /> 
-                       <polyline color="#ffff00" width="2" /> 
-               </item>
-               <item type="street_2_city,street_2_land" order="10">
-                       <polyline color="#c0c0c0" width="6" /> 
-                       <polyline color="#ffff00" width="4" /> 
-               </item>
-               <item type="street_2_city,street_2_land" order="11">
-                       <polyline color="#c0c0c0" width="8" /> 
-                       <polyline color="#ffff00" width="6" /> 
-               </item>
-               <item type="street_2_city,street_2_land" order="12">
-                       <polyline color="#c0c0c0" width="12" /> 
-                       <polyline color="#ffff00" width="9" /> 
-               </item>
-               <item type="street_2_city,street_2_land" order="13">
-                       <polyline color="#c0c0c0" width="15" /> 
-                       <polyline color="#ffff00" width="11" /> 
-               </item>
-               <item type="street_2_city,street_2_land" order="14">
-                       <polyline color="#c0c0c0" width="18" /> 
-                       <polyline color="#ffff00" width="14" /> 
-               </item>
-               <item type="street_2_city,street_2_land" order="15">
-                       <polyline color="#c0c0c0" width="21" /> 
-                       <polyline color="#ffff00" width="17" /> 
-               </item>
-               <item type="street_2_city,street_2_land" order="16">
-                       <polyline color="#c0c0c0" width="35" /> 
-                       <polyline color="#ffff00" width="30" /> 
-               </item>
-               <item type="street_2_city,street_2_land" order="17">
-                       <polyline color="#c0c0c0" width="73" /> 
-                       <polyline color="#ffff00" width="67" /> 
-               </item>
-               <item type="street_2_city,street_2_land" order="18">
-                       <polyline color="#c0c0c0" width="144" /> 
-                       <polyline color="#ffff00" width="138" /> 
-               </item>
-               <item type="street_3_city,street_3_land,ramp,roundabout" order="7-8">
-                       <polyline color="#a0a0a0" width="3" /> 
-                       <polyline color="#ffff00" width="1" /> 
-               </item>
-               <item type="street_3_city,street_3_land,ramp,roundabout" order="9">
-                       <polyline color="#a0a0a0" width="5" /> 
-                       <polyline color="#ffff00" width="3" /> 
-               </item>
-               <item type="street_3_city,street_3_land,ramp,roundabout" order="10">
-                       <polyline color="#a0a0a0" width="8" /> 
-                       <polyline color="#ffff00" width="6" /> 
-               </item>
-               <item type="street_3_city,street_3_land,ramp,roundabout" order="11">
-                       <polyline color="#a0a0a0" width="9" /> 
-                       <polyline color="#ffff00" width="7" /> 
-               </item>
-               <item type="street_3_city,street_3_land,ramp,roundabout" order="12">
-                       <polyline color="#a0a0a0" width="13" /> 
-                       <polyline color="#ffff00" width="9" /> 
-               </item>
-               <item type="street_3_city,street_3_land,ramp,roundabout" order="13">
-                       <polyline color="#a0a0a0" width="18" /> 
-                       <polyline color="#ffff00" width="14" /> 
-               </item>
-               <item type="street_3_city,street_3_land,ramp,roundabout" order="14">
-                       <polyline color="#a0a0a0" width="21" /> 
-                       <polyline color="#ffff00" width="17" /> 
-               </item>
-               <item type="street_3_city,street_3_land,ramp,roundabout" order="15">
-                       <polyline color="#a0a0a0" width="25" /> 
-                       <polyline color="#ffff00" width="21" /> 
-               </item>
-               <item type="street_3_city,street_3_land,ramp,roundabout" order="16">
-                       <polyline color="#a0a0a0" width="40" /> 
-                       <polyline color="#ffff00" width="34" /> 
-               </item>
-               <item type="street_3_city,street_3_land,ramp,roundabout" order="17">
-                       <polyline color="#a0a0a0" width="79" /> 
-                       <polyline color="#ffff00" width="73" /> 
-               </item>
-               <item type="street_3_city,street_3_land,ramp,roundabout" order="18">
-                       <polyline color="#a0a0a0" width="156" /> 
-                       <polyline color="#ffff00" width="150" /> 
-               </item>
-               <item type="street_4_city,street_4_land,street_n_lanes" order="2-6">
-                       <polyline color="#404040" width="1" /> 
-               </item>
-               <item type="street_4_city,street_4_land,street_n_lanes" order="7-8">
-                       <polyline color="#404040" width="3" /> 
-                       <polyline color="#ff0000" width="1" /> 
-               </item>
-               <item type="street_4_city,street_4_land,street_n_lanes" order="9">
-                       <polyline color="#000000" width="5" /> 
-                       <polyline color="#ff0000" width="3" /> 
-               </item>
-               <item type="street_4_city,street_4_land,street_n_lanes" order="10">
-                       <polyline color="#000000" width="6" /> 
-                       <polyline color="#ff0000" width="4" /> 
-               </item>
-               <item type="street_4_city,street_4_land,street_n_lanes" order="11">
-                       <polyline color="#000000" width="9" /> 
-                       <polyline color="#ff0000" width="7" /> 
-               </item>
-               <item type="street_4_city,street_4_land,street_n_lanes" order="12">
-                       <polyline color="#000000" width="13" /> 
-                       <polyline color="#ff0000" width="9" /> 
-               </item>
-               <item type="street_4_city,street_4_land,street_n_lanes" order="13">
-                       <polyline color="#000000" width="18" /> 
-                       <polyline color="#ff0000" width="14" /> 
-               </item>
-               <item type="street_4_city,street_4_land,street_n_lanes" order="14">
-                       <polyline color="#000000" width="21" /> 
-                       <polyline color="#ff0000" width="17" /> 
-               </item>
-               <item type="street_4_city,street_4_land,street_n_lanes" order="15">
-                       <polyline color="#000000" width="24" /> 
-                       <polyline color="#ff0000" width="20" /> 
-               </item>
-               <item type="street_4_city,street_4_land,street_n_lanes" order="16">
-                       <polyline color="#000000" width="39" /> 
-                       <polyline color="#ff0000" width="33" /> 
-               </item>
-               <item type="street_4_city,street_4_land,street_n_lanes" order="17">
-                       <polyline color="#000000" width="78" /> 
-                       <polyline color="#ff0000" width="72" /> 
-               </item>
-               <item type="street_4_city,street_4_land,street_n_lanes" order="18">
-                       <polyline color="#000000" width="156" /> 
-                       <polyline color="#ff0000" width="150" /> 
-               </item>
-               <item type="highway_city,highway_land" order="2">
-                       <polyline color="#ff0000" width="1" /> 
-               </item>
-               <item type="highway_city,highway_land" order="3-5">
-                       <polyline color="#ff0000" width="3" /> 
-                       <polyline color="#ffff00" width="1" /> 
-               </item>
-               <item type="highway_city,highway_land" order="6">
-                       <polyline color="#ff0000" width="4" /> 
-                       <polyline color="#ffff00" width="2" /> 
-               </item>
-               <item type="highway_city,highway_land" order="7-8">
-                       <polyline color="#ff0000" width="7" /> 
-                       <polyline color="#ffff00" width="5" /> 
-                       <polyline color="#ff0000" width="1" /> 
-               </item>
-               <item type="highway_city,highway_land" order="9-10">
-                       <polyline color="#ff0000" width="9" /> 
-                       <polyline color="#ffff00" width="5" /> 
-                       <polyline color="#ff0000" width="1" /> 
-               </item>
-               <item type="highway_city,highway_land" order="11">
-                       <polyline color="#ff0000" width="13" /> 
-                       <polyline color="#ffff00" width="9" /> 
-                       <polyline color="#ff0000" width="1" /> 
-               </item>
-               <item type="highway_city,highway_land" order="12">
-                       <polyline color="#ff0000" width="15" /> 
-                       <polyline color="#ffff00" width="10" /> 
-                       <polyline color="#ff0000" width="1" /> 
-               </item>
-               <item type="highway_city,highway_land" order="13">
-                       <polyline color="#ff0000" width="25" /> 
-                       <polyline color="#ffff00" width="17" /> 
-                       <polyline color="#ff0000" width="1" /> 
-               </item>
-               <item type="highway_city,highway_land" order="14">
-                       <polyline color="#ff0000" width="31" /> 
-                       <polyline color="#ffff00" width="24" /> 
-                       <polyline color="#ff0000" width="1" /> 
-               </item>
-               <item type="highway_city,highway_land" order="15">
-                       <polyline color="#ff0000" width="33" /> 
-                       <polyline color="#ffff00" width="27" /> 
-                       <polyline color="#ff0000" width="1" /> 
-               </item>
-               <item type="highway_city,highway_land" order="16">
-                       <polyline color="#ff0000" width="65" /> 
-                       <polyline color="#ffff00" width="59" /> 
-                       <polyline color="#ff0000" width="1" /> 
-               </item>
-               <item type="highway_city,highway_land" order="17">
-                       <polyline color="#ff0000" width="133" /> 
-                       <polyline color="#ffff00" width="127" /> 
-                       <polyline color="#ff0000" width="1" /> 
-               </item>
-               <item type="highway_city,highway_land" order="18">
-                       <polyline color="#ff0000" width="264" /> 
-                       <polyline color="#ffff00" width="258" /> 
-                       <polyline color="#ff0000" width="1" /> 
-               </item>
-               <item type="street_unkn" order="0-">
-                       <polyline color="#8080ff" width="3" /> 
-               </item>
-               <item type="highway_exit_label" order="10-">
-                       <circle color="#000000" radius="3" label_size="7" />
-               </item>
-               <item type="highway_city,highway_land,street_4_city,street_4_land,street_n_lanes" order="10-18">
-                       <label label_size="8" />
-               </item>
-               <item type="street_2_city,street_2_land,street_3_city,street_3_land,ramp" order="11-18">
-                       <label label_size="9" />
-               </item>
-               <item type="street_nopass,street_0,street_1_city,street_1_land" order="12-18">
-                       <label label_size="9" />
-               </item>
-               <item type="aeroway_taxiway" order="10">
-                       <polyline color="#989994" width="4" />
-                       <polyline color="#d3dbbc" width="2" />
-               </item>
-               <item type="aeroway_taxiway" order="11">
-                       <polyline color="#989994" width="6" />
-                       <polyline color="#d3dbbc" width="4" />
-               </item>
-               <item type="aeroway_taxiway" order="12">
-                       <polyline color="#989994" width="10" />
-                       <polyline color="#d3dbbc" width="8" />
-               </item>
-               <item type="aeroway_taxiway" order="13">
-                       <polyline color="#989994" width="12" />
-                       <polyline color="#d3dbbc" width="9" />
-               </item>
-               <item type="aeroway_taxiway" order="14">
-                       <polyline color="#989994" width="15" />
-                       <polyline color="#d3dbbc" width="13" />
-               </item>
-               <item type="aeroway_taxiway" order="15">
-                       <polyline color="#989994" width="17" />
-                       <polyline color="#d3dbbc" width="14" />
-               </item>
-               <item type="aeroway_taxiway" order="16">
-                       <polyline color="#989994" width="33" />
-                       <polyline color="#d3dbbc" width="26" />
-               </item>
-               <item type="aeroway_taxiway" order="17">
-                       <polyline color="#989994" width="69" />
-                       <polyline color="#d3dbbc" width="61" />
-               </item>
-               <item type="aeroway_taxiway" order="18">
-                       <polyline color="#989994" width="132" />
-                       <polyline color="#d3dbbc" width="126" />
-               </item>
-               <item type="aeroway_runway" order="2-6">
-                       <polyline color="#404040" width="1" />
-               </item>
-               <item type="aeroway_runway" order="7-8">
-                       <polyline color="#404040" width="3" />
-                       <polyline color="#d3dbbc" width="1" />
-               </item>
-               <item type="aeroway_runway" order="9">
-                       <polyline color="#6b6f5f" width="5" />
-                       <polyline color="#d3dbbc" width="3" />
-               </item>
-               <item type="aeroway_runway" order="10">
-                       <polyline color="#6b6f5f" width="6" />
-                       <polyline color="#d3dbbc" width="4" />
-               </item>
-               <item type="aeroway_runway" order="11">
-                       <polyline color="#6b6f5f" width="9" />
-                       <polyline color="#d3dbbc" width="7" />
-               </item>
-               <item type="aeroway_runway" order="12">
-                       <polyline color="#6b6f5f" width="13" />
-                       <polyline color="#d3dbbc" width="9" />
-               </item>
-               <item type="aeroway_runway" order="13">
-                       <polyline color="#6b6f5f" width="18" />
-                       <polyline color="#d3dbbc" width="14" />
-               </item>
-               <item type="aeroway_runway" order="14">
-                       <polyline color="#6b6f5f" width="21" />
-                       <polyline color="#d3dbbc" width="17" />
-               </item>
-               <item type="aeroway_runway" order="15">
-                       <polyline color="#6b6f5f" width="24" />
-                       <polyline color="#d3dbbc" width="20" />
-               </item>
-               <item type="aeroway_runway" order="16">
-                       <polyline color="#6b6f5f" width="39" />
-                       <polyline color="#d3dbbc" width="33" />
-               </item>
-               <item type="aeroway_runway" order="17">
-                       <polyline color="#6b6f5f" width="78" />
-                       <polyline color="#d3dbbc" width="72" />
-               </item>
-               <item type="aeroway_runway" order="18">
-                       <polyline color="#6b6f5f" width="156" />
-                       <polyline color="#d3dbbc" width="150" />
-               </item>
-               
-               
-               <item type="rail" order="6-9">
-                       <polyline color="#696969" width="4" />
-                       <polyline color="#FFFFFF" dash="2,5" width="2" />
-               </item>
-               <item type="rail_narrow_gauge" order="6-9">
-                       <polyline color="#696969" width="4" />
-                       <polyline color="#FFFFFF" dash="2,5" width="2" />
-               </item>
-               
-               <item type="rail" order="10-13">
-                       <polyline color="#696969" width="6" />
-                       <polyline color="#FFFFFF" dash="3,8" width="3" />
-               </item>
-               <item type="rail_narrow_gauge" order="10-13">
-                       <polyline color="#696969" width="6" />
-                       <polyline color="#FFFFFF" dash="3,8" width="3" />
-               </item>
-               
-               <item type="rail" order="14-18">
-                       <polyline color="#696969" width="8" />
-                       <polyline color="#FFFFFF" dash="4,12" width="5" />
-               </item>
-               <item type="rail_narrow_gauge" order="14-18">
-                       <polyline color="#696969" width="8" />
-                       <polyline color="#FFFFFF" dash="4,12" width="5" />
-               </item>
-               
-               <item type="rail_light" order="10-13">
-                       <polyline color="#696969" width="4" />
-                       <polyline color="#FFFFFF" dash="2,5" width="2" />
-               </item>
-               
-               <item type="rail_light" order="14-18">
-                       <polyline color="#696969" width="6" />
-                       <polyline color="#FFFFFF" dash="4,8" width="4" />
-               </item>
-               
-               <item type="rail_subway" order="8-">
-                       <polyline color="#696969" width="2" />
-                       <polyline color="#FFFFFF" dash="5,5" width="2" />
-               </item>
-               <item type="rail_mono" order="10-">
-                       <polyline color="#696969" width="2" />
-               </item>
-               <item type="rail_tram,bus_guideway" order="10-">
-                       <polyline color="#696969" width="2" />
-               </item>
-               <item type="rail_preserved" order="10-">
-                       <polyline color="#696969" width="1" dash="7" />
-               </item>
-               <item type="rail_disused" order="12-">
-                       <polyline color="#d3d3d3" width="1" dash="10" />
-               </item>
-               <item type="rail_abandoned" order="12-">
-                       <polyline color="#f5f5f5" width="1" dash="10" />
-               </item>
-               <item type="lift_cable_car" order="6-">
-                       <polyline color="#696969" width="1" dash="5" />
-               </item>
-               <item type="lift_chair" order="6-">
-                       <polyline color="#696969" width="1" dash="5" />
-               </item>
-               <item type="lift_drag" order="6-">
-                       <polyline color="#696969" width="1" dash="5" />
-               </item>
-               <item type="ferry" order="5-">
-                       <polyline color="#000000" width="3" dash="5" /> 
-               </item>
-               <item type="town_label,district_label,town_label_0e0,town_label_1e0,town_label_2e0,town_label_5e0,town_label_1e1,town_label_2e1,town_label_5e1,town_label_1e2,town_label_2e2,town_label_5e2,district_label_0e0,district_label_1e0,district_label_2e0,district_label_5e0,district_label_1e1,district_label_2e1,district_label_5e1,district_label_1e2,district_label_2e2,district_label_5e2" order="12-">
-                       <circle color="#000000" radius="3" label_size="7" />
-               </item>
-               <item type="district_label_1e3,district_label_2e3,district_label_5e3" order="11-">
-                       <circle color="#000000" radius="3" label_size="7" />
-               </item>
-               <item type="town_label_1e3,town_label_2e3,town_label_5e3" order="10-">
-                       <circle color="#000000" radius="3" label_size="7" />
-               </item>
-               <item type="district_label_1e4,district_label_2e4,district_label_5e4" order="9-">
-                       <circle color="#000000" radius="3" label_size="7" />
-               </item>
-               <item type="town_label_1e4,town_label_2e4,town_label_5e4" order="8-">
-                       <circle color="#000000" radius="3" label_size="7" />
-               </item>
-               <item type="district_label_1e5,district_label_2e5,district_label_5e5" order="6-">
-                       <circle color="#000000" radius="3" label_size="10" />
-               </item>
-               <item type="town_label_1e5,town_label_2e5,town_label_5e5" order="4-">
-                       <circle color="#000000" radius="3" label_size="10" />
-               </item>
-               <item type="district_label_1e6,district_label_2e6,district_label_5e6" order="3-">
-                       <circle color="#000000" radius="3" label_size="15" />
-               </item>
-               <item type="town_label_1e6,town_label_2e6,town_label_5e6" order="2-">
-                       <circle color="#000000" radius="3" label_size="15" />
-               </item>
-               <item type="town_label_1e7,district_label_1e7" order="1-">
-                       <circle color="#000000" radius="3" label_size="15" />
-               </item>
-               <item type="track" order="3-">
-                       <polyline color="#3f3f3f" width="1" />
-               </item>
-               <item type="poi_airport" order="5-">
-                       <icon src="airport.xpm" />
-               </item>
-               <item type="town_ghost" order="0-">
-                       <icon src="ghost_town.xpm" />
-               </item>
-               <item type="poi_hotel" order="12-">
-                       <icon src="hotel.xpm" />
-               </item>
-               <item type="poi_car_parking" order="11-">
-                       <icon src="parking.xpm" />
-               </item>
-               <item type="poi_car_dealer_parts" order="0-">
-                       <icon src="car_dealer.xpm" />
-               </item>
-               <item type="poi_fuel" order="10-">
-                       <icon src="fuel.xpm" />
-               </item>
-               <item type="poi_shopping" order="10-">
-                       <icon src="shopping.xpm" />
-               </item>
-               <item type="poi_attraction" order="5-">
-                       <icon src="attraction.xpm" />
-               </item>
-               <item type="poi_cafe" order="12-">
-                       <icon src="cafe.xpm" />
-               </item>
-               <item type="poi_bar" order="12-">
-                       <icon src="bar.xpm" />
-               </item>
-               <item type="poi_bridge" order="0-">
-                       <icon src="bridge.xpm" />
-               </item>
-               <item type="highway_exit" order="11-">
-                       <icon src="exit.xpm" />
-               </item>
-               <item type="poi_camp_rv" order="9-">
-                       <icon src="camping.xpm" />
-               </item>
-               <item type="poi_museum_history" order="12-">
-                       <icon src="museum.xpm" />
-               </item>
-               <item type="poi_hospital" order="12-">
-                       <icon src="hospital.xpm" />
-               </item>
-               <item type="point_unkn" order="0-">
-                       <circle color="#8080ff" radius="3" />
-               </item>
-               <item type="poi_dining" order="12-">
-                       <icon src="dining.xpm" />
-               </item>
-               <item type="poi_fastfood" order="12-">
-                       <icon src="fastfood.xpm" />
-               </item>
-               <item type="poi_police" order="12-">
-                       <icon src="police.xpm" />
-               </item>
-               <item type="poi_auto_club" order="0-">
-                       <icon src="auto_club.xpm" />
-               </item>
-               <item type="poi_autoservice" order="0-">
-                       <icon src="autoservice.xpm" />
-               </item>
-               <item type="poi_bank" order="12-">
-                       <icon src="bank.xpm" />
-               </item>
-               <item type="poi_bay" order="0-">
-                       <icon src="bay.xpm" />
-               </item>
-               <item type="poi_bend" order="0-">
-                       <icon src="bend.xpm" />
-               </item>
-               <item type="poi_boat_ramp" order="0-">
-                       <icon src="boat_ramp.xpm" />
-               </item>
-               <item type="poi_border_station" order="0-">
-                       <icon src="border_station.xpm" />
-               </item>
-               <item type="poi_bowling" order="0-">
-                       <icon src="bowling.xpm" />
-               </item>
-               <item type="poi_bus_station" order="12-">
-                       <icon src="bus.xpm" />
-               </item>
-               <item type="poi_bus_stop" order="12-">
-                       <icon src="bus.xpm" />
-               </item>
-               <item type="poi_bussines_service" order="0-">
-                       <icon src="bussines_service.xpm" />
-               </item>
-               <item type="poi_car_rent" order="0-">
-                       <icon src="car_rent.xpm" />
-               </item>
-               <item type="poi_car_wash" order="0-">
-                       <icon src="car_wash.xpm" />
-               </item>
-               <item type="poi_casino" order="0-">
-                       <icon src="casino.xpm" />
-               </item>
-               <item type="poi_cemetery" order="0-">
-                       <icon src="cemetery.xpm" />
-               </item>
-               <item type="poi_church" order="11-">
-                       <icon src="church.xpm" />
-               </item>
-               <item type="poi_cinema" order="12-">
-                       <icon src="cinema.xpm" />
-               </item>
-               <item type="poi_civil" order="0-">
-                       <icon src="civil.xpm" />
-               </item>
-               <item type="poi_communication" order="0-">
-                       <icon src="communication.xpm" />
-               </item>
-               <item type="poi_concert" order="0-">
-                       <icon src="concert.xpm" />
-               </item>
-               <item type="poi_cove" order="0-">
-                       <icon src="cove.xpm" />
-               </item>
-               <item type="poi_crossing" order="0-">
-                       <icon src="crossing.xpm" />
-               </item>
-               <item type="poi_dam" order="0-">
-                       <icon src="dam.xpm" />
-               </item>
-               <item type="poi_danger_area" order="0-">
-                       <icon src="danger_area.xpm" />
-               </item>
-               <item type="poi_dangerous" order="0-">
-                       <icon src="dangerous.xpm" />
-               </item>
-               <item type="poi_daymark" order="0-">
-                       <icon src="daymark.xpm" />
-               </item>
-               <item type="poi_diving" order="0-">
-                       <icon src="diving.xpm" />
-               </item>
-               <item type="poi_drinking_water" order="0-">
-                       <icon src="drinking_water.xpm" />
-               </item>
-               <item type="poi_emergency" order="0-">
-                       <icon src="emergency.xpm" />
-               </item>
-               <item type="poi_fair" order="0-">
-                       <icon src="fair.xpm" />
-               </item>
-               <item type="poi_firebrigade" order="12-">
-                       <icon src="firebrigade.xpm" />
-               </item>
-               <item type="poi_fish" order="0-">
-                       <icon src="fish.xpm" />
-               </item>
-               <item type="poi_forbiden_area" order="0-">
-                       <icon src="forbiden_area.xpm" />
-               </item>
-               <item type="poi_garmin" order="0-">
-                       <icon src="garmin.xpm" />
-               </item>
-               <item type="poi_golf" order="12-">
-                       <icon src="golf.xpm" />
-               </item>
-               <item type="poi_goverment_building" order="0-">
-                       <icon src="goverment_building.xpm" />
-               </item>
-               <item type="poi_height" order="0-">
-                       <icon src="height.xpm" />
-               </item>
-               <item type="poi_heliport" order="0-">
-                       <icon src="heliport.xpm" />
-               </item>
-               <item type="poi_hotspring" order="0-">
-                       <icon src="hotspring.xpm" />
-               </item>
-               <item type="poi_icesport" order="0-">
-                       <icon src="icesport.xpm" />
-               </item>
-               <item type="poi_information" order="12-">
-                       <icon src="information.xpm" />
-               </item>
-               <item type="poi_justice" order="0-">
-                       <icon src="justice.xpm" />
-               </item>
-               <item type="poi_landmark" order="0-">
-                       <icon src="landmark.xpm" />
-               </item>
-               <item type="poi_levee" order="0-">
-                       <icon src="levee.xpm" />
-               </item>
-               <item type="poi_library" order="12-">
-                       <icon src="library.xpm" />
-               </item>
-               <item type="poi_locale" order="0-">
-                       <icon src="locale.xpm" />
-               </item>
-               <item type="poi_loudspeaker" order="0-">
-                       <icon src="loudspeaker.xpm" />
-               </item>
-               <item type="poi_mall" order="0-">
-                       <icon src="mall.xpm" />
-               </item>
-               <item type="poi_manmade_feature" order="0-">
-                       <icon src="manmade_feature.xpm" />
-               </item>
-               <item type="poi_marine" order="0-">
-                       <icon src="marine.xpm" />
-               </item>
-               <item type="poi_marine_type" order="0-">
-                       <icon src="marine_type.xpm" />
-               </item>
-               <item type="poi_mark" order="0-">
-                       <icon src="mark.xpm" />
-               </item>
-               <item type="poi_military" order="0-">
-                       <icon src="military.xpm" />
-               </item>
-               <item type="poi_mine" order="0-">
-                       <icon src="mine.xpm" />
-               </item>
-               <item type="poi_nondangerous" order="0-">
-                       <icon src="nondangerous.xpm" />
-               </item>
-               <item type="poi_oil_field" order="0-">
-                       <icon src="oil_field.xpm" />
-               </item>
-               <item type="poi_personal_service" order="0-">
-                       <icon src="personal_service.xpm" />
-               </item>
-               <item type="poi_pharmacy" order="12-">
-                       <icon src="pharmacy.xpm" />
-               </item>
-               <item type="poi_post" order="13-">
-                       <icon src="post.xpm" />
-               </item>
-               <item type="poi_public_office" order="0-">
-                       <icon src="public_office.xpm" />
-               </item>
-               <item type="poi_repair_service" order="0-">
-                       <icon src="repair_service.xpm" />
-               </item>
-               <item type="poi_resort" order="0-">
-                       <icon src="resort.xpm" />
-               </item>
-               <item type="poi_rest_room" order="13-">
-                       <icon src="rest_room.xpm" />
-               </item>
-               <item type="poi_restaurant" order="12-">
-                       <icon src="restaurant.xpm" />
-               </item>
-               <item type="poi_restricted_area" order="0-">
-                       <icon src="restricted_area.xpm" />
-               </item>
-               <item type="poi_restroom" order="13-">
-                       <icon src="restroom.xpm" />
-               </item>
-               <item type="poi_sailing" order="0-">
-                       <icon src="sailing.xpm" />
-               </item>
-               <item type="poi_scenic_area" order="0-">
-                       <icon src="scenic_area.xpm" />
-               </item>
-               <item type="poi_school" order="12-">
-                       <icon src="school.xpm" />
-               </item>
-               <item type="poi_service" order="0-">
-                       <icon src="service.xpm" />
-               </item>
-               <item type="poi_shop_apparel" order="0-">
-                       <icon src="shop_apparel.xpm" />
-               </item>
-               <item type="poi_shop_computer" order="0-">
-                       <icon src="shop_computer.xpm" />
-               </item>
-               <item type="poi_shop_department" order="0-">
-                       <icon src="shop_department.xpm" />
-               </item>
-               <item type="poi_shop_furnish" order="0-">
-                       <icon src="shop_furnish.xpm" />
-               </item>
-               <item type="poi_shop_grocery" order="0-">
-                       <icon src="shop_grocery.xpm" />
-               </item>
-               <item type="poi_shop_handg" order="0-">
-                       <icon src="shop_handg.xpm" />
-               </item>
-               <item type="poi_shop_merchandise" order="0-">
-                       <icon src="shop_merchandise.xpm" />
-               </item>
-               <item type="poi_shop_retail" order="0-">
-                       <icon src="shop_retail.xpm" />
-               </item>
-               <item type="poi_shower" order="0-">
-                       <icon src="shower.xpm" />
-               </item>
-               <item type="poi_skiing" order="12-">
-                       <icon src="skiing.xpm" />
-               </item>
-               <item type="poi_social_service" order="0-">
-                       <icon src="social_service.xpm" />
-               </item>
-               <item type="poi_sounding" order="0-">
-                       <icon src="sounding.xpm" />
-               </item>
-               <item type="poi_sport" order="0-">
-                       <icon src="sport.xpm" />
-               </item>
-               <item type="poi_stadium" order="0-">
-                       <icon src="stadium.xpm" />
-               </item>
-               <item type="poi_subdivision" order="0-">
-                       <icon src="subdivision.xpm" />
-               </item>
-               <item type="poi_swimming" order="12-">
-                       <icon src="swimming.xpm" />
-               </item>
-               <item type="poi_telephone" order="13-">
-                       <icon src="telephone.xpm" />
-               </item>
-               <item type="poi_theater" order="12-">
-                       <icon src="theater.xpm" />
-               </item>
-               <item type="poi_tide" order="0-">
-                       <icon src="tide.xpm" />
-               </item>
-               <item type="poi_tower" order="13-">
-                       <icon src="tower.xpm" />
-               </item>
-               <item type="poi_trail" order="0-">
-                       <icon src="trail.xpm" />
-               </item>
-               <item type="poi_truck_stop" order="0-">
-                       <icon src="truck_stop.xpm" />
-               </item>
-               <item type="poi_tunnel" order="0-">
-                       <icon src="tunnel.xpm" />
-               </item>
-               <item type="poi_wine" order="0-">
-                       <icon src="wine.xpm" />
-               </item>
-               <item type="poi_worship" order="0-">
-                       <icon src="worship.xpm" />
-               </item>
-               <item type="poi_wrecker" order="0-">
-                       <icon src="wrecker.xpm" />
-               </item>
-               <item type="poi_zoo" order="0-">
-                       <icon src="zoo.xpm" />
-               </item>
-               <item type="poi_picnic" order="11-">
-                       <icon src="picnic.xpm" />
-               </item>
-               <item type="poi_gc_multi" order="0-">
-                       <icon src="gc_multi.xpm" />
-               </item>
-               <item type="poi_gc_tradi" order="0-">
-                       <icon src="gc_tradi.xpm" />
-               </item>
-               <item type="poi_gc_event" order="0-">
-                       <icon src="gc_event.xpm" />
-               </item>
-               <item type="poi_gc_mystery" order="0-">
-                       <icon src="gc_mystery.xpm" />
-               </item>
-               <item type="poi_gc_question" order="0-">
-                       <icon src="gc_question.xpm" />
-               </item>
-               <item type="poi_gc_stages" order="0-">
-                       <icon src="gc_stages.xpm" />
-               </item>
-               <item type="poi_gc_reference" order="0-">
-                       <icon src="gc_reference.xpm" />
-               </item>
-               <item type="poi_gc_webcam" order="0-">
-                       <icon src="gc_webcam.xpm" />
-               </item>
-               <item type="traffic_signals" order="13-">
-                       <icon src="traffic_signals.xpm" />
-               </item>
-               <item type="poly_flats,poly_scrub,poly_military_zone,poly_marine,plantation,tundra" order="0-">
-                       <polygon color="#a0a0a0" />
-                       <label label_size="5" /> 
-               </item>
-               <item type="rg_segment" order="0-">
-                       <polyline color="#FF089C" width="1" />
-               </item>
-               <item type="rg_point" order="0-">
-                       <circle color="#FF089C" radius="10"  label_size="7" />
-               </item>
-       </layer>
-</layout>
+       <layout name="Bike" color= "#ffefb7">
+               <layer name="polygons">
+                       <item type="image" order="0-">
+                               <image />
+                       </item>
+                       <item type="poly_wood" order="0-">
+                               <polygon color="#8ec78d" /> 
+                       </item>
+                       <item type="poly_town" order="0-">
+                               <polygon color="#ffc895" /> 
+                               <polyline color="#ebb481" /> 
+                       </item>
+                       <item type="poly_park" order="0-">
+                               <polygon color="#7cc334" /> 
+                               <label label_size="5" /> 
+                       </item>
+                       <item type="poly_water" order="0-">
+                               <polygon color="#82c8ea" /> 
+                               <polyline color="#5096b8" /> 
+                               <label label_size="5" /> 
+                       </item>
+                       <item type="poly_land" order="0-">
+                               <polygon color="#ffefb7" /> 
+                               <polyline color="#ffefb7" /> 
+                               <label label_size="5" /> 
+                       </item>
+                       <item type="poly_airport" order="0-">
+                               <polygon color="#a0a0a0" /> 
+                       </item>
+                       <item type="sport_poly,poly_sport" order="0-">
+                               <polygon color="#ff8c00" /> 
+                       </item>
+                       <item type="poly_industry,poly_place,poly_railway" order="0-">
+                               <polygon color="#e6e6e6" /> 
+                       </item>
+                       <item type="poly_commercial" order="0-">
+                               <polygon color="#fff8dc" /> 
+                       </item>
+                       
+                       <!-- landuse=industrial -->
+                       <item type="industry_poly,building_poly,place_poly,poly_brownfield,poly_greenfield,poly_construction,poly_railway" order="0-">
+                               <polygon color="#ecd8ff" /> 
+                       </item>
+                       <!-- landuse=farm -->
+                       <item type="poly_farm" order="0-">
+                               <polygon color="#c7f1a3" /> 
+                               <polyline color="#79c691" /> 
+                               <label label_size="5" /> 
+                       </item>
+                       <item type="poly_scree,poly_scrub,poly_fell,poly_heath" order="0-">
+                               <polygon color="#c7f1a3" /> 
+                               <polyline color="#79c691" /> 
+                               <label label_size="5" /> 
+                       </item>
+                       <item type="poly_marsh,poly_mud,poly_quarry" order="0-">
+                               <polygon color="#DEB887" /> 
+                               <polyline color="#DEB887" /> 
+                               <label label_size="5" /> 
+                       </item>
+                       
+                       <item type="poly_allotments,poly_playground,poly_village_green,poly_recreation_ground,poly_common,poly_garden" order="0-">
+                               <polygon color="#c7f1a3" /> 
+                               <polyline color="#79c691" /> 
+                               <label label_size="5" /> 
+                       </item>
+                       
+                       <item type="poly_building" order="0-">
+                               <polygon color="#ff6347" />
+                       </item>
+                       <item type="water_line" order="0-">
+                               <polyline color="#82c8ea" width="2" /> 
+                               <label label_size="5" /> 
+                       </item>
+                       <item type="water_river" order="0-">
+                               <polyline color="#82c8ea" width="4" /> 
+                               <label label_size="5" /> 
+                       </item>
+                       <item type="water_canal" order="0-">
+                               <polyline color="#82c8ea" width="3" /> 
+                               <label label_size="5" /> 
+                       </item>
+                       <item type="water_stream" order="0-">
+                               <polyline color="#82c8ea" width="2" /> 
+                               <label label_size="5" /> 
+                       </item>
+                       <item type="water_drain" order="0-">
+                               <polyline color="#82c8ea" width="1" /> 
+                               <label label_size="5" /> 
+                       </item>
+                       <item type="poly_apron" order="0-">
+                               <polygon color="#d0d0d0" />
+                       </item>
+                       <item type="poly_terminal" order="7-">
+                               <polygon color="#e3c6a6" />
+                       </item>
+                       <item type="poly_cemetery" order="1-">
+                               <polygon color="#bde3cb" />
+                       </item>
+                       <item type="poly_car_parking" order="1-">
+                               <polygon color="#d2d2d2" />
+                       </item>
+                       
+                       <!-- borders -->
+                       <item type="border_state" order="0-5">
+                               <polyline color="#778899" dash="3,2,1,3" width="3" /> 
+                       </item>
+                       <item type="border_country" order="0-5">
+                               <polyline color="#778899" dash="3,2,1,3" width="2" /> 
+                       </item>
+                       
+                       <item type="border_state" order="6-11">
+                               <polyline color="#778899" dash="6,6,1,6" width="3" /> 
+                       </item>
+                       <item type="border_country" order="6-11">
+                               <polyline color="#778899" dash="6,6,1,6" width="2" /> 
+                       </item>
+                       
+                       <item type="border_state" order="12-20">
+                               <polyline color="#778899" dash="10,10,2,10" width="3" /> 
+                       </item>
+                       <item type="border_country" order="12-20">
+                               <polyline color="#778899" dash="10,10,2,10" width="2" /> 
+                       </item>
+                       
+                       <item type="height_line_1" order="0-">
+                               <polyline color="#000000" width="1" /> 
+                       </item>
+                       <item type="height_line_2" order="0-">
+                               <polyline color="#000000" width="2" /> 
+                       </item>
+                       <item type="street_route" order="2">
+                               <polyline color="#0000a0" width="4" /> 
+                       </item>
+                       <item type="street_route" order="3-5">
+                               <polyline color="#0000a0" width="8" /> 
+                       </item>
+                       <item type="street_route" order="6">
+                               <polyline color="#0000a0" width="10" /> 
+                       </item>
+                       <item type="street_route" order="7-8">
+                               <polyline color="#0000a0" width="16" /> 
+                       </item>
+                       <item type="street_route" order="9-10">
+                               <polyline color="#0000a0" width="20" /> 
+                       </item>
+                       <item type="street_route" order="11">
+                               <polyline color="#0000a0" width="28" /> 
+                       </item>
+                       <item type="street_route" order="12">
+                               <polyline color="#0000a0" width="32" /> 
+                       </item>
+                       <item type="street_route" order="13">
+                               <polyline color="#0000a0" width="52" /> 
+                       </item>
+                       <item type="street_route" order="14">
+                               <polyline color="#0000a0" width="64" /> 
+                       </item>
+                       <item type="street_route" order="15">
+                               <polyline color="#0000a0" width="68" /> 
+                       </item>
+                       <item type="street_route" order="16">
+                               <polyline color="#0000a0" width="132" /> 
+                       </item>
+                       <item type="street_route" order="17">
+                               <polyline color="#0000a0" width="268" /> 
+                       </item>
+                       <item type="street_route" order="18">
+                               <polyline color="#0000a0" width="530" /> 
+                       </item>
+                       <item type="street_nopass" order="10-">
+                               <polyline color="#000000" width="1" /> 
+                       </item>
+                       <item type="track_paved" order="9-">
+                               <polyline color="#d2d2d2" width="4" />
+                               <polyline color="#fefefe" width="2" />
+                       </item>
+                       <item type="track_gravelled" order="10-">
+                               <polyline color="#d2d2d2" width="3" />
+                               <polyline color="#fefefe" width="1" />
+                       </item>
+                       <item type="track_unpaved" order="11-">
+                               <polyline color="#fff0f5" width="2" />
+                               <polyline color="#fff0f5" width="1" />
+                       </item>
+                       <item type="track_ground" order="12-">
+                               <polyline color="#fff0f5" width="2" />
+                               <polyline color="#fff0f5" width="1" />
+                       </item>
+                       <item type="track_grass" order="13-">
+                               <polyline color="#ffffe0" width="2" />
+                               <polyline color="#ffffe0" width="1" />
+                       </item>
+                       <item type="bridleway" order="10-">
+                               <polyline color="#8b4513" width="3" />
+                               <polyline color="#f4a460" width="1" />
+                       </item>
+                       <item type="cycleway" order="10-">
+                               <polyline color="#006400" width="4" />
+                               <polyline color="#3cb371" width="2" />
+                       </item>
+                       <item type="footway" order="12-">
+                               <polyline color="#8b4513" width="3" />
+                               <polyline color="#CD853F" width="1" />
+                       </item>
+                       <item type="steps" order="12-">
+                               <polyline color="#8b4513" width="3" />
+                               <polyline color="#CD853F" width="1" dash="5,5" />
+                       </item>
+                       <item type="poly_pedestrian,poly_plaza" order="0-">
+                               <polygon color="#d2d2d2" />
+                       </item>
+                       <item type="street_pedestrian,living_street" order="10">
+                               <polyline color="#d2d2d2" width="3" />
+                               <polyline color="#dddddd" width="1" />
+                       </item>
+                       <item type="street_pedestrian,living_street" order="11">
+                               <polyline color="#d2d2d2" width="5" />
+                               <polyline color="#dddddd" width="3" />
+                       </item>
+                       <item type="street_pedestrian,living_street" order="12">
+                               <polyline color="#d2d2d2" width="8" />
+                               <polyline color="#dddddd" width="6" />
+                       </item>
+                       <item type="street_pedestrian,living_street" order="13">
+                               <polyline color="#d2d2d2" width="9" />
+                               <polyline color="#dddddd" width="7" />
+                       </item>
+                       <item type="street_pedestrian,living_street" order="14">
+                               <polyline color="#d2d2d2" width="13" />
+                               <polyline color="#dddddd" width="9" />
+                       </item>
+                       <item type="street_pedestrian,living_street" order="15">
+                               <polyline color="#d2d2d2" width="18" />
+                               <polyline color="#dddddd" width="14" />
+                       </item>
+                       <item type="street_pedestrian,living_street" order="16">
+                               <polyline color="#d2d2d2" width="21" />
+                               <polyline color="#dddddd" width="17" />
+                       </item>
+                       <item type="street_pedestrian,living_street" order="17">
+                               <polyline color="#d2d2d2" width="25" />
+                               <polyline color="#dddddd" width="21" />
+                       </item>
+                       <item type="street_pedestrian,living_street" order="18">
+                               <polyline color="#d2d2d2" width="40" />
+                               <polyline color="#dddddd" width="34" />
+                       </item>
+                       <item type="street_service"     order="9">
+                               <polyline color="#d2d2d2" width="2" />
+                               <polyline color="#fefefe" width="1" />
+                       </item>
+                       <item type="street_service"     order="10">
+                               <polyline color="#d2d2d2" width="3" />
+                               <polyline color="#fefefe" width="2" />
+                       </item>
+                       <item type="street_service"     order="11">
+                               <polyline color="#d2d2d2" width="4" />
+                               <polyline color="#fefefe" width="2" />
+                       </item>
+                       <item type="street_service"     order="12">
+                               <polyline color="#d2d2d2" width="5" />
+                               <polyline color="#fefefe" width="3" />
+                       </item>
+                       <item type="street_service"     order="13">
+                               <polyline color="#d2d2d2" width="6" />
+                               <polyline color="#fefefe" width="4" />
+                       </item>
+                       <item type="street_service"     order="14">
+                               <polyline color="#d2d2d2" width="7" />
+                               <polyline color="#fefefe" width="5" />
+                       </item>
+                       <item type="street_service"     order="15">
+                               <polyline color="#d2d2d2" width="8" />
+                               <polyline color="#fefefe" width="6" />
+                       </item>
+                       <item type="street_service"     order="16">
+                               <polyline color="#d2d2d2" width="9" />
+                               <polyline color="#fefefe" width="7" />
+                       </item>
+                       <item type="street_service"     order="17">
+                               <polyline color="#d2d2d2" width="10" />
+                               <polyline color="#fefefe" width="8" />
+                       </item>
+                       <item type="street_service"     order="18">
+                               <polyline color="#d2d2d2" width="11" />
+                               <polyline color="#fefefe" width="9" />
+                       </item>
+                       <item type="street_0,street_1_city,street_1_land" order="8-10">
+                               <polyline color="#d2d2d2" width="4" /> 
+                               <polyline color="#ffffff" width="2" /> 
+                       </item>
+                       <item type="street_0,street_1_city,street_1_land" order="11">
+                               <polyline color="#d2d2d2" width="6" /> 
+                               <polyline color="#ffffff" width="4" /> 
+                       </item>
+                       <item type="street_0,street_1_city,street_1_land" order="12">
+                               <polyline color="#d2d2d2" width="10" /> 
+                               <polyline color="#ffffff" width="8" /> 
+                       </item>
+                       <item type="street_0,street_1_city,street_1_land" order="13">
+                               <polyline color="#d2d2d2" width="12" /> 
+                               <polyline color="#ffffff" width="9" /> 
+                       </item>
+                       <item type="street_0,street_1_city,street_1_land" order="14">
+                               <polyline color="#d2d2d2" width="15" /> 
+                               <polyline color="#ffffff" width="13" /> 
+                       </item>
+                       <item type="street_0,street_1_city,street_1_land" order="15">
+                               <polyline color="#d2d2d2" width="17" /> 
+                               <polyline color="#ffffff" width="14" /> 
+                       </item>
+                       <item type="street_0,street_1_city,street_1_land" order="16">
+                               <polyline color="#d2d2d2" width="33" /> 
+                               <polyline color="#ffffff" width="26" /> 
+                       </item>
+                       <item type="street_0,street_1_city,street_1_land" order="17">
+                               <polyline color="#d2d2d2" width="69" /> 
+                               <polyline color="#ffffff" width="61" /> 
+                       </item>
+                       <item type="street_0,street_1_city,street_1_land" order="18">
+                               <polyline color="#d2d2d2" width="132" /> 
+                               <polyline color="#ffffff" width="126" /> 
+                       </item>
+                       <item type="street_2_city,street_2_land" order="7-8">
+                               <polyline color="#c0c0c0" width="3" /> 
+                               <polyline color="#ffff00" width="1" /> 
+                       </item>
+                       <item type="street_2_city,street_2_land" order="9">
+                               <polyline color="#c0c0c0" width="4" /> 
+                               <polyline color="#ffff00" width="2" /> 
+                       </item>
+                       <item type="street_2_city,street_2_land" order="10">
+                               <polyline color="#c0c0c0" width="6" /> 
+                               <polyline color="#ffff00" width="4" /> 
+                       </item>
+                       <item type="street_2_city,street_2_land" order="11">
+                               <polyline color="#c0c0c0" width="8" /> 
+                               <polyline color="#ffff00" width="6" /> 
+                       </item>
+                       <item type="street_2_city,street_2_land" order="12">
+                               <polyline color="#c0c0c0" width="12" /> 
+                               <polyline color="#ffff00" width="9" /> 
+                       </item>
+                       <item type="street_2_city,street_2_land" order="13">
+                               <polyline color="#c0c0c0" width="15" /> 
+                               <polyline color="#ffff00" width="11" /> 
+                       </item>
+                       <item type="street_2_city,street_2_land" order="14">
+                               <polyline color="#c0c0c0" width="18" /> 
+                               <polyline color="#ffff00" width="14" /> 
+                       </item>
+                       <item type="street_2_city,street_2_land" order="15">
+                               <polyline color="#c0c0c0" width="21" /> 
+                               <polyline color="#ffff00" width="17" /> 
+                       </item>
+                       <item type="street_2_city,street_2_land" order="16">
+                               <polyline color="#c0c0c0" width="35" /> 
+                               <polyline color="#ffff00" width="30" /> 
+                       </item>
+                       <item type="street_2_city,street_2_land" order="17">
+                               <polyline color="#c0c0c0" width="73" /> 
+                               <polyline color="#ffff00" width="67" /> 
+                       </item>
+                       <item type="street_2_city,street_2_land" order="18">
+                               <polyline color="#c0c0c0" width="144" /> 
+                               <polyline color="#ffff00" width="138" /> 
+                       </item>
+                       <item type="street_3_city,street_3_land,ramp,roundabout" order="7-8">
+                               <polyline color="#a0a0a0" width="3" /> 
+                               <polyline color="#ffff00" width="1" /> 
+                       </item>
+                       <item type="street_3_city,street_3_land,ramp,roundabout" order="9">
+                               <polyline color="#a0a0a0" width="5" /> 
+                               <polyline color="#ffff00" width="3" /> 
+                       </item>
+                       <item type="street_3_city,street_3_land,ramp,roundabout" order="10">
+                               <polyline color="#a0a0a0" width="8" /> 
+                               <polyline color="#ffff00" width="6" /> 
+                       </item>
+                       <item type="street_3_city,street_3_land,ramp,roundabout" order="11">
+                               <polyline color="#a0a0a0" width="9" /> 
+                               <polyline color="#ffff00" width="7" /> 
+                       </item>
+                       <item type="street_3_city,street_3_land,ramp,roundabout" order="12">
+                               <polyline color="#a0a0a0" width="13" /> 
+                               <polyline color="#ffff00" width="9" /> 
+                       </item>
+                       <item type="street_3_city,street_3_land,ramp,roundabout" order="13">
+                               <polyline color="#a0a0a0" width="18" /> 
+                               <polyline color="#ffff00" width="14" /> 
+                       </item>
+                       <item type="street_3_city,street_3_land,ramp,roundabout" order="14">
+                               <polyline color="#a0a0a0" width="21" /> 
+                               <polyline color="#ffff00" width="17" /> 
+                       </item>
+                       <item type="street_3_city,street_3_land,ramp,roundabout" order="15">
+                               <polyline color="#a0a0a0" width="25" /> 
+                               <polyline color="#ffff00" width="21" /> 
+                       </item>
+                       <item type="street_3_city,street_3_land,ramp,roundabout" order="16">
+                               <polyline color="#a0a0a0" width="40" /> 
+                               <polyline color="#ffff00" width="34" /> 
+                       </item>
+                       <item type="street_3_city,street_3_land,ramp,roundabout" order="17">
+                               <polyline color="#a0a0a0" width="79" /> 
+                               <polyline color="#ffff00" width="73" /> 
+                       </item>
+                       <item type="street_3_city,street_3_land,ramp,roundabout" order="18">
+                               <polyline color="#a0a0a0" width="156" /> 
+                               <polyline color="#ffff00" width="150" /> 
+                       </item>
+                       <item type="street_4_city,street_4_land,street_n_lanes" order="2-6">
+                               <polyline color="#404040" width="1" /> 
+                       </item>
+                       <item type="street_4_city,street_4_land,street_n_lanes" order="7-8">
+                               <polyline color="#404040" width="3" /> 
+                               <polyline color="#ff0000" width="1" /> 
+                       </item>
+                       <item type="street_4_city,street_4_land,street_n_lanes" order="9">
+                               <polyline color="#000000" width="5" /> 
+                               <polyline color="#ff0000" width="3" /> 
+                       </item>
+                       <item type="street_4_city,street_4_land,street_n_lanes" order="10">
+                               <polyline color="#000000" width="6" /> 
+                               <polyline color="#ff0000" width="4" /> 
+                       </item>
+                       <item type="street_4_city,street_4_land,street_n_lanes" order="11">
+                               <polyline color="#000000" width="9" /> 
+                               <polyline color="#ff0000" width="7" /> 
+                       </item>
+                       <item type="street_4_city,street_4_land,street_n_lanes" order="12">
+                               <polyline color="#000000" width="13" /> 
+                               <polyline color="#ff0000" width="9" /> 
+                       </item>
+                       <item type="street_4_city,street_4_land,street_n_lanes" order="13">
+                               <polyline color="#000000" width="18" /> 
+                               <polyline color="#ff0000" width="14" /> 
+                       </item>
+                       <item type="street_4_city,street_4_land,street_n_lanes" order="14">
+                               <polyline color="#000000" width="21" /> 
+                               <polyline color="#ff0000" width="17" /> 
+                       </item>
+                       <item type="street_4_city,street_4_land,street_n_lanes" order="15">
+                               <polyline color="#000000" width="24" /> 
+                               <polyline color="#ff0000" width="20" /> 
+                       </item>
+                       <item type="street_4_city,street_4_land,street_n_lanes" order="16">
+                               <polyline color="#000000" width="39" /> 
+                               <polyline color="#ff0000" width="33" /> 
+                       </item>
+                       <item type="street_4_city,street_4_land,street_n_lanes" order="17">
+                               <polyline color="#000000" width="78" /> 
+                               <polyline color="#ff0000" width="72" /> 
+                       </item>
+                       <item type="street_4_city,street_4_land,street_n_lanes" order="18">
+                               <polyline color="#000000" width="156" /> 
+                               <polyline color="#ff0000" width="150" /> 
+                       </item>
+                       <item type="highway_city,highway_land" order="2">
+                               <polyline color="#ff0000" width="1" /> 
+                       </item>
+                       <item type="highway_city,highway_land" order="3-5">
+                               <polyline color="#ff0000" width="3" /> 
+                               <polyline color="#ffff00" width="1" /> 
+                       </item>
+                       <item type="highway_city,highway_land" order="6">
+                               <polyline color="#ff0000" width="4" /> 
+                               <polyline color="#ffff00" width="2" /> 
+                       </item>
+                       <item type="highway_city,highway_land" order="7-8">
+                               <polyline color="#ff0000" width="7" /> 
+                               <polyline color="#ffff00" width="5" /> 
+                               <polyline color="#ff0000" width="1" /> 
+                       </item>
+                       <item type="highway_city,highway_land" order="9-10">
+                               <polyline color="#ff0000" width="9" /> 
+                               <polyline color="#ffff00" width="5" /> 
+                               <polyline color="#ff0000" width="1" /> 
+                       </item>
+                       <item type="highway_city,highway_land" order="11">
+                               <polyline color="#ff0000" width="13" /> 
+                               <polyline color="#ffff00" width="9" /> 
+                               <polyline color="#ff0000" width="1" /> 
+                       </item>
+                       <item type="highway_city,highway_land" order="12">
+                               <polyline color="#ff0000" width="15" /> 
+                               <polyline color="#ffff00" width="10" /> 
+                               <polyline color="#ff0000" width="1" /> 
+                       </item>
+                       <item type="highway_city,highway_land" order="13">
+                               <polyline color="#ff0000" width="25" /> 
+                               <polyline color="#ffff00" width="17" /> 
+                               <polyline color="#ff0000" width="1" /> 
+                       </item>
+                       <item type="highway_city,highway_land" order="14">
+                               <polyline color="#ff0000" width="31" /> 
+                               <polyline color="#ffff00" width="24" /> 
+                               <polyline color="#ff0000" width="1" /> 
+                       </item>
+                       <item type="highway_city,highway_land" order="15">
+                               <polyline color="#ff0000" width="33" /> 
+                               <polyline color="#ffff00" width="27" /> 
+                               <polyline color="#ff0000" width="1" /> 
+                       </item>
+                       <item type="highway_city,highway_land" order="16">
+                               <polyline color="#ff0000" width="65" /> 
+                               <polyline color="#ffff00" width="59" /> 
+                               <polyline color="#ff0000" width="1" /> 
+                       </item>
+                       <item type="highway_city,highway_land" order="17">
+                               <polyline color="#ff0000" width="133" /> 
+                               <polyline color="#ffff00" width="127" /> 
+                               <polyline color="#ff0000" width="1" /> 
+                       </item>
+                       <item type="highway_city,highway_land" order="18">
+                               <polyline color="#ff0000" width="264" /> 
+                               <polyline color="#ffff00" width="258" /> 
+                               <polyline color="#ff0000" width="1" /> 
+                       </item>
+                       <item type="street_unkn" order="0-">
+                               <polyline color="#8080ff" width="3" /> 
+                       </item>
+                       <item type="highway_exit_label" order="10-">
+                               <circle color="#000000" radius="3" label_size="7" />
+                       </item>
+                       <item type="highway_city,highway_land,street_4_city,street_4_land,street_n_lanes" order="10-18">
+                               <label label_size="8" />
+                       </item>
+                       <item type="street_2_city,street_2_land,street_3_city,street_3_land,ramp" order="11-18">
+                               <label label_size="9" />
+                       </item>
+                       <item type="street_nopass,street_0,street_1_city,street_1_land" order="12-18">
+                               <label label_size="9" />
+                       </item>
+                       <item type="aeroway_taxiway" order="10">
+                               <polyline color="#989994" width="4" />
+                               <polyline color="#d3dbbc" width="2" />
+                       </item>
+                       <item type="aeroway_taxiway" order="11">
+                               <polyline color="#989994" width="6" />
+                               <polyline color="#d3dbbc" width="4" />
+                       </item>
+                       <item type="aeroway_taxiway" order="12">
+                               <polyline color="#989994" width="10" />
+                               <polyline color="#d3dbbc" width="8" />
+                       </item>
+                       <item type="aeroway_taxiway" order="13">
+                               <polyline color="#989994" width="12" />
+                               <polyline color="#d3dbbc" width="9" />
+                       </item>
+                       <item type="aeroway_taxiway" order="14">
+                               <polyline color="#989994" width="15" />
+                               <polyline color="#d3dbbc" width="13" />
+                       </item>
+                       <item type="aeroway_taxiway" order="15">
+                               <polyline color="#989994" width="17" />
+                               <polyline color="#d3dbbc" width="14" />
+                       </item>
+                       <item type="aeroway_taxiway" order="16">
+                               <polyline color="#989994" width="33" />
+                               <polyline color="#d3dbbc" width="26" />
+                       </item>
+                       <item type="aeroway_taxiway" order="17">
+                               <polyline color="#989994" width="69" />
+                               <polyline color="#d3dbbc" width="61" />
+                       </item>
+                       <item type="aeroway_taxiway" order="18">
+                               <polyline color="#989994" width="132" />
+                               <polyline color="#d3dbbc" width="126" />
+                       </item>
+                       <item type="aeroway_runway" order="2-6">
+                               <polyline color="#404040" width="1" />
+                       </item>
+                       <item type="aeroway_runway" order="7-8">
+                               <polyline color="#404040" width="3" />
+                               <polyline color="#d3dbbc" width="1" />
+                       </item>
+                       <item type="aeroway_runway" order="9">
+                               <polyline color="#6b6f5f" width="5" />
+                               <polyline color="#d3dbbc" width="3" />
+                       </item>
+                       <item type="aeroway_runway" order="10">
+                               <polyline color="#6b6f5f" width="6" />
+                               <polyline color="#d3dbbc" width="4" />
+                       </item>
+                       <item type="aeroway_runway" order="11">
+                               <polyline color="#6b6f5f" width="9" />
+                               <polyline color="#d3dbbc" width="7" />
+                       </item>
+                       <item type="aeroway_runway" order="12">
+                               <polyline color="#6b6f5f" width="13" />
+                               <polyline color="#d3dbbc" width="9" />
+                       </item>
+                       <item type="aeroway_runway" order="13">
+                               <polyline color="#6b6f5f" width="18" />
+                               <polyline color="#d3dbbc" width="14" />
+                       </item>
+                       <item type="aeroway_runway" order="14">
+                               <polyline color="#6b6f5f" width="21" />
+                               <polyline color="#d3dbbc" width="17" />
+                       </item>
+                       <item type="aeroway_runway" order="15">
+                               <polyline color="#6b6f5f" width="24" />
+                               <polyline color="#d3dbbc" width="20" />
+                       </item>
+                       <item type="aeroway_runway" order="16">
+                               <polyline color="#6b6f5f" width="39" />
+                               <polyline color="#d3dbbc" width="33" />
+                       </item>
+                       <item type="aeroway_runway" order="17">
+                               <polyline color="#6b6f5f" width="78" />
+                               <polyline color="#d3dbbc" width="72" />
+                       </item>
+                       <item type="aeroway_runway" order="18">
+                               <polyline color="#6b6f5f" width="156" />
+                               <polyline color="#d3dbbc" width="150" />
+                       </item>
+                       
+                       
+                       <item type="rail" order="6-9">
+                               <polyline color="#696969" width="4" />
+                               <polyline color="#FFFFFF" dash="2,5" width="2" />
+                       </item>
+                       <item type="rail_narrow_gauge" order="6-9">
+                               <polyline color="#696969" width="4" />
+                               <polyline color="#FFFFFF" dash="2,5" width="2" />
+                       </item>
+                       
+                       <item type="rail" order="10-13">
+                               <polyline color="#696969" width="6" />
+                               <polyline color="#FFFFFF" dash="3,8" width="3" />
+                       </item>
+                       <item type="rail_narrow_gauge" order="10-13">
+                               <polyline color="#696969" width="6" />
+                               <polyline color="#FFFFFF" dash="3,8" width="3" />
+                       </item>
+                       
+                       <item type="rail" order="14-18">
+                               <polyline color="#696969" width="8" />
+                               <polyline color="#FFFFFF" dash="4,12" width="5" />
+                       </item>
+                       <item type="rail_narrow_gauge" order="14-18">
+                               <polyline color="#696969" width="8" />
+                               <polyline color="#FFFFFF" dash="4,12" width="5" />
+                       </item>
+                       
+                       <item type="rail_light" order="10-13">
+                               <polyline color="#696969" width="4" />
+                               <polyline color="#FFFFFF" dash="2,5" width="2" />
+                       </item>
+                       
+                       <item type="rail_light" order="14-18">
+                               <polyline color="#696969" width="6" />
+                               <polyline color="#FFFFFF" dash="4,8" width="4" />
+                       </item>
+                       
+                       <item type="rail_subway" order="8-">
+                               <polyline color="#696969" width="2" />
+                               <polyline color="#FFFFFF" dash="5,5" width="2" />
+                       </item>
+                       <item type="rail_mono" order="10-">
+                               <polyline color="#696969" width="2" />
+                       </item>
+                       <item type="rail_tram,bus_guideway" order="10-">
+                               <polyline color="#696969" width="2" />
+                       </item>
+                       <item type="rail_preserved" order="10-">
+                               <polyline color="#696969" width="1" dash="7" />
+                       </item>
+                       <item type="rail_disused" order="12-">
+                               <polyline color="#d3d3d3" width="1" dash="10" />
+                       </item>
+                       <item type="rail_abandoned" order="12-">
+                               <polyline color="#f5f5f5" width="1" dash="10" />
+                       </item>
+                       <item type="lift_cable_car" order="6-">
+                               <polyline color="#696969" width="1" dash="5" />
+                       </item>
+                       <item type="lift_chair" order="6-">
+                               <polyline color="#696969" width="1" dash="5" />
+                       </item>
+                       <item type="lift_drag" order="6-">
+                               <polyline color="#696969" width="1" dash="5" />
+                       </item>
+                       <item type="ferry" order="5-">
+                               <polyline color="#000000" width="3" dash="5" /> 
+                       </item>
+                       <item type="town_label,district_label,town_label_0e0,town_label_1e0,town_label_2e0,town_label_5e0,town_label_1e1,town_label_2e1,town_label_5e1,town_label_1e2,town_label_2e2,town_label_5e2,district_label_0e0,district_label_1e0,district_label_2e0,district_label_5e0,district_label_1e1,district_label_2e1,district_label_5e1,district_label_1e2,district_label_2e2,district_label_5e2" order="12-">
+                               <circle color="#000000" radius="3" label_size="7" />
+                       </item>
+                       <item type="district_label_1e3,district_label_2e3,district_label_5e3" order="11-">
+                               <circle color="#000000" radius="3" label_size="7" />
+                       </item>
+                       <item type="town_label_1e3,town_label_2e3,town_label_5e3" order="10-">
+                               <circle color="#000000" radius="3" label_size="7" />
+                       </item>
+                       <item type="district_label_1e4,district_label_2e4,district_label_5e4" order="9-">
+                               <circle color="#000000" radius="3" label_size="7" />
+                       </item>
+                       <item type="town_label_1e4,town_label_2e4,town_label_5e4" order="8-">
+                               <circle color="#000000" radius="3" label_size="7" />
+                       </item>
+                       <item type="district_label_1e5,district_label_2e5,district_label_5e5" order="6-">
+                               <circle color="#000000" radius="3" label_size="10" />
+                       </item>
+                       <item type="town_label_1e5,town_label_2e5,town_label_5e5" order="4-">
+                               <circle color="#000000" radius="3" label_size="10" />
+                       </item>
+                       <item type="district_label_1e6,district_label_2e6,district_label_5e6" order="3-">
+                               <circle color="#000000" radius="3" label_size="15" />
+                       </item>
+                       <item type="town_label_1e6,town_label_2e6,town_label_5e6" order="2-">
+                               <circle color="#000000" radius="3" label_size="15" />
+                       </item>
+                       <item type="town_label_1e7,district_label_1e7" order="1-">
+                               <circle color="#000000" radius="3" label_size="15" />
+                       </item>
+                       <item type="track" order="3-">
+                               <polyline color="#3f3f3f" width="1" />
+                       </item>
+               </layer>
+               <xi:include xpointer="xpointer(/config/navit/layout[@name='Car']/layer[@name='points'])" />
+       </layout>
        <layout name="T@H">
                <layer name="sea" details="0">
                        
index d69adde..cf9e486 100644 (file)
@@ -2,6 +2,7 @@
 #include <glib/gprintf.h>
 #include <string.h>
 #include "debug.h"
+#include "file.h"
 #include "coord.h"
 #include "layout.h"
 #include "mapset.h"
 #include "xmlconfig.h"
 #include "config.h"
 
+struct xistate {
+       struct xistate *parent;
+       struct xistate *child;
+       const gchar *element;
+       gchar **attribute_names;
+       gchar **attribute_values;
+};
+
+struct xmldocument {
+       const gchar *href;
+       const gchar *xpointer;  
+       gpointer user_data;
+       struct xistate *first;
+       struct xistate *last;
+       int active;
+       int level;
+};
 
 struct xmlstate {
        const gchar **attribute_names;
@@ -31,7 +49,9 @@ struct xmlstate {
        const gchar *element;
        GError **error;
        struct element_func *func;
-} *xmlstate_root;
+       struct xmldocument *document;
+};
+
 
 
 static struct attr ** convert_to_attrs(struct xmlstate *state)
@@ -141,7 +161,10 @@ find_boolean(struct xmlstate *state, const char *attribute, int deflt, int requi
 static int
 convert_number(const char *val)
 {
-       return g_ascii_strtoull(val,NULL,0);
+       if (val)
+               return g_ascii_strtoull(val,NULL,0);
+       else
+               return 0;
 }
 
 static int
@@ -644,7 +667,7 @@ struct element_func {
 };
 
 static void
-start_element (GMarkupParseContext *context,
+start_element(GMarkupParseContext *context,
                const gchar         *element_name,
                const gchar        **attribute_names,
                const gchar        **attribute_values,
@@ -655,8 +678,9 @@ start_element (GMarkupParseContext *context,
        struct element_func *e=elements,*func=NULL;
        int found=0;
        const char *parent_name=NULL;
-       char *s,*sep="",*possible_parents=g_strdup("");
-       dbg(2,"name='%s'\n", element_name);
+       char *s,*sep="",*possible_parents;
+       dbg(2,"name='%s' parent='%s'\n", element_name, *parent ? (*parent)->element:NULL);
+       possible_parents=g_strdup("");
        if (*parent)
                parent_name=(*parent)->element;
        while (e->name) {
@@ -717,23 +741,6 @@ start_element (GMarkupParseContext *context,
                        new->parent->func->add_attr(new->parent->element_attr.u.data, &new->element_attr);
        }
        return;
-#if 0
-       struct elem_data *data = user_data;
-       void *elem=NULL;
-       void *parent_object;
-       char *parent_token;
-       parent_object=data->elem_stack ? data->elem_stack->data : NULL;
-       parent_token=data->token_stack ? data->token_stack->data : NULL;
-
-       /* g_printf("start_element: %s AN: %s AV: %s\n",element_name,*attribute_names,*attribute_values); */
-
-
-       printf("Unknown element '%s'\n", element_name);
-#if 0
-       data->elem_stack = g_list_prepend(data->elem_stack, elem);
-       data->token_stack = g_list_prepend(data->token_stack, (gpointer)element_name);
-#endif
-#endif
 }
 
 
@@ -754,53 +761,284 @@ end_element (GMarkupParseContext *context,
        g_free(curr);
 }
 
+static gboolean parse_file(struct xmldocument *document, GError **error);
+
+static void
+xinclude(GMarkupParseContext *context, const gchar **attribute_names, const gchar **attribute_values, struct xmldocument *doc_old, GError **error)
+{
+       struct xmldocument doc_new;
+       struct file_wordexp *we;
+       int i,count;
+       const char *href=NULL;
+       char **we_files;
+
+       if (doc_old->level >= 16) {
+               g_set_error(error,G_MARKUP_ERROR,G_MARKUP_ERROR_INVALID_CONTENT, "xi:include recursion too deep");
+               return;
+       }
+       memset(&doc_new, 0, sizeof(doc_new));
+       i=0;
+       while (attribute_names[i]) {
+               if(!g_ascii_strcasecmp("href", attribute_names[i])) {
+                       if (!href) 
+                               href=attribute_values[i];
+                       else {
+                               g_set_error(error,G_MARKUP_ERROR,G_MARKUP_ERROR_INVALID_CONTENT, "xi:include has more than one href");
+                               return;
+                       }
+               } else if(!g_ascii_strcasecmp("xpointer", attribute_names[i])) {
+                       if (!doc_new.xpointer) 
+                               doc_new.xpointer=attribute_values[i];
+                       else {
+                               g_set_error(error,G_MARKUP_ERROR,G_MARKUP_ERROR_INVALID_CONTENT, "xi:include has more than one xpointer");
+                               return;
+                       }
+               } else {
+                       g_set_error(error,G_MARKUP_ERROR,G_MARKUP_ERROR_INVALID_CONTENT, "xi:include has invalid attributes");
+                       return;
+               }
+               i++;
+       }
+       if (!doc_new.xpointer && !href) {
+               g_set_error(error,G_MARKUP_ERROR,G_MARKUP_ERROR_INVALID_CONTENT, "xi:include has neither href nor xpointer");
+               return;
+       }
+       doc_new.level=doc_old->level+1;
+       doc_new.user_data=doc_old->user_data;
+       if (! href) {
+               doc_new.href=doc_old->href;
+               parse_file(&doc_new, error);
+       } else {
+               we=file_wordexp_new(href);
+               we_files=file_wordexp_get_array(we);
+               count=file_wordexp_get_count(we);
+               for (i = 0 ; i < count ; i++) {
+                       doc_new.href=we_files[i];
+                       parse_file(&doc_new, error);
+               }
+               file_wordexp_destroy(we);       
+               
+       }
+       
+}
+static int
+strncmp_len(const char *s1, int s1len, const char *s2)
+{
+       int ret;
+#if 0
+       char c[s1len+1];
+       strncpy(c, s1, s1len);
+       c[s1len]='\0';
+       dbg(0,"'%s' vs '%s'\n", c, s2);
+#endif
+
+       ret=strncmp(s1, s2, s1len);
+       if (ret)
+               return ret;
+       return strlen(s2)-s1len;
+}
+
+static int
+xpointer_test(const char *test, int len, struct xistate *elem)
+{
+       int eq,i;
+       char c;
+       char *name_equal="name(.)=";
+       char *name_not_equal="name(.)!=";
+
+       if (!len)
+               return 0;
+       c=test[len-1];
+       if (c != '\'' && c != '"')
+               return 0;
+       eq=strcspn(test, "=");
+       if (eq >= len || test[eq+1] != c)
+               return 0;
+       if (test[0] == '@') {
+               i=0;
+               while (elem->attribute_names[i]) {
+                       if (!strncmp_len(test+1,eq-1,elem->attribute_names[i]) && !strncmp_len(test+eq+2,len-eq-3, elem->attribute_values[i])) {
+                               return 1;
+                       }
+                       i++;
+               }
+       }
+       if (!strncmp(test,name_equal,strlen(name_equal)) && len > strlen(name_equal)) {
+               if (!strncmp_len(test+eq+2,len-eq-3, elem->element))
+                       return 1;
+       }
+       if (!strncmp(test,name_not_equal,strlen(name_not_equal)) && len > strlen(name_not_equal)) {
+               if (strncmp_len(test+eq+2,len-eq-3, elem->element))
+                       return 1;
+       }
+       return 0;
+}
+
+static int
+xpointer_element_match(const char *xpointer, int len, struct xistate *elem)
+{
+       int len_test;
+       len_test=strcspn(xpointer, "[");
+       if (len_test > len)
+               len_test=len;
+       if (strncmp_len(xpointer, len_test, elem->element) && (len_test != 1 || xpointer[0] != '*'))
+               return 0;
+       if (len_test == len)
+               return 1;
+       if (xpointer[len-1] != ']')
+               return 0;
+       return xpointer_test(xpointer+len_test+1, len-len_test-2, elem);
+}
+
+static int
+xpointer_xpointer_match(const char *xpointer, int len, struct xistate *first)
+{
+       const char *c;
+       int s;
+       dbg(2,"%s\n", xpointer);
+       if (xpointer[0] != '/')
+               return 0;
+       c=xpointer+1;
+       len--;
+       do {
+               s=strcspn(c, "/");
+               if (s > len)
+                       s=len;
+               if (! xpointer_element_match(c, s, first))
+                       return 0;
+               first=first->child;
+               c+=s+1;
+               len-=s+1;
+       } while (s < len && first);
+       if (s < len)
+               return 0;
+       return 1;
+}
+
+static int
+xpointer_match(const char *xpointer, struct xistate *first)
+{
+       char *prefix="xpointer(";
+       int len=strlen(xpointer);
+       if (! xpointer)
+               return 1;
+       if (strncmp(xpointer,prefix,strlen(prefix)))
+               return 0;
+       if (xpointer[len-1] != ')')
+               return 0;
+       return xpointer_xpointer_match(xpointer+strlen(prefix), len-strlen(prefix)-1, first);
+
+}
+
+static void
+xi_start_element(GMarkupParseContext *context,
+               const gchar         *element_name,
+               const gchar        **attribute_names,
+               const gchar        **attribute_values,
+               gpointer             user_data,
+               GError             **error)
+{
+       struct xmldocument *doc=user_data;
+       struct xistate *xistate;
+       int i,count=0;
+       while (attribute_names[count++]);
+       xistate=g_new0(struct xistate, 1);
+       xistate->element=element_name;
+       xistate->attribute_names=g_new(char *, count);
+       xistate->attribute_values=g_new(char *, count);
+       for (i = 0 ; i < count ; i++) {
+               xistate->attribute_names[i]=g_strdup(attribute_names[i]);
+               xistate->attribute_values[i]=g_strdup(attribute_values[i]);
+       }
+       xistate->parent=doc->last;
+       
+       if (doc->last) {
+               doc->last->child=xistate;
+       } else
+               doc->first=xistate;
+       doc->last=xistate;
+       if (doc->active > 0 || xpointer_match(doc->xpointer, doc->first)) {
+               if(!g_ascii_strcasecmp("xi:include", element_name)) {
+                       xinclude(context, attribute_names, attribute_values, doc, error);
+                       return;
+               }
+               start_element(context, element_name, attribute_names, attribute_values, doc->user_data, error);
+               doc->active++;
+       }
+               
+}
+
+static void
+xi_end_element (GMarkupParseContext *context,
+               const gchar         *element_name,
+               gpointer             user_data,
+               GError             **error)
+{
+       struct xmldocument *doc=user_data;
+       struct xistate *xistate=doc->last;
+       int i=0;
+       doc->last=doc->last->parent;
+       if (! doc->last)
+               doc->first=NULL;
+       else
+               doc->last->child=NULL;
+       if (doc->active > 0) {
+               if(!g_ascii_strcasecmp("xi:include", element_name)) {
+                       return;
+               }
+               end_element(context, element_name, doc->user_data, error);
+               doc->active--;
+       }
+       while (xistate->attribute_names[i]) {
+               g_free(xistate->attribute_names[i]);
+               g_free(xistate->attribute_values[i]);
+               i++;
+       }
+       g_free(xistate->attribute_names);
+       g_free(xistate->attribute_values);
+       g_free(xistate);
+}
 
 /* Called for character data */
 /* text is not nul-terminated */
 static void
-text (GMarkupParseContext *context,
+xi_text (GMarkupParseContext *context,
                const gchar            *text,
                gsize                   text_len,
                gpointer                user_data,
                GError               **error)
 {
-       struct xmlstate **state = user_data;
-
-       (void) state;
 }
 
 
 
 static const GMarkupParser parser = {
-       start_element,
-       end_element,
-       text,
+       xi_start_element,
+       xi_end_element,
+       xi_text,
        NULL,
        NULL
 };
 
-gboolean config_load(char *filename, GError **error)
+static gboolean
+parse_file(struct xmldocument *document, GError **error)
 {
        GMarkupParseContext *context;
-       char *contents;
+       gchar *contents, *message;
        gsize len;
+       gint line, chr;
        gboolean result;
-       gint line;
-       gint chr;
-       gchar *message;
 
-       struct xmlstate *curr=NULL;
-       
-       context = g_markup_parse_context_new (&parser, 0, &curr, NULL);
+       context = g_markup_parse_context_new (&parser, 0, document, NULL);
 
-       if (!g_file_get_contents (filename, &contents, &len, error))
+       if (!g_file_get_contents (document->href, &contents, &len, error)) {
+               g_markup_parse_context_free (context);
                return FALSE;
-
-       result = g_markup_parse_context_parse (context, contents, len, error);
-       if (result && curr) {
-               g_set_error(error,G_MARKUP_ERROR,G_MARKUP_ERROR_PARSE, "element '%s' not closed", curr->element);
-               result=FALSE;   
        }
+       document->active=document->xpointer ? 0:1;
+       document->first=NULL;
+       document->last=NULL;
+       result = g_markup_parse_context_parse (context, contents, len, error);
        if (!result && error && *error) {
                g_markup_parse_context_get_position(context, &line, &chr);
                message=g_strdup_printf("%s at line %d, char %d\n", (*error)->message, line, chr);
@@ -813,3 +1051,20 @@ gboolean config_load(char *filename, GError **error)
        return result;
 }
 
+gboolean config_load(char *filename, GError **error)
+{
+       struct xmldocument document;
+       struct xmlstate *curr=NULL;
+       gboolean result;
+
+       memset(&document, 0, sizeof(document));
+       document.href=filename;
+       document.user_data=&curr;
+       result=parse_file(&document, error);
+       if (result && curr) {
+               g_set_error(error,G_MARKUP_ERROR,G_MARKUP_ERROR_PARSE, "element '%s' not closed", curr->element);
+               result=FALSE;
+       }
+       return result;
+}
+