Resizing a leaflet map on container resize

后端 未结 6 890
渐次进展
渐次进展 2020-12-08 02:30

I have a

containing a leaflet map. Upon certain events the height of the
will be altered. I\'d like for the map to resize t
6条回答
  •  暖寄归人
    2020-12-08 02:42

    the accepted answer is a bit hacky in that it relies on the sleep being longer than the transition.

    I have found this to work well:

    $("body").on($.support.transition.end, '#main-navbar .nav-collapse', function(event){    
        console.log("end of the animation");
    });
    

提交回复
热议问题