[gnome-maps/wip/osm-edit: 12/47] osmApi: Add code to parse OSM relations (not finished in the shim yet). Missing break statement
- From: Marcus Lundblad <mlundblad src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-maps/wip/osm-edit: 12/47] osmApi: Add code to parse OSM relations (not finished in the shim yet). Missing break statement
- Date: Thu, 30 Apr 2015 12:58:22 +0000 (UTC)
commit c35e248fff65b8211f83b38bff5abb5e48e3ecab
Author: Marcus Lundblad <marcus lundblad primekey se>
Date: Sun Feb 1 10:14:47 2015 +0100
osmApi: Add code to parse OSM relations (not finished in the shim yet). Missing break statement
src/osmConnection.js | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/src/osmConnection.js b/src/osmConnection.js
index 6710254..cd1cd79 100644
--- a/src/osmConnection.js
+++ b/src/osmConnection.js
@@ -25,6 +25,7 @@ const OSMRelation = imports.osmRelation;
const OSMWay = imports.osmWay;
const Lang = imports.lang;
+const GLib = imports.gi.GLib;
const Maps = imports.gi.GnomeMaps;
const Soup = imports.gi.Soup;
@@ -81,7 +82,12 @@ const OSMConnection = new Lang.Class({
break;
case 'way':
jsonString = Maps.osm_parse_way(body.data, body.length);
- default:
+ break;
+ case 'relation':
+ jsonString = Maps.osm_parse_relation(body.data, body.lenght);
+ break;
+ default:
+ GLib.error('unknown OSM type: ' + type);
}
print ('parsed XML to JSON: ' + jsonString);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]