Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change OpenMapSurfer_Roads basemap to terrain #537

Merged
merged 3 commits into from
Mar 27, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions templates/geosafe/analysis/create_base.html
Original file line number Diff line number Diff line change
Expand Up @@ -526,21 +526,23 @@ <h4 class="modal-title" id="myModalLabel">{% trans "Upgrade Your Browser" %}</h4

check_popover();

var OpenMapSurfer_Roads = L.tileLayer('http://korona.geog.uni-heidelberg.de/tiles/roads/x={x}&y={y}&z={z}', {
zIndex: 0,
noWrap: true,
attribution: 'Imagery from <a href="http://giscience.uni-hd.de/">GIScience Research Group @ University of Heidelberg</a> &mdash; Map data &copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'
var Terrain = L.tileLayer('http://a.tile.stamen.com/terrain/{z}/{x}/{y}.png', {
maxZoom: 20,
attribution: 'Map tiles by <a href="http://stamen.com">Stamen Design</a>' +
'<a href="http://creativecommons.org/licenses/by/3.0"> CC BY 3.0</a>&mdash; ' +
'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>'
});
var osm = L.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
var osm = L.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
var default_basemap = L.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {

zIndex: 0,
attribution: '&copy; <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
});
var base_maps = {
'OpenMapSurfer_Roads': OpenMapSurfer_Roads,
'Terrain': Terrain,
'OpenStreetMap': osm
};
map = L.map('map', {
layers: [OpenMapSurfer_Roads],
layers: [osm],
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
layers: [osm],
layers: [default_basemap],

minZoom: 4
});

Expand Down
11 changes: 7 additions & 4 deletions templates/geosafe/analysis/detail_base.html
Original file line number Diff line number Diff line change
Expand Up @@ -226,11 +226,14 @@ <h3 class="panel-title">{% trans "Action" %}</h3>
subdomains: '1234'
});

var OpenMapSurfer_Roads = L.tileLayer('http://korona.geog.uni-heidelberg.de/tiles/roads/x={x}&y={y}&z={z}', {
noWrap: true,
attribution: 'Imagery from <a href="http://giscience.uni-hd.de/">GIScience Research Group @ University of Heidelberg</a> &mdash; Map data &copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'
var Terrain = L.tileLayer('http://a.tile.stamen.com/terrain/{z}/{x}/{y}.png', {
maxZoom: 20,
attribution: 'Map tiles by <a href="http://stamen.com">Stamen Design</a>' +
'<a href="http://creativecommons.org/licenses/by/3.0"> CC BY 3.0</a>&mdash; ' +
'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>'
});
map.addLayer(OpenMapSurfer_Roads);
map.addLayer(osm);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
map.addLayer(osm);
map.addLayer(default_basemap);

var exposure_layer = [];
var hazard_layer = [];
var aggregation_layer = [];
Expand Down