Browse Source

Display contact informations (if authorized)

In map feature popup
Jocelyn Delalande 8 years ago
parent
commit
ab9023fd48
1 changed files with 12 additions and 0 deletions
  1. 12 0
      wifiwithme/static/map.js

+ 12 - 0
wifiwithme/static/map.js

@@ -64,6 +64,18 @@ $( document ).ready(function() {
                 feature.properties.popupContent += '</ul>';
             }
 
+            if (feature.properties.email || feature.properties.phone) {
+                feature.properties.popupContent += '<ul>';
+                if (feature.properties.email) {
+                    feature.properties.popupContent += '<li> Email : '+feature.properties.email + '</li>';
+                }
+                if (feature.properties.phone) {
+                    feature.properties.popupContent += '<li> Phone : '+feature.properties.phone + '</li>';
+                }
+
+            }
+
+
             if (feature.properties.comment) {
                 feature.properties.popupContent += '<p>'+feature.properties.comment+'</p>';
             }