aboutsummaryrefslogtreecommitdiff
path: root/resources
diff options
context:
space:
mode:
authorHarry Cutts <eternal.linux@gmail.com>2012-12-02 13:54:35 +0000
committerChristopher Baines <cbaines8@gmail.com>2012-12-02 14:32:23 +0000
commita9b76b8848593e99a756ab1a38cdd91a2f870807 (patch)
tree94124444bb5e02be011d3ac095217f735d86a3ba /resources
parenta1fce06c1857c99d8a421f513180d299617edacb (diff)
downloadhealth-map-a9b76b8848593e99a756ab1a38cdd91a2f870807.tar
health-map-a9b76b8848593e99a756ab1a38cdd91a2f870807.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.
Diffstat (limited to 'resources')
-rw-r--r--resources/op2geojson.js3
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) );