mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Include geolocation info on export XML (divelogs.de)
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
This commit is contained in:
parent
0cf4104dc6
commit
4375a87598
1 changed files with 13 additions and 1 deletions
|
@ -216,7 +216,19 @@ bool DivelogsDeWebServices::prepare_dives_for_divelogs(const QString &tempfile,
|
|||
put_degrees(&mb, ds->latitude, " gps='", " ");
|
||||
put_degrees(&mb, ds->longitude, "", "'");
|
||||
}
|
||||
put_format(&mb, "/>\n</divesites>\n");
|
||||
put_format(&mb, ">\n");
|
||||
if (ds->taxonomy.nr) {
|
||||
for (int j = 0; j < ds->taxonomy.nr; j++) {
|
||||
struct taxonomy *t = &ds->taxonomy.category[j];
|
||||
if (t->category != TC_NONE && t->category == prefs.geocoding.category[j] && t->value) {
|
||||
put_format(&mb, " <geo cat='%d'", t->category);
|
||||
put_format(&mb, " origin='%d' value='", t->origin);
|
||||
put_quoted(&mb, t->value, 1, 0);
|
||||
put_format(&mb, "'/>\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
put_format(&mb, "</site>\n</divesites>\n");
|
||||
}
|
||||
|
||||
save_one_dive_to_mb(&mb, dive);
|
||||
|
|
Loading…
Add table
Reference in a new issue