-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
move leaflet settings to separate config file
related issue: rl-institut/WAM#74
- Loading branch information
Showing
2 changed files
with
41 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Leaflet config: variable "LEAFLET_CONFIG" moved from settings.py to here | ||
# since it conflicts with other apps using django-leaflet package. | ||
# The leaflet config is now served via views.MapView() (uses settings override | ||
# feature of django-leaflet) | ||
# Related issue: https://github.com/rl-institut/WAM/issues/74 | ||
|
||
LEAFLET_CONFIG = { | ||
'TILES': [('Streets', 'https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token=pk.eyJ1IjoibWFwYm94IiwiYSI6ImNpejY4NXVycTA2emYycXBndHRqcmZ3N3gifQ.rJcFIG214AriISLbB6B5aw', | ||
{'attribution': '© <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, <a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>', | ||
'id': 'mapbox.streets', | ||
'minZoom': 9, | ||
'maxZoom': 12, | ||
} | ||
), | ||
('OSM B&W', 'http://{s}.www.toolserver.org/tiles/bw-mapnik/{z}/{x}/{y}.png', | ||
{'attribution': '© <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, <a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>', | ||
'minZoom': 9, | ||
'maxZoom': 12, | ||
} | ||
), | ||
('OSM', 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', | ||
{'attribution': '© <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, <a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>', | ||
'minZoom': 9, | ||
'maxZoom': 12, | ||
}), | ||
('OpenTopoMap', 'http://{s}.tile.opentopomap.org/{z}/{x}/{y}.png', | ||
{'attribution': 'Data: © <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, Display: © <a href="http://opentopomap.org">OpenTopoMap</a> <a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>', | ||
'minZoom': 9, | ||
'maxZoom': 12, | ||
}) | ||
], | ||
'DEFAULT_CENTER': (51.834167, 12.237778), | ||
'DEFAULT_ZOOM': 10, | ||
'RESET_VIEW': False, | ||
'NO_GLOBALS': False | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters