diff options
author | Harry Cutts <eternal.linux@gmail.com> | 2012-12-02 13:54:35 +0000 |
---|---|---|
committer | Harry Cutts <eternal.linux@gmail.com> | 2012-12-02 13:54:35 +0000 |
commit | ead7cc174cc6c3f9fd9c72a484e3fa0d48a89e34 (patch) | |
tree | 062359911a32cfc82e4715521bfecb076b00f0ab | |
parent | b09b0a7b374c1d60e5f3d041bb45b15bccaca5b3 (diff) | |
download | health-map-ead7cc174cc6c3f9fd9c72a484e3fa0d48a89e34.tar health-map-ead7cc174cc6c3f9fd9c72a484e3fa0d48a89e34.tar.gz |
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.
-rw-r--r-- | resources/op2geojson.js | 3 |
1 files changed, 2 insertions, 1 deletions
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) ); |