{"action":"created","issue":{"url":"https://api.github.com/repos/GeoNode/geonode/issues/2483","repository_url":"https://api.github.com/repos/GeoNode/geonode","labels_url":"https://api.github.com/repos/GeoNode/geonode/issues/2483/labels{/name}","comments_url":"https://api.github.com/repos/GeoNode/geonode/issues/2483/comments","events_url":"https://api.github.com/repos/GeoNode/geonode/issues/2483/events","html_url":"https://github.com/GeoNode/geonode/pull/2483","id":156964522,"number":2483,"title":"add mapbox satellite and streets in the MAP_BASELAYERS","user":{"login":"maning","id":353700,"avatar_url":"https://avatars.githubusercontent.com/u/353700?v=3","gravatar_id":"","url":"https://api.github.com/users/maning","html_url":"https://github.com/maning","followers_url":"https://api.github.com/users/maning/followers","following_url":"https://api.github.com/users/maning/following{/other_user}","gists_url":"https://api.github.com/users/maning/gists{/gist_id}","starred_url":"https://api.github.com/users/maning/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maning/subscriptions","organizations_url":"https://api.github.com/users/maning/orgs","repos_url":"https://api.github.com/users/maning/repos","events_url":"https://api.github.com/users/maning/events{/privacy}","received_events_url":"https://api.github.com/users/maning/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-05-26T11:40:24Z","updated_at":"2016-05-26T11:59:34Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/GeoNode/geonode/pulls/2483","html_url":"https://github.com/GeoNode/geonode/pull/2483","diff_url":"https://github.com/GeoNode/geonode/pull/2483.diff","patch_url":"https://github.com/GeoNode/geonode/pull/2483.patch"},"body":"Related to #2478, this adds Mapbox Satellite and Streets with [Openlayers](https://www.mapbox.com/help/mapbox-with-openlayers/).  \r\n\r\nAfter installing geonode, you have to copy the code to your local_settings.py based on [this instructions](https://geonode.readthedocs.io/en/1.2/deploy/customize.html#changing-the-default-basemap) and include your Mapbox access token.\r\n\r\nIdeally, access token should be provided during the post-install setup. Any idea how to to do this?\r\n\r\n![geonode-compressor](https://cloud.githubusercontent.com/assets/353700/15573363/24633e0c-2364-11e6-9f8d-ea20aaefe9f1.gif)\r\n\r\nTested on geonode 2.4"},"comment":{"url":"https://api.github.com/repos/GeoNode/geonode/issues/comments/221851595","html_url":"https://github.com/GeoNode/geonode/pull/2483#issuecomment-221851595","issue_url":"https://api.github.com/repos/GeoNode/geonode/issues/2483","id":221851595,"user":{"login":"pjdufour","id":1438253,"avatar_url":"https://avatars.githubusercontent.com/u/1438253?v=3","gravatar_id":"","url":"https://api.github.com/users/pjdufour","html_url":"https://github.com/pjdufour","followers_url":"https://api.github.com/users/pjdufour/followers","following_url":"https://api.github.com/users/pjdufour/following{/other_user}","gists_url":"https://api.github.com/users/pjdufour/gists{/gist_id}","starred_url":"https://api.github.com/users/pjdufour/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pjdufour/subscriptions","organizations_url":"https://api.github.com/users/pjdufour/orgs","repos_url":"https://api.github.com/users/pjdufour/repos","events_url":"https://api.github.com/users/pjdufour/events{/privacy}","received_events_url":"https://api.github.com/users/pjdufour/received_events","type":"User","site_admin":false},"created_at":"2016-05-26T11:59:34Z","updated_at":"2016-05-26T11:59:34Z","body":"I would handle the access token by creating a new settings for it; like we do for `BING_API_KEY`.\r\n\r\nSee https://github.com/GeoNode/geonode/blob/master/geonode/settings.py#L895.\r\n\r\nActually, I think the best way is to create the token (`MAPBOX_ACCESS_TOKEN=None`) before the local_settings.py import.  If it is set in local_settings.py, then it will override.  And then check if the token is not None (just `if MAPBOX_ACCESS_TOKEN:`).\r\n\r\nOtherwise, you can do it like we do for SLACK and have a boolean flag too (https://github.com/GeoNode/geonode/blob/master/geonode/settings.py#L818).\r\n\r\nWhichever way you think makes the most sense will likely be fine.\r\n\r\n"}}
{"actor":{"display_login":"pjdufour"}}