Skip to content

Commit d5851ca

Browse files
committed
remove last baselayer and add topolayer
1 parent d2d1959 commit d5851ca

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

themes/mapmint/static/js/home2.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ var gsat, gmap, gphy, ghyb, streetlayer;
44
var baseOSM, osm, OSMgs;
55
var cycle;
66
var stamenLayer;
7+
var topoLayer;
78

89
function init() {
910
if (!OpenLayers.CANVAS_SUPPORTED) {
@@ -35,6 +36,13 @@ function init() {
3536
controls: []
3637
});
3738

39+
topoLayer = new OpenLayers.Layer.XYZ("OpenTopoMap", [
40+
"https://c.tile.opentopomap.org/{z}/{x}/{y}.png"
41+
], {
42+
attribution: "Tiles &copy; <a href='https://opentopomap.org/'>OpenTopoMap</a> (CC-BY-SA)",
43+
isBaseLayer: true
44+
});
45+
3846
baseOSM = new OpenLayers.Layer.TMS("MapQuest", "http://otile1.mqcdn.com/tiles/1.0.0/osm/", {
3947
type: 'png',
4048
getURL: osm_getTileURL,
@@ -67,7 +75,7 @@ function init() {
6775
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>"
6876
} );
6977

70-
map.addLayers([OSMgs/*,baseOSM,gmap,gphy, gsat, ghyb*/,osm, stamenLayer]);
78+
map.addLayers([OSMgs, osm, topoLayer]);
7179

7280
var attr = new OpenLayers.Control.Attribution();
7381
map.addControl(attr);

0 commit comments

Comments
 (0)