summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Danielsson <jonas@threetimestwo.org>2014-04-15 12:42:01 +0200
committerJonas Danielsson <jonas@threetimestwo.org>2015-12-28 10:35:55 +0100
commit8686681429b437042e73d70a960208a1965c6dba (patch)
tree2738198b8758259376ef0ef86d34e876f26f48ec
parent0fa8247eae9bb122ae6edd9d437b2820e8525102 (diff)
downloadgeocode-glib-8686681429b437042e73d70a960208a1965c6dba.tar.gz
Add light rail station place type
This type will also include tram stops. https://bugzilla.gnome.org/show_bug.cgi?id=728241
-rw-r--r--geocode-glib/geocode-forward.c2
-rw-r--r--geocode-glib/geocode-place.c4
-rw-r--r--geocode-glib/geocode-place.h4
-rw-r--r--icons/Makefile.am3
-rw-r--r--icons/maki/scalable_places_poi-light-rail-station.svg148
5 files changed, 159 insertions, 2 deletions
diff --git a/geocode-glib/geocode-forward.c b/geocode-glib/geocode-forward.c
index d5c80f7..99b7d24 100644
--- a/geocode-glib/geocode-forward.c
+++ b/geocode-glib/geocode-forward.c
@@ -738,6 +738,8 @@ get_place_type_from_attributes (GHashTable *ht)
if (g_strcmp0 (type, "station") == 0 ||
g_strcmp0 (type, "halt") == 0)
place_type = GEOCODE_PLACE_TYPE_RAILWAY_STATION;
+ else if (g_strcmp0 (type, "tram_stop") == 0)
+ place_type = GEOCODE_PLACE_TYPE_LIGHT_RAIL_STATION;
} else if (g_strcmp0 (category, "waterway") == 0) {
place_type = GEOCODE_PLACE_TYPE_DRAINAGE;
} else if (g_strcmp0 (category, "boundary") == 0) {
diff --git a/geocode-glib/geocode-place.c b/geocode-glib/geocode-place.c
index 7166e81..70a40df 100644
--- a/geocode-glib/geocode-place.c
+++ b/geocode-glib/geocode-place.c
@@ -1169,6 +1169,10 @@ get_icon_name (GeocodePlace *place)
icon_name = "poi-bar";
break;
+ case GEOCODE_PLACE_TYPE_LIGHT_RAIL_STATION:
+ icon_name = "poi-light-rail-station";
+ break;
+
default:
icon_name = "poi-marker"; /* generic marker */
break;
diff --git a/geocode-glib/geocode-place.h b/geocode-glib/geocode-place.h
index f25c03d..b71a82c 100644
--- a/geocode-glib/geocode-place.h
+++ b/geocode-glib/geocode-place.h
@@ -101,6 +101,7 @@ struct _GeocodePlaceClass {
* @GEOCODE_PLACE_TYPE_PLACE_OF_WORSHIP: All places of worship independently of the religion or denomination.
* @GEOCODE_PLACE_TYPE_RESTAURANT: Generally formal place with sit-down facilities selling full meals served by waiters.
* @GEOCODE_PLACE_TYPE_BAR: A bar or pub.
+ * @GEOCODE_PLACE_TYPE_LIGHT_RAIL_STATION: A light rail station or tram stop.
*
* Type of the place.
*/
@@ -138,7 +139,8 @@ typedef enum {
GEOCODE_PLACE_TYPE_SCHOOL,
GEOCODE_PLACE_TYPE_PLACE_OF_WORSHIP,
GEOCODE_PLACE_TYPE_RESTAURANT,
- GEOCODE_PLACE_TYPE_BAR
+ GEOCODE_PLACE_TYPE_BAR,
+ GEOCODE_PLACE_TYPE_LIGHT_RAIL_STATION
} GeocodePlaceType;
diff --git a/icons/Makefile.am b/icons/Makefile.am
index 6d78068..408c28b 100644
--- a/icons/Makefile.am
+++ b/icons/Makefile.am
@@ -10,7 +10,8 @@ public_icons = \
scalable_places_poi-place-of-worship.svg \
scalable_places_poi-restaurant.svg \
scalable_places_poi-bar.svg \
- scalable_places_poi-airport.svg
+ scalable_places_poi-airport.svg \
+ scalable_places_poi-light-rail-station.svg
gtk_update_icon_cache = gtk-update-icon-cache -f -t
diff --git a/icons/maki/scalable_places_poi-light-rail-station.svg b/icons/maki/scalable_places_poi-light-rail-station.svg
new file mode 100644
index 0000000..b9f899f
--- /dev/null
+++ b/icons/maki/scalable_places_poi-light-rail-station.svg
@@ -0,0 +1,148 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="24"
+ height="24"
+ id="svg4460"
+ version="1.1"
+ inkscape:version="0.48.2 r9819"
+ sodipodi:docname="rail-light-24.svg">
+ <defs
+ id="defs4462" />
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="22.627417"
+ inkscape:cx="9.256576"
+ inkscape:cy="12.153836"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="true"
+ showguides="true"
+ inkscape:guide-bbox="true"
+ inkscape:window-width="1558"
+ inkscape:window-height="925"
+ inkscape:window-x="105"
+ inkscape:window-y="0"
+ inkscape:window-maximized="0">
+ <inkscape:grid
+ type="xygrid"
+ id="grid4468"
+ empspacing="2"
+ visible="true"
+ enabled="true"
+ snapvisiblegridlinesonly="true"
+ color="#ff00ff"
+ opacity="0.1254902"
+ empcolor="#ff00ff"
+ empopacity="0.25098039" />
+ <sodipodi:guide
+ orientation="1,0"
+ position="0,20"
+ id="guide4470" />
+ <sodipodi:guide
+ orientation="0,1"
+ position="4,24"
+ id="guide4472" />
+ <sodipodi:guide
+ orientation="1,0"
+ position="24,13"
+ id="guide4474" />
+ <sodipodi:guide
+ orientation="0,1"
+ position="15,0"
+ id="guide4476" />
+ <sodipodi:guide
+ orientation="1,0"
+ position="23,20"
+ id="guide4478" />
+ <sodipodi:guide
+ orientation="0,1"
+ position="-20,24"
+ id="guide4480" />
+ <sodipodi:guide
+ orientation="1,0"
+ position="2,5"
+ id="guide4482" />
+ <sodipodi:guide
+ orientation="0,1"
+ position="7,2"
+ id="guide4484" />
+ <sodipodi:guide
+ orientation="1,0"
+ position="12.5,11.5"
+ id="guide4486" />
+ <sodipodi:guide
+ orientation="0,1"
+ position="16,13"
+ id="guide4490" />
+ <sodipodi:guide
+ orientation="1,0"
+ position="3,13.5"
+ id="guide3012" />
+ <sodipodi:guide
+ orientation="0,1"
+ position="6.5,22"
+ id="guide3014" />
+ <sodipodi:guide
+ orientation="1,0"
+ position="22,18"
+ id="guide3016" />
+ <sodipodi:guide
+ orientation="0,1"
+ position="13.5,3"
+ id="guide3018" />
+ </sodipodi:namedview>
+ <metadata
+ id="metadata4465">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(0,-1028.3622)">
+ <path
+ style="font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;baseline-shift:baseline;color:#000000;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:2;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Sans;-inkscape-font-specification:Sans;opacity:0.3"
+ d="M 12.5 1 C 8.4112783 1 5 4.1008 5 8 L 5 16 C 5 17.0907 5.9092972 18 7 18 L 7.5625 18 L 5.28125 20.28125 C 4.7068834 20.83665 5.201277 22.0188 6 22 L 10 22 C 10.335757 22 10.665381 21.81575 10.84375 21.53125 L 12.5 19.0625 L 14.15625 21.53125 C 14.334619 21.81575 14.664243 21.9988 15 22 L 19 22 C 19.798723 22.019 20.293117 20.83665 19.71875 20.28125 L 17.4375 18 L 18 18 C 19.090703 18 20 17.0907 20 16 L 20 8 C 20 4.1008 16.588721 1 12.5 1 z M 11 5.53125 L 11 9 L 9 9 L 9 8 C 9 6.8778 9.862402 6.03275 11 5.53125 z M 14 5.53125 C 15.137598 6.03275 16 6.8778 16 8 L 16 9 L 14 9 L 14 5.53125 z "
+ transform="translate(0,1028.3622)"
+ id="path4064" />
+ <path
+ style="fill:#444444;fill-opacity:1;stroke:none"
+ d="M 12.5 2 C 8.9101492 2 6 4.686308 6 8 L 6 16 C 6 16.554 6.446 17 7 17 L 18 17 C 18.554 17 19 16.554 19 16 L 19 8 C 19 4.686308 16.08985 2 12.5 2 z M 12 4.0625 L 12 10 L 8 10 L 8 8 C 8 5.9435518 9.753915 4.2868455 12 4.0625 z M 13 4.0625 C 15.246085 4.2868455 17 5.9435518 17 8 L 17 10 L 13 10 L 13 4.0625 z M 9 13 C 9.5522847 13 10 13.447715 10 14 C 10 14.552285 9.5522847 15 9 15 C 8.4477153 15 8 14.552285 8 14 C 8 13.447715 8.4477153 13 9 13 z M 16 13 C 16.552285 13 17 13.447715 17 14 C 17 14.552285 16.552285 15 16 15 C 15.447715 15 15 14.552285 15 14 C 15 13.447715 15.447715 13 16 13 z "
+ transform="translate(0,1028.3622)"
+ id="rect3109" />
+ <path
+ sodipodi:nodetypes="ccccc"
+ inkscape:connector-curvature="0"
+ id="path3067-4"
+ d="m 11.999997,1046.3622 -2.999997,0 -3,3 3.999997,0 z"
+ style="fill:#444444;fill-opacity:1;stroke:none" />
+ <path
+ style="fill:#444444;fill-opacity:1;stroke:none"
+ d="m 12.999997,1046.3622 3.000003,0 2.999997,3 -4,0 z"
+ id="path3069-8"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="ccccc" />
+ </g>
+</svg>