阅读背景:

传单在展示和隐藏中发出角度问题?想要摆脱$ timeout

来源:互联网 

I have a leaflet being created with L.map('mapelement') being called. The issue is that if I click a button that "hides" the leaflet map, then click the button again to show, the leaflet map does not show up. However, when I put in a setTimeout within the link function before the map gets created and set it to 2 seconds, then the map shows every time (though I have to wait 2 seconds). Is there a better alternative to using $timeout in my custom "leaflet-map" directive to show and hide?I have a leaflet being created with L.map('mape




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: