Skip to content

Commit 5400fc8

Browse files
committed
updated 2 more layers
1 parent 85da58f commit 5400fc8

File tree

2 files changed

+32
-18
lines changed

2 files changed

+32
-18
lines changed

themes/mapmint/layouts/_default/home.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@ <h1 class="msg">fast <span class="colored">&</span> easy <span class="colored">w
4040
<div class="qst"></div>
4141
<div class="map0"><a href="#" class="zero" onclick="map.setBaseLayer(osm);"></a></div>
4242
<div class="map1"><a href="#" class="one" onclick="map.setBaseLayer(cyclOSMLayer);"></a></div>
43-
<div class="map2"><a href="#" class="two" onclick="map.setBaseLayer(humanOSMLayer);"></a></div>
44-
<div class="map3"><a href="#" class="three" onclick="map.setBaseLayer(transportOSMLayer);"></a></div>
45-
<div class="map4"><a href="#" class="four" onclick="map.setBaseLayer(topoLayer);"></a></div>
46-
<div class="map5"><a href="#" class="five" onclick="map.setBaseLayer(stamenWatercolorLayer);"></a></div>
43+
<div class="map2"><a href="#" class="two" onclick="map.setBaseLayer(OSMgs);"></a></div>
44+
<div class="map3"><a href="#" class="three" onclick="map.setBaseLayer(humanOSMLayer);"></a></div>
45+
<div class="map4"><a href="#" class="four" onclick="map.setBaseLayer(positronLayer);"></a></div>
46+
<div class="map5"><a href="#" class="five" onclick="map.setBaseLayer(topoLayer);"></a></div>
4747
</div>
4848
</div>
4949
</div>

themes/mapmint/static/js/home2.js

Lines changed: 28 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ var cycle;
66
var topoLayer;
77
var cyclOSMLayer;
88
var humanOSMLayer;
9-
9+
var positronLayer;
1010

1111

1212
function init() {
@@ -39,28 +39,43 @@ function init() {
3939
controls: []
4040
});
4141

42-
topoLayer = new OpenLayers.Layer.OSM(
42+
43+
positronLayer = new OpenLayers.Layer.XYZ(
44+
"CartoDB Positron",
45+
[
46+
"http://a.basemaps.cartocdn.com/light_all/${z}/${x}/${y}.png",
47+
"http://b.basemaps.cartocdn.com/light_all/${z}/${x}/${y}.png",
48+
"http://c.basemaps.cartocdn.com/light_all/${z}/${x}/${y}.png",
49+
"http://d.basemaps.cartocdn.com/light_all/${z}/${x}/${y}.png"
50+
],
51+
{
52+
attribution: "Data by <a href='http://carto.com/attributions'>CARTO</a> (CC-BY-SA)",
53+
isBaseLayer: true,
54+
}
55+
);
56+
57+
topoLayer = new OpenLayers.Layer.XYZ(
4358
"OpenTopoMap",
4459
[
4560
"http://a.tile.opentopomap.org/${z}/${x}/${y}.png",
4661
"http://b.tile.opentopomap.org/${z}/${x}/${y}.png",
4762
"http://c.tile.opentopomap.org/${z}/${x}/${y}.png"
4863
],
4964
{
50-
attribution: "Tiles &copy; <a href='http://opentopomap.org/'>OpenTopoMap</a> (CC-BY-SA)",
65+
attribution: "Data by <a href='http://opentopomap.org/'>OpenTopoMap</a> (CC-BY-SA)",
5166
isBaseLayer: true
5267
}
5368
);
5469

55-
cyclOSMLayer = new OpenLayers.Layer.OSM(
70+
cyclOSMLayer = new OpenLayers.Layer.XYZ(
5671
"CyclOSM",
5772
[
5873
"http://a.tile-cyclosm.openstreetmap.fr/cyclosm/${z}/${x}/${y}.png",
5974
"http://b.tile-cyclosm.openstreetmap.fr/cyclosm/${z}/${x}/${y}.png",
6075
"http://c.tile-cyclosm.openstreetmap.fr/cyclosm/${z}/${x}/${y}.png"
6176
],
6277
{
63-
attribution: "Tiles © <a href='http://www.cyclosm.org/'>CyclOSM</a>, OpenStreetMap contributors",
78+
attribution: "Data by <a href='http://www.cyclosm.org/'>CyclOSM</a>, (CC-BY-SA)",
6479
isBaseLayer: true
6580
}
6681
);
@@ -73,20 +88,19 @@ function init() {
7388
"http://tile-c.openstreetmap.fr/hot/${z}/${x}/${y}.png"
7489
],
7590
{
76-
attribution: "Tiles © <a href='http://www.openstreetmap.org/'>OpenStreetMap</a>, Humanitarian style",
91+
attribution: "Data by <a href='http://www.openstreetmap.org/'>OpenStreetMap</a>, Humanitarian style",
7792
isBaseLayer: true
7893
}
7994
);
8095

8196

82-
8397
osm = new OpenLayers.Layer.OSM({
8498
attribution: "Data by <a href='http://www.openstreetmap.org/' target='_blank'>Open Street Map</a>,<a href='http://www.openstreetmap.org/' target='_blank'>OpenStreetMap</a> contributors, <a href='http://creativecommons.org/licenses/by-sa/2.0/' target='_blank'>CC-BY-SA</a>"
8599
} );
86100

87101

88-
map.addLayers([osm, cyclOSMLayer, humanOSMLayer, topoLayer]);
89-
map.setBaseLayer(cyclOSMLayer);
102+
map.addLayers([OSMgs, positronLayer, osm, cyclOSMLayer, humanOSMLayer, topoLayer]);
103+
map.setBaseLayer(OSMgs);
90104

91105

92106
var attr = new OpenLayers.Control.Attribution();
@@ -215,19 +229,19 @@ setTimeout(function() {
215229
$(".map0").animate({opacity:1, marginLeft:'74%', marginTop:'-200px', zIndex:'1'}, 1000, function() {
216230
map.setBaseLayer(osm);
217231
$(".map1").animate({opacity:1, marginLeft: '67%', marginTop:'-200px', zIndex:'1'}, 2000, function() {
218-
map.setBaseLayer(baseOSM);
232+
map.setBaseLayer(cyclOSMLayer);
219233
$('.endmess').fadeIn(1000);
220234
$(".map2").animate({opacity:1, marginLeft: '74%', marginTop:'-110px', zIndex:'1'}, 2000, function() {
221-
map.setBaseLayer(gmap);
235+
map.setBaseLayer(OSMgs);
222236
$(".map3").animate({opacity:1, marginLeft: '67%', marginTop:'-110px', zIndex:'1'}, 2000, function() {
223-
map.setBaseLayer(gphy);
237+
map.setBaseLayer(humanOSMLayer);
224238
$(".anim").css({"background" : "url(../../images/pasaconh.png) no-repeat"});
225239
$('.endmess').fadeOut(1000);
226240
$(".map4").animate({opacity:1, marginLeft: '74%', marginTop:'-20px', zIndex:'1'}, 2000, function() {
227-
map.setBaseLayer(stamenLayer);
241+
map.setBaseLayer(positronLayer);
228242
$(".map5").animate({opacity:1, marginLeft: '67%', marginTop:'-16px', zIndex:'1'}, 2000, function() {
229243
$(".hand, .hand2").fadeOut(2000);
230-
map.setBaseLayer(gsat);
244+
map.setBaseLayer(topoLayer);
231245
$(".map5").toggleClass("rt");
232246
$(".anim").css({"background" : "transparent"});
233247
$('.anim').append('<div class="btmblk"><h1 class="tour"><a href="../en/Tour">Take a tour.</a></h1></div>');

0 commit comments

Comments
 (0)