From ead7cc174cc6c3f9fd9c72a484e3fa0d48a89e34 Mon Sep 17 00:00:00 2001 From: Harry Cutts Date: Sun, 2 Dec 2012 13:54:35 +0000 Subject: Correct the node filter Previously, nodes that belonged to hospital polygons were displayed as health facilities if they had any tags at all (e.g. odbl=clean). They are now only displayed if they contain the amenity tag. --- resources/op2geojson.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/resources/op2geojson.js b/resources/op2geojson.js index 0fa2967..c453df7 100644 --- a/resources/op2geojson.js +++ b/resources/op2geojson.js @@ -19,7 +19,8 @@ op2geojson = function() { // Add nodes and ways to the layer var features = []; $.each(data.elements, function(i, item) { - if( item.type === 'node' && item.tags != null ) { + if( item.type === 'node' && item.tags != undefined + && item.tags['amenity'] != undefined) { features.push( instance.point(item) ); } else if (item.type === 'way') { features.push( instance.lineString(item, nodes) ); -- cgit v1.2.3