{"action":"closed","issue":{"url":"https://api.github.com/repos/mapbox/mapbox-gl-js/issues/3394","repository_url":"https://api.github.com/repos/mapbox/mapbox-gl-js","labels_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/issues/3394/labels{/name}","comments_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/issues/3394/comments","events_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/issues/3394/events","html_url":"https://github.com/mapbox/mapbox-gl-js/issues/3394","id":183549381,"number":3394,"title":"WorkerTile processing depends on JS object iteration order","user":{"login":"jfirebaugh","id":98601,"avatar_url":"https://avatars.githubusercontent.com/u/98601?v=3","gravatar_id":"","url":"https://api.github.com/users/jfirebaugh","html_url":"https://github.com/jfirebaugh","followers_url":"https://api.github.com/users/jfirebaugh/followers","following_url":"https://api.github.com/users/jfirebaugh/following{/other_user}","gists_url":"https://api.github.com/users/jfirebaugh/gists{/gist_id}","starred_url":"https://api.github.com/users/jfirebaugh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jfirebaugh/subscriptions","organizations_url":"https://api.github.com/users/jfirebaugh/orgs","repos_url":"https://api.github.com/users/jfirebaugh/repos","events_url":"https://api.github.com/users/jfirebaugh/events{/privacy}","received_events_url":"https://api.github.com/users/jfirebaugh/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mapbox/mapbox-gl-js/labels/bug","name":"bug","color":"0052cc"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-10-17T22:54:32Z","updated_at":"2016-10-19T08:07:21Z","closed_at":"2016-10-19T08:07:21Z","body":"The initial loop in `WorkerTile.prototype.parse` is over the object `layerFamilies`, which is keyed by layer ID. This populates a `bucketsById` object which is also keyed by layer ID. Finally, `bucketsById` is used to populate a `symbolBuckets` array. The order of the `symbolBuckets` array determines the order in which symbol collisions are calculated, and is important for rendering correctness. However, object iteration order in JS is unstandardized, and in particular keys which are numerals will not necessarily be iterated in insertion order. It's likely that GL JS will mis-render styles containing source layers whose ID is a numeral.\r\n\r\nWorkerTile needs to iterate over arrays of layers in style order (or reverse order), not objects."}}
{"actor":{"display_login":"mourner"}}