The topic kinda says it all - is there a way to either force the map to re-render, or to load some tiles in advance?
When the page loads, we sometimes change the size of the map using javascript. When this happens, we wind up using all of the available tiles that were initially loaded. Then if you try to scroll the map, you wind up with a big chunk of gray until you scroll MORE than the amount of the size change. If that doesn't make sense, you can try it yourself in Chrome here: http://swstage.anchormediaworks.com/ You might have to do FB Connect to see the problem in action.
I considered quickly zooming in (and then zooming right back out) as one solution, but was wondering if there were a more elegant one.
map.invalidateSize()
Thanks, mourner! You're always so quick with the replies and support, which is one of the reasons we've been true to Leaflet since we started our project!
I'm glad to be helpful :)
Nice!
Thanks. This is helped me in 2019.. 👍 👍 👍
Doesn't helps to update Control names
Thanks, Really great idea.
Thank you! I've seen so many crazy answers for this but this was exactly what I needed. @mourner
Most helpful comment
map.invalidateSize()