diff --git a/_includes/js/map-js.html b/_includes/js/map-js.html index b94d4e78..59f38d60 100644 --- a/_includes/js/map-js.html +++ b/_includes/js/map-js.html @@ -127,9 +127,12 @@ thumbImg = getIcon(feature.properties.template,feature.properties.format,"thumb") } // set up popup content - var popupTemplate = '

' + - feature.properties.title + '

' + thumbImg + '

'; + var popupTemplate = ""; + if (feature.properties.title) { + popupTemplate = '

' + + feature.properties.title + '

' + thumbImg + '

'; + } {% for f in fields %}{% if f.display_name %} if (feature.properties[{{ f.field | escape | jsonify }}]) { popupTemplate += '{{ f.display_name }}: ' + feature.properties[{{ f.field | escape | jsonify }}] + '
';