@@ -3,8 +3,11 @@ var lonlat;
33var gsat , gmap , gphy , ghyb , streetlayer ;
44var baseOSM , osm , OSMgs ;
55var cycle ;
6- var stamenLayer ;
76var topoLayer ;
7+ var cyclOSMLayer ;
8+ var humanOSMLayer ;
9+
10+
811
912function init ( ) {
1013 if ( ! OpenLayers . CANVAS_SUPPORTED ) {
@@ -36,46 +39,54 @@ function init() {
3639 controls : [ ]
3740 } ) ;
3841
39- topoLayer = new OpenLayers . Layer . XYZ ( "OpenTopoMap" , [
40- "http://c.tile.opentopomap.org/{z}/{x}/{y}.png"
41- ] , {
42- attribution : "Tiles © <a href='http://opentopomap.org/'>OpenTopoMap</a> (CC-BY-SA)" ,
43- isBaseLayer : true
44- } ) ;
45-
46- baseOSM = new OpenLayers . Layer . TMS ( "MapQuest" , "http://otile1.mqcdn.com/tiles/1.0.0/osm/" , {
47- type : 'png' ,
48- getURL : osm_getTileURL ,
49- displayOutsideMaxExtent : true ,
50- isBaseLayer : true ,
51- attribution : "Data by <a href='http://www.mapquest.com/' target='_blank'>MapQuest</a>, CC-BY-SA <a href='http://www.openstreetmap.org/' target='_blank'>Open Street Map</a>" ,
52- transitionEffect : "resize"
53- } ) ;
54-
55- stamenLayer = new OpenLayers . Layer . Stamen ( "watercolor" ) ;
56-
57- gphy = new OpenLayers . Layer . Google (
58- "Google Physical" ,
59- { type : google . maps . MapTypeId . TERRAIN }
60- ) ;
61- gmap = new OpenLayers . Layer . Google (
62- "Google Streets" , // the default
63- { numZoomLevels : 20 }
64- ) ;
65- ghyb = new OpenLayers . Layer . Google (
66- "Google Hybrid" ,
67- { type : google . maps . MapTypeId . HYBRID , numZoomLevels : 20 }
68- ) ;
69- gsat = new OpenLayers . Layer . Google (
70- "Google Satellite" ,
71- { type : google . maps . MapTypeId . SATELLITE , numZoomLevels : 22 }
72- ) ;
42+ topoLayer = new OpenLayers . Layer . OSM (
43+ "OpenTopoMap" ,
44+ [
45+ "http://a.tile.opentopomap.org/${z}/${x}/${y}.png" ,
46+ "http://b.tile.opentopomap.org/${z}/${x}/${y}.png" ,
47+ "http://c.tile.opentopomap.org/${z}/${x}/${y}.png"
48+ ] ,
49+ {
50+ attribution : "Tiles © <a href='http://opentopomap.org/'>OpenTopoMap</a> (CC-BY-SA)" ,
51+ isBaseLayer : true
52+ }
53+ ) ;
54+
55+ cyclOSMLayer = new OpenLayers . Layer . OSM (
56+ "CyclOSM" ,
57+ [
58+ "http://a.tile-cyclosm.openstreetmap.fr/cyclosm/${z}/${x}/${y}.png" ,
59+ "http://b.tile-cyclosm.openstreetmap.fr/cyclosm/${z}/${x}/${y}.png" ,
60+ "http://c.tile-cyclosm.openstreetmap.fr/cyclosm/${z}/${x}/${y}.png"
61+ ] ,
62+ {
63+ attribution : "Tiles © <a href='http://www.cyclosm.org/'>CyclOSM</a>, OpenStreetMap contributors" ,
64+ isBaseLayer : true
65+ }
66+ ) ;
67+
68+ humanOSMLayer = new OpenLayers . Layer . OSM (
69+ "HOT OSM" ,
70+ [
71+ "http://tile-a.openstreetmap.fr/hot/${z}/${x}/${y}.png" ,
72+ "http://tile-b.openstreetmap.fr/hot/${z}/${x}/${y}.png" ,
73+ "http://tile-c.openstreetmap.fr/hot/${z}/${x}/${y}.png"
74+ ] ,
75+ {
76+ attribution : "Tiles © <a href='http://www.openstreetmap.org/'>OpenStreetMap</a>, Humanitarian style" ,
77+ isBaseLayer : true
78+ }
79+ ) ;
7380
81+
7482 osm = new OpenLayers . Layer . OSM ( {
7583 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>"
7684 } ) ;
85+
86+
87+ map . addLayers ( [ osm , cyclOSMLayer , humanOSMLayer , topoLayer ] ) ;
88+ map . setBaseLayer ( cyclOSMLayer ) ;
7789
78- map . addLayers ( [ OSMgs , osm , topoLayer ] ) ;
7990
8091 var attr = new OpenLayers . Control . Attribution ( ) ;
8192 map . addControl ( attr ) ;
@@ -209,7 +220,7 @@ setTimeout(function() {
209220 map . setBaseLayer ( gmap ) ;
210221 $ ( ".map3" ) . animate ( { opacity :1 , marginLeft : '67%' , marginTop :'-110px' , zIndex :'1' } , 2000 , function ( ) {
211222 map . setBaseLayer ( gphy ) ;
212- $ ( ".anim" ) . css ( { "background" : "url(assets /images/pasaconh.png) no-repeat" } ) ;
223+ $ ( ".anim" ) . css ( { "background" : "url(../.. /images/pasaconh.png) no-repeat" } ) ;
213224 $ ( '.endmess' ) . fadeOut ( 1000 ) ;
214225 $ ( ".map4" ) . animate ( { opacity :1 , marginLeft : '74%' , marginTop :'-20px' , zIndex :'1' } , 2000 , function ( ) {
215226 map . setBaseLayer ( stamenLayer ) ;
0 commit comments