aboutsummaryrefslogtreecommitdiff
path: root/resources/op2geojson.js
diff options
context:
space:
mode:
authorChristopher Baines <cbaines8@gmail.com>2013-02-03 11:25:47 +0000
committerChristopher Baines <cbaines8@gmail.com>2013-02-03 11:25:47 +0000
commit985041872f1433031047d9a02baed066eaec675f (patch)
treeb3895a0d5dc6d0673e1e0b70a3ed2b78eec75ee4 /resources/op2geojson.js
parent96acebb8a39ff685d0c97df4a346071c213e1240 (diff)
downloadhealth-map-985041872f1433031047d9a02baed066eaec675f.tar
health-map-985041872f1433031047d9a02baed066eaec675f.tar.gz
Lots of changes to try and get the village data
Diffstat (limited to 'resources/op2geojson.js')
-rw-r--r--resources/op2geojson.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/resources/op2geojson.js b/resources/op2geojson.js
index fd0ae35..5a0f3a2 100644
--- a/resources/op2geojson.js
+++ b/resources/op2geojson.js
@@ -56,7 +56,7 @@ op2geojson = function() {
relation.tags['boundary'] == 'catchment_area') {
var poly = instance.polygon(relation, ways, nodes);
- poly.id = relation.tags['id'];
+ poly.id = relation.id;
features.push(poly);
}
});
@@ -119,6 +119,7 @@ op2geojson = function() {
$.each(relation.members, function(i, member) {
if (member.role == "outer") {
var way = ways[member.ref];
+ if (typeof way == 'undefined') return;
var wayCoords = instance.lineString(way, nodes).geometry.coordinates;
var numNodes = wayCoords.length