{"action":"created","issue":{"url":"https://api.github.com/repos/CartoDB/cartodb/issues/10127","repository_url":"https://api.github.com/repos/CartoDB/cartodb","labels_url":"https://api.github.com/repos/CartoDB/cartodb/issues/10127/labels{/name}","comments_url":"https://api.github.com/repos/CartoDB/cartodb/issues/10127/comments","events_url":"https://api.github.com/repos/CartoDB/cartodb/issues/10127/events","html_url":"https://github.com/CartoDB/cartodb/issues/10127","id":182216317,"number":10127,"title":"custom baselayer not added to user custom baselayer collection when importing .carto","user":{"login":"matallo","id":36676,"avatar_url":"https://avatars.githubusercontent.com/u/36676?v=3","gravatar_id":"","url":"https://api.github.com/users/matallo","html_url":"https://github.com/matallo","followers_url":"https://api.github.com/users/matallo/followers","following_url":"https://api.github.com/users/matallo/following{/other_user}","gists_url":"https://api.github.com/users/matallo/gists{/gist_id}","starred_url":"https://api.github.com/users/matallo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matallo/subscriptions","organizations_url":"https://api.github.com/users/matallo/orgs","repos_url":"https://api.github.com/users/matallo/repos","events_url":"https://api.github.com/users/matallo/events{/privacy}","received_events_url":"https://api.github.com/users/matallo/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/CartoDB/cartodb/labels/backend","name":"backend","color":"d4c5f9"},{"url":"https://api.github.com/repos/CartoDB/cartodb/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/CartoDB/cartodb/labels/Builder","name":"Builder","color":"207de5"}],"state":"open","locked":false,"assignee":{"login":"juanignaciosl","id":932968,"avatar_url":"https://avatars.githubusercontent.com/u/932968?v=3","gravatar_id":"","url":"https://api.github.com/users/juanignaciosl","html_url":"https://github.com/juanignaciosl","followers_url":"https://api.github.com/users/juanignaciosl/followers","following_url":"https://api.github.com/users/juanignaciosl/following{/other_user}","gists_url":"https://api.github.com/users/juanignaciosl/gists{/gist_id}","starred_url":"https://api.github.com/users/juanignaciosl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juanignaciosl/subscriptions","organizations_url":"https://api.github.com/users/juanignaciosl/orgs","repos_url":"https://api.github.com/users/juanignaciosl/repos","events_url":"https://api.github.com/users/juanignaciosl/events{/privacy}","received_events_url":"https://api.github.com/users/juanignaciosl/received_events","type":"User","site_admin":false},"assignees":[{"login":"juanignaciosl","id":932968,"avatar_url":"https://avatars.githubusercontent.com/u/932968?v=3","gravatar_id":"","url":"https://api.github.com/users/juanignaciosl","html_url":"https://github.com/juanignaciosl","followers_url":"https://api.github.com/users/juanignaciosl/followers","following_url":"https://api.github.com/users/juanignaciosl/following{/other_user}","gists_url":"https://api.github.com/users/juanignaciosl/gists{/gist_id}","starred_url":"https://api.github.com/users/juanignaciosl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juanignaciosl/subscriptions","organizations_url":"https://api.github.com/users/juanignaciosl/orgs","repos_url":"https://api.github.com/users/juanignaciosl/repos","events_url":"https://api.github.com/users/juanignaciosl/events{/privacy}","received_events_url":"https://api.github.com/users/juanignaciosl/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/CartoDB/cartodb/milestones/69","html_url":"https://github.com/CartoDB/cartodb/milestones/Builder","labels_url":"https://api.github.com/repos/CartoDB/cartodb/milestones/69/labels","id":1683967,"number":69,"title":"Builder","description":"","creator":{"login":"viddo","id":978461,"avatar_url":"https://avatars.githubusercontent.com/u/978461?v=3","gravatar_id":"","url":"https://api.github.com/users/viddo","html_url":"https://github.com/viddo","followers_url":"https://api.github.com/users/viddo/followers","following_url":"https://api.github.com/users/viddo/following{/other_user}","gists_url":"https://api.github.com/users/viddo/gists{/gist_id}","starred_url":"https://api.github.com/users/viddo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/viddo/subscriptions","organizations_url":"https://api.github.com/users/viddo/orgs","repos_url":"https://api.github.com/users/viddo/repos","events_url":"https://api.github.com/users/viddo/events{/privacy}","received_events_url":"https://api.github.com/users/viddo/received_events","type":"User","site_admin":false},"open_issues":236,"closed_issues":321,"state":"open","created_at":"2016-04-05T09:20:50Z","updated_at":"2016-10-11T14:34:10Z","due_on":null,"closed_at":null},"comments":6,"created_at":"2016-10-11T09:27:28Z","updated_at":"2016-10-11T16:13:21Z","closed_at":null,"body":"**steps to reproduce**\r\n\r\n- export .carto from a map with a custom basemap (i.e. mapbox)\r\n- import .carto into another account which doesn't have such custom basemap\r\n- enter in basemap panel in layer list\r\n\r\n**expected behaviour**\r\n\r\n- the custom basemap should be added in the respective custom basemap category\r\n\r\n**actual behaviour**\r\n\r\nas custom basemaps are currently three different geared parts working together:\r\n- user custom baselayer collection (where the basemap isn't yet)\r\n- custom baselayers collection for panel (which consists in default baselayers from config and custom baselayers from ^^^)\r\n- baselayer in layer collection of map\r\n\r\nthe baselayer in the map is set indeed (thus we can properly see the map), but the custom baselayer isn't added to the user custom baselayers, and we can't deselect and select it again (see attached)\r\n\r\n![screen shot 2016-10-11 at 11 15 17](https://cloud.githubusercontent.com/assets/36676/19265420/64b7e77a-8fa5-11e6-9b78-22a88a0e8182.png)\r\n\r\nwe should, at the moment of map import, create a custom baselayer for the user\r\n\r\n/cc @xavijam "},"comment":{"url":"https://api.github.com/repos/CartoDB/cartodb/issues/comments/252965488","html_url":"https://github.com/CartoDB/cartodb/issues/10127#issuecomment-252965488","issue_url":"https://api.github.com/repos/CartoDB/cartodb/issues/10127","id":252965488,"user":{"login":"matallo","id":36676,"avatar_url":"https://avatars.githubusercontent.com/u/36676?v=3","gravatar_id":"","url":"https://api.github.com/users/matallo","html_url":"https://github.com/matallo","followers_url":"https://api.github.com/users/matallo/followers","following_url":"https://api.github.com/users/matallo/following{/other_user}","gists_url":"https://api.github.com/users/matallo/gists{/gist_id}","starred_url":"https://api.github.com/users/matallo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matallo/subscriptions","organizations_url":"https://api.github.com/users/matallo/orgs","repos_url":"https://api.github.com/users/matallo/repos","events_url":"https://api.github.com/users/matallo/events{/privacy}","received_events_url":"https://api.github.com/users/matallo/received_events","type":"User","site_admin":false},"created_at":"2016-10-11T16:13:21Z","updated_at":"2016-10-11T16:13:21Z","body":"**short answer:** \"Custom\"\r\n\r\n**long answer:**\r\n\r\nno prob! https://github.com/CartoDB/cartodb/blob/master/lib/assets/javascripts/cartodb3/editor/layers/basemap-content-views/basemaps-collection.js#L45-L49\r\n\r\nnow you mention it is tricky as there's no way to know which of those categories the custom basemap falls under (unless we replicate the frontend logic, god no) so I'd just add it as \"Custom\" basemap\r\n\r\nThat category still exists for xyz basemaps (we have the url template from the layer definition), or even add it as if it was an old basemap (with no category) and deal with it as such, for example:\r\n\r\n```\r\nlayers: [\r\n{\r\noptions: {\r\nvisible: true,\r\ntype: \"Tiled\",\r\nurlTemplate: \"https://stamen-tiles-{s}.a.ssl.fastly.net/watercolor/{z}/{x}/{y}.png\",\r\nattribution: null,\r\nmaxZoom: 21,\r\nminZoom: 0,\r\nname: \"Custom basemap 17\",\r\ntms: false,\r\nclassName: \"httpsstamentilessasslfastlynetwatercolorzxypng\",\r\norder: 17\r\n},\r\nkind: \"tiled\",\r\ninfowindow: null,\r\ntooltip: null,\r\nid: \"a5401323-c0f7-4ee1-9ac6-9f631189445d\",\r\norder: 17\r\n}\r\n],\r\ntotal_entries: 1\r\n}\r\n```"}}
{"actor":{"display_login":"matallo"}}