From 5910b4fbb74d3b2ca9bf1aa4bdcf9c891077010c Mon Sep 17 00:00:00 2001 From: Rob Norris Date: Fri, 3 May 2013 00:27:29 +0100 Subject: [PATCH] Add support for acquiring OpenStreetMap Notes as GPX files. --- doc/examples/datasources.xml | 8 ++++++++ src/osm.c | 4 ++++ 2 files changed, 12 insertions(+) diff --git a/doc/examples/datasources.xml b/doc/examples/datasources.xml index 4a5d727f..061c8c90 100644 --- a/doc/examples/datasources.xml +++ b/doc/examples/datasources.xml @@ -17,6 +17,14 @@ http://openstreetbugs.schokokeks.org/api/0.1/getGPX?l=%s&r=%s&b=%s&t=%s&open=only_open_bugs + + + + OpenStreetMap Notes + LBRT + + http://api.openstreetmap.org/api/0.6/notes.gpx?bbox=%s,%s,%s,%s&closed=0 + PostBoxes AO diff --git a/src/osm.c b/src/osm.c index 5e84da25..5ca90f32 100644 --- a/src/osm.c +++ b/src/osm.c @@ -143,6 +143,10 @@ void osm_init () { // since it won't know about such a GObject type existing! // (in fact this is a problem in the vikgobjectbuilder -> g_markup_parse_context_parse -> _start_element -> g_type_from_name ) VikWebtoolDatasource *vwtds = NULL; + vwtds = vik_webtool_datasource_new_with_members ( _("OpenStreetMap Notes"), "http://api.openstreetmap.org/api/0.6/notes.gpx?bbox=%s,%s,%s,%s&closed=0", "LBRT", NULL ); + vik_ext_tool_datasources_register ( VIK_EXT_TOOL ( vwtds ) ); + g_object_unref ( vwtds ); + vwtds = vik_webtool_datasource_new_with_members ( _("OpenStreetBugs"), "http://openstreetbugs.schokokeks.org/api/0.1/getGPX?l=%s&r=%s&b=%s&t=%s&open=only_open_bugs", "LRBT", NULL ); vik_ext_tool_datasources_register ( VIK_EXT_TOOL ( vwtds ) ); g_object_unref ( vwtds ); -- 2.39.5