Ei muokkausyhteenvetoa |
Ei muokkausyhteenvetoa |
||
| (17 välissä olevaa versiota samalta käyttäjältä ei näytetä) | |||
| Rivi 1: | Rivi 1: | ||
<includeonly> | <includeonly> | ||
<link rel="stylesheet" href="/scripts/ | <link rel="stylesheet" href="/scripts/ol-10/ol.css" type="text/css"> | ||
<script src="/scripts/ol-10/ol.js"></script> | |||
<link rel="stylesheet" href="/scripts/ol-ext/dist/ol-ext.min.css" type="text/css"> | <link rel="stylesheet" href="/scripts/ol-ext-10/dist/ol-ext.min.css" type="text/css"> | ||
<script src="/scripts/ol-ext/dist/ol-ext.min.js"></script> | <script src="/scripts/ol-ext-10/dist/ol-ext.min.js"></script> | ||
<script src="/scripts/proj4js/dist/proj4.js"></script> | <script src="/scripts/proj4js/dist/proj4.js"></script> | ||
<script src="/scripts/ | <script src="/scripts/jwol10js/jwol10.js?v=1"></script> | ||
<div class="jwMapContainer" style="height:<!--{$height|default: | <div class="jwMapContainer" style="height:<!--{$height|default:500px|escape:'html'}-->" > | ||
<div style="height: 100%; width: 100%; position: relative;" id="<!--{$id|default:CommonObsMap|escape:'html'}-->_container"></div> | <div style="height: 100%; width: 100%; position: relative;" id="<!--{$id|default:CommonObsMap|escape:'html'}-->_container"></div> | ||
</div> | </div> | ||
| Rivi 21: | Rivi 21: | ||
function <!--{$id|default:CommonObsMap|escape:'html'}-->_jQueryTest() { | function <!--{$id|default:CommonObsMap|escape:'html'}-->_jQueryTest() { | ||
if ( typeof window.jQuery == 'undefined' ) { | |||
setTimeout( function(){ <!--{$id|default:CommonObsMap|escape:'html'}-->_jQueryTest() }, 300); | |||
} else { | |||
<!--{$id|default:CommonObsMap|escape:'html'}-->_func(); | |||
} | |||
} | } | ||
setTimeout( function(){ <!--{$id|default:CommonObsMap|escape:'html'}-->_jQueryTest() }, 300); | setTimeout( function(){ <!--{$id|default:CommonObsMap|escape:'html'}-->_jQueryTest() }, 300); | ||
function <!--{$id|default:CommonObsMap|escape:'html'}-->_func() { | function <!--{$id|default:CommonObsMap|escape:'html'}-->_func() { | ||
| Rivi 36: | Rivi 36: | ||
var page = '<!--{$page|escape:'urlpathinfo'}-->'; | var page = '<!--{$page|escape:'urlpathinfo'}-->'; | ||
var container = '<!--{$id|default:CommonObsMap|escape:'html'}-->_container'; | |||
if ( '<!--{$hero|default:false|escape:'html'}-->' == 'true' ) { | |||
memo.hero = true; | |||
container = jQuery( '.hero-container' ).attr( 'id' ); | |||
jQuery( '.hero-container' ).addClass( 'hero-map' ); | |||
jQuery( '.hero-container' ).removeClass( 'hero-empty' ); | |||
jQuery ( '#' + container ).css( 'border-bottom', '1px solid #e4e3de' ); | |||
} else { | |||
memo.hero = false; | |||
} | |||
function gotCoords(request) { | function gotCoords(request) { | ||
| Rivi 65: | Rivi 76: | ||
for (li in lakeNrArr) { | for (li in lakeNrArr) { | ||
if (searchForLakes.length > 0) { searchForLakes += ' OR '; } | if (searchForLakes.length > 0) { searchForLakes += ' OR '; } | ||
searchForLakes += " | searchForLakes += "jarvinro=" + lakeNrArr[li]; | ||
} | } | ||
| Rivi 87: | Rivi 98: | ||
'zoomToExtent': false | 'zoomToExtent': false | ||
}); | }); | ||
lakelayer = { | |||
'type': 'lake', | 'type': 'lake', | ||
'name': 'Järvi', | 'name': 'Järvi', | ||
| Rivi 98: | Rivi 109: | ||
'selectable': false, | 'selectable': false, | ||
'zoomToExtent': true | 'zoomToExtent': true | ||
}); | }; | ||
if ( memo.hero ) { lakelayer.padding = [ 50, 50, 100, 50 ]; } | |||
layersArr.push( lakelayer ); | |||
layersArr.push({ | layersArr.push({ | ||
'type': 'syvyysalue', | 'type': 'syvyysalue', | ||
| Rivi 126: | Rivi 140: | ||
'name': 'Paikat ja havainnot', | 'name': 'Paikat ja havainnot', | ||
'siteSearch': "[[Alue::" + decodeURI(page) + "]]", | 'siteSearch': "[[Alue::" + decodeURI(page) + "]]", | ||
'obsSearch': "[[Alue::" + decodeURI(page) + "]][[obsCode::ice||snow||temp||alg]]", | 'obsSearch': "[[Alue::" + decodeURI(page) + "]][[obsCode::ice||snow||temp||alg||secchi]]", | ||
'vesifi': false, | |||
'obsDays': 10, | 'obsDays': 10, | ||
//'attribution': 'Paikat ja havainnot: Järvi-meriwiki', | //'attribution': 'Paikat ja havainnot: Järvi-meriwiki', | ||
| Rivi 134: | Rivi 149: | ||
}); | }); | ||
// | |||
// do the base map with these settings | |||
jQuery ( '#' + container ).animate( { height: <!--{$height|default:500|escape:'html'}--> }, 100, function() { | |||
var map = jwMakeMap({ | |||
'container': container, //'<!--{$id|default:CommonObsMap|escape:'html'}-->_container', | |||
'base': base, | |||
'lon': lon, | |||
'lat': lat, | |||
'zoom': zoom, | |||
'layers': layersArr, | |||
'memo': memo | |||
}); | }); | ||
} ); | |||


