Browse Source

bugfix : a zero floor was not displayed on map

Jocelyn Delande 10 years ago
parent
commit
305a75f9ea
1 changed files with 1 additions and 1 deletions
  1. 1 1
      assets/map.js

+ 1 - 1
assets/map.js

@@ -30,7 +30,7 @@ $( document ).ready(function() {
 
             if (feature.properties.place) {
                 feature.properties.popupContent += '<ul>';
-                if (feature.properties.place.floor) feature.properties.popupContent += '<li>Étage: '+feature.properties.place.floor+'</li>';
+                if (feature.properties.place.hasOwnProperty('floor')) feature.properties.popupContent += '<li>Étage: '+feature.properties.place.floor+'</li>';
                 if (feature.properties.place.orientations[0]) feature.properties.popupContent += '<li>Orientation: '+feature.properties.place.orientations.join(', ')+'</li>';
                 if (feature.properties.place.roof) feature.properties.popupContent += '<li>Accès au toît'+'</li>';
                 feature.properties.popupContent += '</ul>'