aboutsummaryrefslogtreecommitdiff
path: root/resources
diff options
context:
space:
mode:
Diffstat (limited to 'resources')
-rw-r--r--resources/map.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/resources/map.js b/resources/map.js
index 3b98003..a6828a6 100644
--- a/resources/map.js
+++ b/resources/map.js
@@ -3,8 +3,17 @@ $(document).ready(function() {
var self = this;
self.template = _.template('<dl> <% _.each(properties, function(val, key) { %>\
+ <% if (/\:/.exec(key)) { %> \
+ <dl> \
+ <% console.log(key.split(":")); %>\
+ <% console.log(val); %>\
+ <dt><%= key.split(":")[1] %> </dt> \
+ <dd><%= val %> </dd> \
+ </dl> \
+ <% } else {%> \
<dt><%= key %> </dt>\
<dd><%= val %> </dd>\
+ <% } %> \
<% }); %>\
</dl>');
@@ -43,6 +52,7 @@ $(document).ready(function() {
console.log(data);
layer = L.geoJson(data, {
onEachFeature: function(feature, layer) {
+ debugger;
layer.bindPopup(self.template({ properties: feature.properties }));
}
});