{"action":"created","issue":{"url":"https://api.github.com/repos/Leaflet/Leaflet/issues/3313","labels_url":"https://api.github.com/repos/Leaflet/Leaflet/issues/3313/labels{/name}","comments_url":"https://api.github.com/repos/Leaflet/Leaflet/issues/3313/comments","events_url":"https://api.github.com/repos/Leaflet/Leaflet/issues/3313/events","html_url":"https://github.com/Leaflet/Leaflet/issues/3313","id":62524306,"number":3313,"title":"Zoom animation not resetting the Grid/TileLayer correctly.","user":{"login":"rickj33","id":154450,"avatar_url":"https://avatars.githubusercontent.com/u/154450?v=3","gravatar_id":"","url":"https://api.github.com/users/rickj33","html_url":"https://github.com/rickj33","followers_url":"https://api.github.com/users/rickj33/followers","following_url":"https://api.github.com/users/rickj33/following{/other_user}","gists_url":"https://api.github.com/users/rickj33/gists{/gist_id}","starred_url":"https://api.github.com/users/rickj33/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rickj33/subscriptions","organizations_url":"https://api.github.com/users/rickj33/orgs","repos_url":"https://api.github.com/users/rickj33/repos","events_url":"https://api.github.com/users/rickj33/events{/privacy}","received_events_url":"https://api.github.com/users/rickj33/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Leaflet/Leaflet/labels/bug","name":"bug","color":"EBC3C3"},{"url":"https://api.github.com/repos/Leaflet/Leaflet/labels/needs-more-info","name":"needs-more-info","color":"fad8c7"}],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/Leaflet/Leaflet/milestones/21","html_url":"https://github.com/Leaflet/Leaflet/milestones/1.0","labels_url":"https://api.github.com/repos/Leaflet/Leaflet/milestones/21/labels","id":466879,"number":21,"title":"1.0","description":"<!---\r\n@huboard:{\"order\":16.0}\r\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":49,"closed_issues":102,"state":"open","created_at":"2013-10-28T16:02:46Z","updated_at":"2015-05-12T15:22:44Z","due_on":null,"closed_at":null},"comments":2,"created_at":"2015-03-17T21:39:15Z","updated_at":"2015-05-12T15:22:44Z","closed_at":"2015-05-12T15:22:44Z","body":"When the zoom is animated, the grid/tile layer does not get reset correctly when the animation is done.\r\nThe tile origins return the incorrect values.\r\nI have created a jsfiddle to demo the issue https://jsfiddle.net/rickj33/eqLdnfm7/14/\r\nIn the GridLayer code, the _reset function, gets called when the animation ends, but this statement \r\nif (!noUpdate && (hard || tileZoomChanged)) {\r\nstops it from calling _updateLevels and _resetGrid,\r\n\r\nI found this by trying to make the Leaflet-image work with the latest 0.8 version.\r\n\r\nThe console output looks like this\r\n\r\nOrigins with out animation\r\n(index):76 tile position = {\"x\":-150,\"y\":-136}\r\n(index):76 tile position = {\"x\":106,\"y\":-136}\r\n(index):76 tile position = {\"x\":362,\"y\":-136}\r\n(index):76 tile position = {\"x\":618,\"y\":-136}\r\n(index):76 tile position = {\"x\":-150,\"y\":120}\r\n(index):76 tile position = {\"x\":106,\"y\":120}\r\n(index):76 tile position = {\"x\":362,\"y\":120}\r\n(index):76 tile position = {\"x\":618,\"y\":120}\r\n(index):76 tile position = {\"x\":-150,\"y\":376}\r\n(index):76 tile position = {\"x\":106,\"y\":376}\r\n(index):76 tile position = {\"x\":362,\"y\":376}\r\n(index):76 tile position = {\"x\":618,\"y\":376}\r\n\r\n(index):57 Origins with animation\r\n(index):76 tile position = {\"x\":-31,\"y\":-224}\r\n(index):76 tile position = {\"x\":225,\"y\":-224}\r\n(index):76 tile position = {\"x\":481,\"y\":-224}\r\n(index):76 tile position = {\"x\":-31,\"y\":32}\r\n(index):76 tile position = {\"x\":225,\"y\":32}\r\n(index):76 tile position = {\"x\":481,\"y\":32}\r\n(index):76 tile position = {\"x\":-31,\"y\":288}\r\n(index):76 tile position = {\"x\":225,\"y\":288}\r\n(index):76 tile position = {\"x\":481,\"y\":288}\r\n"},"comment":{"url":"https://api.github.com/repos/Leaflet/Leaflet/issues/comments/101319243","html_url":"https://github.com/Leaflet/Leaflet/issues/3313#issuecomment-101319243","issue_url":"https://api.github.com/repos/Leaflet/Leaflet/issues/3313","id":101319243,"user":{"login":"rickj33","id":154450,"avatar_url":"https://avatars.githubusercontent.com/u/154450?v=3","gravatar_id":"","url":"https://api.github.com/users/rickj33","html_url":"https://github.com/rickj33","followers_url":"https://api.github.com/users/rickj33/followers","following_url":"https://api.github.com/users/rickj33/following{/other_user}","gists_url":"https://api.github.com/users/rickj33/gists{/gist_id}","starred_url":"https://api.github.com/users/rickj33/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rickj33/subscriptions","organizations_url":"https://api.github.com/users/rickj33/orgs","repos_url":"https://api.github.com/users/rickj33/repos","events_url":"https://api.github.com/users/rickj33/events{/privacy}","received_events_url":"https://api.github.com/users/rickj33/received_events","type":"User","site_admin":false},"created_at":"2015-05-12T15:22:44Z","updated_at":"2015-05-12T15:22:44Z","body":"Yes, the Leaflet-image is only compatible with Leaflet 0.7.x. But in trying to update the code to work with Leaflet 0.8x I found the issue. If you got to http://jsfiddle.net/rickj33/eqLdnfm7/14/ then open developer tools and the console, you will see the difference in the tile positions when using animation and no animation. I would think that the coordinates would be the same after zooming. \r\nThe fiddle is using the leaflet code from http://leaflet-cdn.s3.amazonaws.com/build/master/leaflet.js\r\nif there is a newer one let me know an i will update and see if the issue still occurs.\r\n\r\nNote: \r\nThe original js fiddle i linked too, included the https which would not run the fiddle.\r\n\r\nThanks for investigating this.\r\nRick\r\n"}}