Author: kake Date: 2012-04-19 09:53:11 +0100 (Thu, 19 Apr 2012) New Revision: 1360
Modified: trunk/static/map-leaflet.js Log: Don't add address to the map popup unless we actually have one.
Modified: trunk/static/map-leaflet.js =================================================================== --- trunk/static/map-leaflet.js 2012-04-18 17:30:36 UTC (rev 1359) +++ trunk/static/map-leaflet.js 2012-04-19 08:53:11 UTC (rev 1360) @@ -52,7 +52,10 @@ marker = new L.Marker( position, { icon: new gicon() } ); map.addLayer( marker );
- content = '<a href="?' + node.param + '">' + node.name + '</a><br />' + node.address; + content = '<a href="?' + node.param + '">' + node.name + '</a>'; + if ( node.address ) { + content += '<br />' + node.address; + } marker.bindPopup( content );
markers[ i ] = marker;