{"action":"opened","issue":{"url":"https://api.github.com/repos/OpenGeoscience/geojs/issues/452","labels_url":"https://api.github.com/repos/OpenGeoscience/geojs/issues/452/labels{/name}","comments_url":"https://api.github.com/repos/OpenGeoscience/geojs/issues/452/comments","events_url":"https://api.github.com/repos/OpenGeoscience/geojs/issues/452/events","html_url":"https://github.com/OpenGeoscience/geojs/issues/452","id":112667440,"number":452,"title":"Add a method on `map` to reorder layers","user":{"login":"jbeezley","id":31890,"avatar_url":"https://avatars.githubusercontent.com/u/31890?v=3","gravatar_id":"","url":"https://api.github.com/users/jbeezley","html_url":"https://github.com/jbeezley","followers_url":"https://api.github.com/users/jbeezley/followers","following_url":"https://api.github.com/users/jbeezley/following{/other_user}","gists_url":"https://api.github.com/users/jbeezley/gists{/gist_id}","starred_url":"https://api.github.com/users/jbeezley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbeezley/subscriptions","organizations_url":"https://api.github.com/users/jbeezley/orgs","repos_url":"https://api.github.com/users/jbeezley/repos","events_url":"https://api.github.com/users/jbeezley/events{/privacy}","received_events_url":"https://api.github.com/users/jbeezley/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-10-21T19:58:52Z","updated_at":"2015-10-21T19:58:52Z","closed_at":null,"body":"See #451.\r\n\r\nPossible interface:\r\n* Using a permutation array `map.layerOrder([0, 3, 1, 2])`, where the numbers are the indices of layer in `map.layers()`.\r\n* `map.layerOrder()` returns the current permutation array.\r\n* Using a compare function  `map.layerOrder(function (layer1, layer2) {...})` à la [`Array.prototype.sort`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort)\r\n"}}