{"action":"created","issue":{"url":"https://api.github.com/repos/Leaflet/Leaflet/issues/3002","labels_url":"https://api.github.com/repos/Leaflet/Leaflet/issues/3002/labels{/name}","comments_url":"https://api.github.com/repos/Leaflet/Leaflet/issues/3002/comments","events_url":"https://api.github.com/repos/Leaflet/Leaflet/issues/3002/events","html_url":"https://github.com/Leaflet/Leaflet/issues/3002","id":48005131,"number":3002,"title":"Map tiles not loading until a zoom is executed","user":{"login":"rwwagner90","id":2640861,"avatar_url":"https://avatars.githubusercontent.com/u/2640861?v=3","gravatar_id":"","url":"https://api.github.com/users/rwwagner90","html_url":"https://github.com/rwwagner90","followers_url":"https://api.github.com/users/rwwagner90/followers","following_url":"https://api.github.com/users/rwwagner90/following{/other_user}","gists_url":"https://api.github.com/users/rwwagner90/gists{/gist_id}","starred_url":"https://api.github.com/users/rwwagner90/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rwwagner90/subscriptions","organizations_url":"https://api.github.com/users/rwwagner90/orgs","repos_url":"https://api.github.com/users/rwwagner90/repos","events_url":"https://api.github.com/users/rwwagner90/events{/privacy}","received_events_url":"https://api.github.com/users/rwwagner90/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Leaflet/Leaflet/labels/backlog","name":"backlog","color":"ededed"},{"url":"https://api.github.com/repos/Leaflet/Leaflet/labels/minor%20bug","name":"minor bug","color":"EBC3C3"},{"url":"https://api.github.com/repos/Leaflet/Leaflet/labels/projections","name":"projections","color":"ddffff"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/Leaflet/Leaflet/milestones/7","html_url":"https://github.com/Leaflet/Leaflet/milestones/future","labels_url":"https://api.github.com/repos/Leaflet/Leaflet/milestones/7/labels","id":385,"number":7,"title":"future","description":"Features that will be implemented sometime in future (no particular version yet)\r\n\r\n<!---\r\n@huboard:{\"order\":17.8125}\n-->\r\n","creator":{"login":"mourner","id":25395,"avatar_url":"https://avatars.githubusercontent.com/u/25395?v=3","gravatar_id":"","url":"https://api.github.com/users/mourner","html_url":"https://github.com/mourner","followers_url":"https://api.github.com/users/mourner/followers","following_url":"https://api.github.com/users/mourner/following{/other_user}","gists_url":"https://api.github.com/users/mourner/gists{/gist_id}","starred_url":"https://api.github.com/users/mourner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mourner/subscriptions","organizations_url":"https://api.github.com/users/mourner/orgs","repos_url":"https://api.github.com/users/mourner/repos","events_url":"https://api.github.com/users/mourner/events{/privacy}","received_events_url":"https://api.github.com/users/mourner/received_events","type":"User","site_admin":false},"open_issues":37,"closed_issues":61,"state":"open","created_at":"2011-04-10T07:44:45Z","updated_at":"2015-03-18T10:56:45Z","due_on":null,"closed_at":null},"comments":40,"created_at":"2014-11-06T19:42:22Z","updated_at":"2015-04-16T20:46:30Z","closed_at":null,"body":"After updating to Leaflet 0.8-dev, my tiles are not loading smoothly. The initial map is missing one tile it appears and when I change to other tile layers with the layer control, I end up with a completely blank map. No errors in the console. If I zoom though, the tiles refresh and all of them load.  See attached screenshots.\r\n![screenshot at nov 06 14-40-53](https://cloud.githubusercontent.com/assets/2640861/4942553/f7217160-65ec-11e4-96b6-318455d2d89c.png)\r\n![screenshot at nov 06 14-41-18](https://cloud.githubusercontent.com/assets/2640861/4942554/f7227efc-65ec-11e4-9342-310b6c9b2cdc.png)"},"comment":{"url":"https://api.github.com/repos/Leaflet/Leaflet/issues/comments/93836022","html_url":"https://github.com/Leaflet/Leaflet/issues/3002#issuecomment-93836022","issue_url":"https://api.github.com/repos/Leaflet/Leaflet/issues/3002","id":93836022,"user":{"login":"bmulcahy","id":8929114,"avatar_url":"https://avatars.githubusercontent.com/u/8929114?v=3","gravatar_id":"","url":"https://api.github.com/users/bmulcahy","html_url":"https://github.com/bmulcahy","followers_url":"https://api.github.com/users/bmulcahy/followers","following_url":"https://api.github.com/users/bmulcahy/following{/other_user}","gists_url":"https://api.github.com/users/bmulcahy/gists{/gist_id}","starred_url":"https://api.github.com/users/bmulcahy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bmulcahy/subscriptions","organizations_url":"https://api.github.com/users/bmulcahy/orgs","repos_url":"https://api.github.com/users/bmulcahy/repos","events_url":"https://api.github.com/users/bmulcahy/events{/privacy}","received_events_url":"https://api.github.com/users/bmulcahy/received_events","type":"User","site_admin":false},"created_at":"2015-04-16T20:46:30Z","updated_at":"2015-04-16T20:46:30Z","body":"I think it is that @rwwagner90 .\r\n\r\n\r\nI added this to my code after my page load \r\n    app.map.refresh(0);\r\n\r\n    app.map.refresh = function(timeout){\r\n          window.setTimeout(function(){\r\n          app.map.invalidateSize();\r\n    },timeout);\r\n\t\t};\r\n\r\nI added the timeout because I have a collapsible panel in my app that does not throw the invalidateSize after the animation(0.5s) is complete, it will throw it as soon as it starts, so I'm left with the grey space in my map container.\r\n\r\nAdding the invalidateSize forces the leaflet to double check the true size of the container.\r\n\r\n"}}