{"action":"created","issue":{"url":"https://api.github.com/repos/CartoDB/Windshaft/issues/337","labels_url":"https://api.github.com/repos/CartoDB/Windshaft/issues/337/labels{/name}","comments_url":"https://api.github.com/repos/CartoDB/Windshaft/issues/337/comments","events_url":"https://api.github.com/repos/CartoDB/Windshaft/issues/337/events","html_url":"https://github.com/CartoDB/Windshaft/issues/337","id":77595666,"number":337,"title":"Extend multilayer layer selection","user":{"login":"rochoa","id":45346,"avatar_url":"https://avatars.githubusercontent.com/u/45346?v=3","gravatar_id":"","url":"https://api.github.com/users/rochoa","html_url":"https://github.com/rochoa","followers_url":"https://api.github.com/users/rochoa/followers","following_url":"https://api.github.com/users/rochoa/following{/other_user}","gists_url":"https://api.github.com/users/rochoa/gists{/gist_id}","starred_url":"https://api.github.com/users/rochoa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rochoa/subscriptions","organizations_url":"https://api.github.com/users/rochoa/orgs","repos_url":"https://api.github.com/users/rochoa/repos","events_url":"https://api.github.com/users/rochoa/events{/privacy}","received_events_url":"https://api.github.com/users/rochoa/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/CartoDB/Windshaft/labels/new%20feature","name":"new feature","color":"02e10c"}],"state":"closed","locked":false,"assignee":{"login":"rochoa","id":45346,"avatar_url":"https://avatars.githubusercontent.com/u/45346?v=3","gravatar_id":"","url":"https://api.github.com/users/rochoa","html_url":"https://github.com/rochoa","followers_url":"https://api.github.com/users/rochoa/followers","following_url":"https://api.github.com/users/rochoa/following{/other_user}","gists_url":"https://api.github.com/users/rochoa/gists{/gist_id}","starred_url":"https://api.github.com/users/rochoa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rochoa/subscriptions","organizations_url":"https://api.github.com/users/rochoa/orgs","repos_url":"https://api.github.com/users/rochoa/repos","events_url":"https://api.github.com/users/rochoa/events{/privacy}","received_events_url":"https://api.github.com/users/rochoa/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/CartoDB/Windshaft/milestones/36","html_url":"https://github.com/CartoDB/Windshaft/milestones/Alcobendas","labels_url":"https://api.github.com/repos/CartoDB/Windshaft/milestones/36/labels","id":1110423,"number":36,"title":"Alcobendas","description":" - [ ] Improve renderer selection: will not be based on format anymore but on layer id\r\n - [ ] Multilayer metadata: will return metadata for all layer types\r\n - [ ] Multilayer rendering selection: allowing blending of raster layers, for instance.","creator":{"login":"rochoa","id":45346,"avatar_url":"https://avatars.githubusercontent.com/u/45346?v=3","gravatar_id":"","url":"https://api.github.com/users/rochoa","html_url":"https://github.com/rochoa","followers_url":"https://api.github.com/users/rochoa/followers","following_url":"https://api.github.com/users/rochoa/following{/other_user}","gists_url":"https://api.github.com/users/rochoa/gists{/gist_id}","starred_url":"https://api.github.com/users/rochoa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rochoa/subscriptions","organizations_url":"https://api.github.com/users/rochoa/orgs","repos_url":"https://api.github.com/users/rochoa/repos","events_url":"https://api.github.com/users/rochoa/events{/privacy}","received_events_url":"https://api.github.com/users/rochoa/received_events","type":"User","site_admin":false},"open_issues":3,"closed_issues":4,"state":"open","created_at":"2015-05-14T15:43:32Z","updated_at":"2015-05-25T10:00:57Z","due_on":"2015-05-27T22:00:00Z","closed_at":null},"comments":9,"created_at":"2015-05-18T10:15:18Z","updated_at":"2015-05-25T10:45:47Z","closed_at":"2015-05-25T10:00:57Z","body":"Right now with a layergroupid it's possible to request a layer or `all` layers with requests like `GET {layergroupid}/0/{z}/{x}/{y}.{format}` or `GET {layergroupid}/all/{z}/{x}/{y}.{format}`.\r\n\r\nThis proposes to extend the behaviour of the `{layerid}` *param* to accept a multiple selection, so it would be possible to request something like: `GET {layergroupid}/0,2,4/{z}/{x}/{y}.{format}`.\r\n\r\nImagine layers:\r\n```\r\n0 = http\r\n1 = mapnik\r\n2 = mapnik\r\n3 = mapnik\r\n4 = torque\r\n5 = torque\r\n```\r\n\r\nSome issues/problems I can advance:\r\n\r\n#### Ordering\r\n\r\nWith the current approach when you request `GET {layergroupid}/{z}/{x}/{y}.{format}` or `GET {layergroupid}/all/{z}/{x}/{y}.{format}` all the mapnik layers are rendered with a unique mapnik renderer.\r\n\r\nNow we could request `GET {layergroupid}/2,1/{z}/{x}/{y}.{format}` which will imply creating a new mapnik renderer.\r\n\r\n#### Grouping/blending\r\n\r\nNow it would be possible to modify the order and group different layers in different order (it's kind of the same problem as in *Ordering*).\r\n\r\nA `GET {layergroupid}/0,1,2,4,3/{z}/{x}/{y}.{format}` request means we need to create two new mapnik renderers one for `1,2` and another for `3`.\r\n\r\nIf we do this the behaviour of `all` should match and layer definition ordering should be always considered because right now when you request \"all\" layers the mapnik layers are blended all together in the position the first mapnik layer is found.\r\n\r\n#### Format unification\r\nThis is more like a question: should we support for instance something like `GET {layergroupid}/2,1/{z}/{x}/{y}.grid.json` so it's possible to request multiple grids in the same request, returning an array of grid.jsons. Or ... `GET {layergroupid}/5,4/{z}/{x}/{y}.torque.json` more or less the same for torque layers.\r\n\r\nIn this scenario if requested format is not present in all layers it will result in a 400 error, for instance ``GET {layergroupid}/2,5/{z}/{x}/{y}.grid.json` will throw 400 as layer `5` does not support grid.json format."},"comment":{"url":"https://api.github.com/repos/CartoDB/Windshaft/issues/comments/105203744","html_url":"https://github.com/CartoDB/Windshaft/issues/337#issuecomment-105203744","issue_url":"https://api.github.com/repos/CartoDB/Windshaft/issues/337","id":105203744,"user":{"login":"rochoa","id":45346,"avatar_url":"https://avatars.githubusercontent.com/u/45346?v=3","gravatar_id":"","url":"https://api.github.com/users/rochoa","html_url":"https://github.com/rochoa","followers_url":"https://api.github.com/users/rochoa/followers","following_url":"https://api.github.com/users/rochoa/following{/other_user}","gists_url":"https://api.github.com/users/rochoa/gists{/gist_id}","starred_url":"https://api.github.com/users/rochoa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rochoa/subscriptions","organizations_url":"https://api.github.com/users/rochoa/orgs","repos_url":"https://api.github.com/users/rochoa/repos","events_url":"https://api.github.com/users/rochoa/events{/privacy}","received_events_url":"https://api.github.com/users/rochoa/received_events","type":"User","site_admin":false},"created_at":"2015-05-25T10:45:47Z","updated_at":"2015-05-25T10:45:47Z","body":"I don't want to look like a troll but `mapnik` is also `dynamic` :-("}}