A popup won't open until the data file has loaded and the layer is added to the map - that's pretty obvious. I figured it would help to bind it to the 'add' event - but that never fires:
var l1 = omnivore.kml('data/Niveauregulering01a.kml');var pop = '
'l1.on('add', function(){ console.log('add'); l1.openPopup();});l1.bindPopup(pop).addTo(map);There seems to be no other event that I can bind it to:http://leafletjs.com/reference.html#path-add
Any suggestions?
أكثر...
var l1 = omnivore.kml('data/Niveauregulering01a.kml');var pop = '
Any suggestions?
أكثر...