-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #53 from rl-institut/hotfix/leaflet-config
Fix leaflet config interference
- Loading branch information
Showing
4 changed files
with
43 additions
and
35 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', | ||
'maxZoom': 100, | ||
'minZoom': 9, | ||
} | ||
), | ||
('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, | ||
} | ||
), | ||
('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, | ||
}), | ||
('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, | ||
}) | ||
], | ||
# Germany center (center = long/2 and lat/2) | ||
'DEFAULT_CENTER': (53.4554, 9.6211), | ||
'DEFAULT_ZOOM': 10, | ||
'MIN_ZOOM': 3, | ||
'MAX_ZOOM': 1000, | ||
'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
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
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