* Copyright (C) 2007, Quy Tonthat <qtonthat@gmail.com>
* Copyright (C) 2008, Hein Ragas <viking@ragas.nl>
* Copyright (C) 2009, Tal B <tal.bav@gmail.com>
- * Copyright (c) 2012, Rob Norris <rw_norris@hotmail.com>
+ * Copyright (c) 2012-2014, Rob Norris <rw_norris@hotmail.com>
*
* Some of the code adapted from GPSBabel 1.2.7
* http://gpsbabel.sf.net/
tt_wpt_ele,
tt_wpt_sym,
tt_wpt_time,
+ tt_wpt_url,
tt_wpt_link, /* New in GPX 1.1 */
tt_trk,
{ tt_wpt_desc, "/gpx/wpt/desc" },
{ tt_wpt_sym, "/gpx/wpt/sym" },
{ tt_wpt_sym, "/loc/waypoint/type" },
+ { tt_wpt_url, "/gpx/wpt/url" },
{ tt_wpt_link, "/gpx/wpt/link" }, /* GPX 1.1 */
{ tt_trk, "/gpx/trk" },
case tt_wpt_name:
case tt_wpt_ele:
case tt_wpt_time:
+ case tt_wpt_url:
case tt_wpt_link:
case tt_trk_cmt:
case tt_trk_desc:
g_string_erase ( c_cdata, 0, -1 );
break;
+ case tt_wpt_url:
+ vik_waypoint_set_url ( c_wp, c_cdata->str );
+ g_string_erase ( c_cdata, 0, -1 );
+ break;
+
case tt_wpt_link:
vik_waypoint_set_image ( c_wp, c_cdata->str );
g_string_erase ( c_cdata, 0, -1 );
case tt_wpt_cmt:
case tt_wpt_desc:
case tt_wpt_sym:
+ case tt_wpt_url:
case tt_wpt_link:
case tt_trk_cmt:
case tt_trk_desc:
fprintf ( f, " <desc>%s</desc>\n", tmp );
g_free ( tmp );
}
+ if ( wp->url )
+ {
+ tmp = entitize(wp->url);
+ fprintf ( f, " <url>%s</url>\n", tmp );
+ g_free ( tmp );
+ }
if ( wp->image )
{
tmp = entitize(wp->image);