Bind marker popUps earlier

This should take care of issue #6.
This commit is contained in:
James R Sconfitto 2013-10-28 21:50:49 -04:00
parent 5168bc9c8f
commit 59fe51f28f

View File

@ -191,6 +191,10 @@
// design the popups to have the content and
// interactions that we want
function addPopups(map, markerLayer) {
markerLayer.eachLayer(function(marker) {
var popupContent = '<h2>' + marker.feature.opts.name + '</h2>'
marker.bindPopup(popupContent, {closeButton: false,})
})
markerLayer.on('click', function(e) {
// clear any selected rows
$('.spotRow').removeClass("selectedRow")
@ -211,9 +215,6 @@
})
$('#latestSpot').css("display", "none")
$('#selectedSpot').html(selectedSpot).css("display", "inline")
var feature = e.layer.feature
var popupContent = '<h2>' + feature.opts.name + '</h2>'
e.layer.bindPopup(popupContent, {closeButton: false,})
})
}