aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--resources/map.js11
1 files changed, 8 insertions, 3 deletions
diff --git a/resources/map.js b/resources/map.js
index 17cf48d..64484f3 100644
--- a/resources/map.js
+++ b/resources/map.js
@@ -245,9 +245,14 @@ function initMap(self) {
var healthPostProperties = fillObjectWithUnknowns(feature.properties, ["name", "emergency"]);
- layer.bindPopup(self.editorTemplate({coordinate: center}) +
- self.healthPostTemplate(healthPostProperties) +
- self.catchmentAreaTemplate(catchmentAreaProperties(catchmentArea, feature)));
+ if (_.isUndefined(catchmentArea)) {
+ layer.bindPopup(self.editorTemplate({coordinate: center}) +
+ self.healthPostTemplate(healthPostProperties) + " No catchment Area");
+ } else {
+ layer.bindPopup(self.editorTemplate({coordinate: center}) +
+ self.healthPostTemplate(healthPostProperties) +
+ self.catchmentAreaTemplate(catchmentAreaProperties(catchmentArea, feature)));
+ }
self.markers[feature.id] = layer;
},