{"action":"created","issue":{"url":"https://api.github.com/repos/CartoDB/cartodb.js/issues/1169","repository_url":"https://api.github.com/repos/CartoDB/cartodb.js","labels_url":"https://api.github.com/repos/CartoDB/cartodb.js/issues/1169/labels{/name}","comments_url":"https://api.github.com/repos/CartoDB/cartodb.js/issues/1169/comments","events_url":"https://api.github.com/repos/CartoDB/cartodb.js/issues/1169/events","html_url":"https://github.com/CartoDB/cartodb.js/issues/1169","id":138184883,"number":1169,"title":"Layers API","user":{"login":"alonsogarciapablo","id":390398,"avatar_url":"https://avatars.githubusercontent.com/u/390398?v=3","gravatar_id":"","url":"https://api.github.com/users/alonsogarciapablo","html_url":"https://github.com/alonsogarciapablo","followers_url":"https://api.github.com/users/alonsogarciapablo/followers","following_url":"https://api.github.com/users/alonsogarciapablo/following{/other_user}","gists_url":"https://api.github.com/users/alonsogarciapablo/gists{/gist_id}","starred_url":"https://api.github.com/users/alonsogarciapablo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alonsogarciapablo/subscriptions","organizations_url":"https://api.github.com/users/alonsogarciapablo/orgs","repos_url":"https://api.github.com/users/alonsogarciapablo/repos","events_url":"https://api.github.com/users/alonsogarciapablo/events{/privacy}","received_events_url":"https://api.github.com/users/alonsogarciapablo/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/CartoDB/cartodb.js/labels/v4","name":"v4","color":"bfdadc"}],"state":"open","locked":false,"assignee":{"login":"alonsogarciapablo","id":390398,"avatar_url":"https://avatars.githubusercontent.com/u/390398?v=3","gravatar_id":"","url":"https://api.github.com/users/alonsogarciapablo","html_url":"https://github.com/alonsogarciapablo","followers_url":"https://api.github.com/users/alonsogarciapablo/followers","following_url":"https://api.github.com/users/alonsogarciapablo/following{/other_user}","gists_url":"https://api.github.com/users/alonsogarciapablo/gists{/gist_id}","starred_url":"https://api.github.com/users/alonsogarciapablo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alonsogarciapablo/subscriptions","organizations_url":"https://api.github.com/users/alonsogarciapablo/orgs","repos_url":"https://api.github.com/users/alonsogarciapablo/repos","events_url":"https://api.github.com/users/alonsogarciapablo/events{/privacy}","received_events_url":"https://api.github.com/users/alonsogarciapablo/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/CartoDB/cartodb.js/milestones/30","html_url":"https://github.com/CartoDB/cartodb.js/milestones/Valdemoro","labels_url":"https://api.github.com/repos/CartoDB/cartodb.js/milestones/30/labels","id":1619878,"number":30,"title":"Valdemoro","description":"","creator":{"login":"alonsogarciapablo","id":390398,"avatar_url":"https://avatars.githubusercontent.com/u/390398?v=3","gravatar_id":"","url":"https://api.github.com/users/alonsogarciapablo","html_url":"https://github.com/alonsogarciapablo","followers_url":"https://api.github.com/users/alonsogarciapablo/followers","following_url":"https://api.github.com/users/alonsogarciapablo/following{/other_user}","gists_url":"https://api.github.com/users/alonsogarciapablo/gists{/gist_id}","starred_url":"https://api.github.com/users/alonsogarciapablo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alonsogarciapablo/subscriptions","organizations_url":"https://api.github.com/users/alonsogarciapablo/orgs","repos_url":"https://api.github.com/users/alonsogarciapablo/repos","events_url":"https://api.github.com/users/alonsogarciapablo/events{/privacy}","received_events_url":"https://api.github.com/users/alonsogarciapablo/received_events","type":"User","site_admin":false},"open_issues":3,"closed_issues":0,"state":"open","created_at":"2016-03-03T11:39:14Z","updated_at":"2016-03-03T14:11:20Z","due_on":"2016-03-09T23:00:00Z","closed_at":null},"comments":16,"created_at":"2016-03-03T14:00:17Z","updated_at":"2016-03-04T12:06:40Z","closed_at":null,"body":"**WARNING: This is a WIP. I will remove this comment once I complete the description based on the feedback from @viddo @javierarce  @xavijam**\r\n\r\nHere's an initial proposal for the API that the editor needs to work with CartoDB.js layers:\r\n\r\n**Creation of new layers**\r\n```\r\nvar layer = map.createCartoDBLayer(attrs);\r\nvar layer = map.createTorqueLayer(attrs);\r\nvar layer = map.createTileLayer(attrs);\r\n// ... (we probably have more types (color, wms, etc.))\r\n```\r\n\r\n**Deletion of an existing layer**\r\n\r\n```\r\nlayer.remove();\r\n```\r\n\r\n**Update of an existing layer**\r\n\r\n```\r\n// Update a layer\r\nlayer.update(attrs)\r\n```\r\n\r\n**Showing/hiding a layer**\r\n\r\n```\r\nlayer.show();\r\nlayer.hide();\r\n```\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/CartoDB/cartodb.js/issues/comments/192255962","html_url":"https://github.com/CartoDB/cartodb.js/issues/1169#issuecomment-192255962","issue_url":"https://api.github.com/repos/CartoDB/cartodb.js/issues/1169","id":192255962,"user":{"login":"alonsogarciapablo","id":390398,"avatar_url":"https://avatars.githubusercontent.com/u/390398?v=3","gravatar_id":"","url":"https://api.github.com/users/alonsogarciapablo","html_url":"https://github.com/alonsogarciapablo","followers_url":"https://api.github.com/users/alonsogarciapablo/followers","following_url":"https://api.github.com/users/alonsogarciapablo/following{/other_user}","gists_url":"https://api.github.com/users/alonsogarciapablo/gists{/gist_id}","starred_url":"https://api.github.com/users/alonsogarciapablo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alonsogarciapablo/subscriptions","organizations_url":"https://api.github.com/users/alonsogarciapablo/orgs","repos_url":"https://api.github.com/users/alonsogarciapablo/repos","events_url":"https://api.github.com/users/alonsogarciapablo/events{/privacy}","received_events_url":"https://api.github.com/users/alonsogarciapablo/received_events","type":"User","site_admin":false},"created_at":"2016-03-04T12:06:40Z","updated_at":"2016-03-04T12:06:40Z","body":"Can CartoDB.js handle more than one torque layer? Because in that case it's not  a limitation of the editor IMO, but a limitation of CartoDB.js itself... Again, it's not a big deal at this point but I'm just throwing out questions that pop up in my mind as I implement this..."}}