i have a big problem. i want to open a leaflet map in a modal. but the map is not showing properly. the tiles are not loading.
here is the script:
http://boo
You should probably avoid using setTimeout with a randomly chosen delay. A better way using the 'shown.bs.modal' event instead of 'show.bs.modal':
modal.on('shown.bs.modal', function(){
setTimeout(function() {
map.invalidateSize();
}, 1);
})
Or use underscore's defer :
modal.on('shown.bs.modal', function(){
_.defer(map.invalidateSize.bind(map));
})