Skip to content

Commit

Permalink
Resolve #716: Add DigitalGlobe Vivid layer
Browse files Browse the repository at this point in the history
  • Loading branch information
seav committed Sep 22, 2016
1 parent 1205f61 commit 978399d
Showing 1 changed file with 45 additions and 15 deletions.
60 changes: 45 additions & 15 deletions cadasta/config/settings/default.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,22 +159,52 @@
ACCOUNT_LOGOUT_ON_GET = True
ACCOUNT_LOGOUT_REDIRECT_URL = LOGIN_URL

OSM_ATTRIBUTION = _(
"Base map data &copy; <a href=\"http://openstreetmap.org\">"
"OpenStreetMap</a> contributors under "
"<a href=\"http://opendatacommons.org/licenses/odbl/\">ODbL</a>"
)
DIGITALGLOBE_ATTRIBUTION = _("Imagery &copy; DigitalGlobe ")
DIGITALGLOBE_TILESET_URL_FORMAT = (
'https://{{s}}.tiles.mapbox.com/v4/digitalglobe.{}'
'/{{z}}/{{x}}/{{y}}.png?access_token='
'pk.eyJ1IjoiZGlnaXRhbGdsb2JlIiwiYSI6ImNpaHhtenBmZjAzYW1'
'1a2tvY2p3MnpjcGcifQ.vF1gH0mGgK31yeHC1k1Tqw'
)

LEAFLET_CONFIG = {
'TILES': [('OpenStreetMap',
'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
{'attribution':
_('Map data &copy; <a href="http://openstreetmap.org">'
'OpenStreetMap</a> contributors, '
'<a href="http://creativecommons.org/licenses/by-sa/2.0/">'
'CC-BY-SA</a>'),
'maxZoom': 19}),
('DigitalGlobe Satellite',
'https://{s}.tiles.mapbox.com/v4/digitalglobe.nal0g75k'
'/{z}/{x}/{y}.png?access_token='
'pk.eyJ1IjoiZGlnaXRhbGdsb2JlIiwiYSI6ImNpaHhtenBmZjAzYW1'
'1a2tvY2p3MnpjcGcifQ.vF1gH0mGgK31yeHC1k1Tqw',
{'attribution': 'DigitalGlobe',
'maxZoom': 22})],
'TILES': [
(
"OpenStreetMap",
'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
{'attribution': OSM_ATTRIBUTION,
'maxZoom': 19}
),
(
"Vivid Imagery",
DIGITALGLOBE_TILESET_URL_FORMAT.format('n6ngnadl'),
{'attribution': DIGITALGLOBE_ATTRIBUTION,
'maxZoom': 22}
),
(
"Recent Imagery",
DIGITALGLOBE_TILESET_URL_FORMAT.format('nal0g75k'),
{'attribution': DIGITALGLOBE_ATTRIBUTION,
'maxZoom': 22}
),
(
"Vivid Imagery with OpenStreetMap",
DIGITALGLOBE_TILESET_URL_FORMAT.format('n6nhclo2'),
{'attribution': (OSM_ATTRIBUTION, DIGITALGLOBE_ATTRIBUTION),
'maxZoom': 22}
),
(
"Recent Imagery with OpenStreetMap",
DIGITALGLOBE_TILESET_URL_FORMAT.format('nal0mpda'),
{'attribution': (OSM_ATTRIBUTION, DIGITALGLOBE_ATTRIBUTION),
'maxZoom': 22}
),
],
'RESET_VIEW': False,
'PLUGINS': {
'draw': {
Expand Down

0 comments on commit 978399d

Please sign in to comment.