Ei muokkausyhteenvetoa |
Ei muokkausyhteenvetoa |
||
(31 välissä olevaa versiota samalta käyttäjältä ei näytetä) | |||
Rivi 17: | Rivi 17: | ||
setTimeout( <!--{$id|default:CardMap|escape:'html'}-->_jQueryTest, 300); | setTimeout( <!--{$id|default:CardMap|escape:'html'}-->_jQueryTest, 300); | ||
function <!--{$id|default:CardMap|escape:'html'}-->_func() { | function <!--{$id|default:CardMap|escape:'html'}-->_func() { | ||
if ( typeof window.jwcardmap == 'undefined' ) { | if ( typeof window.jwcardmap == 'undefined' ) { | ||
Rivi 23: | Rivi 23: | ||
window.jwcardmap = {}; | window.jwcardmap = {}; | ||
loadCSS( "//www.jarviwiki.fi/scripts/ol-10/ol.css" ); | |||
loadCSS( "//www.jarviwiki.fi/scripts/ol-ext-10/dist/ol-ext.min.css" ); | |||
var lc = 0; | |||
if ( typeof window.ol == 'undefined' ) { | |||
lc++; | |||
jQuery.getScript( "/scripts/ol-10/ol.js", function() { | |||
jQuery.getScript( "/scripts/ol-ext-10/dist/ol-ext.min.js", function() { | |||
jQuery.getScript( '/scripts/proj4js/dist/proj4.js', function() { | |||
jQuery.getScript( '/scripts/jwol10js/jwol10.js', function() { | |||
<!--{$id|default:CardMap|escape:'html'}-->ldone(); | |||
}); | |||
}); | |||
}); | |||
}); | |||
} | |||
<!--{$id|default:CardMap|escape:'html'}-->ldone(); | |||
function <!--{$id|default:CardMap|escape:'html'}-->ldone() { | |||
lc--; | |||
if ( lc < 0 ) { | |||
<!--{$id|default:CardMap|escape:'html'}-->allReady(); | |||
} | |||
} | |||
} | } | ||
} | } | ||
function <!--{$id|default:CardMap|escape:'html'}-->allReady() { | function <!--{$id|default:CardMap|escape:'html'}-->allReady() { | ||
var height = "<!--{$height|default:144px|escape:'html'}-->"; | |||
var c=0; | var c=0; | ||
Rivi 47: | Rivi 60: | ||
c++; | c++; | ||
var id = 'jwLakeCardMap_' + c.toString(); | var id = 'jwLakeCardMap_' + c.toString(); | ||
window.jwcardmap[ id ] = { memo: {} }; | window.jwcardmap[ id ] = { memo: { g: { 'sizeFactor': 1.5, 'lang': "<!--{$lang|default:fi|escape:'html'}-->" } } }; | ||
jQuery( this ).prop( 'id', id ); | jQuery( this ).prop( 'id', id ); | ||
jQuery ( this ).height( | jQuery ( this ).height( parseInt( height ) ); | ||
var page = jQuery( this ).attr( 'data-lake' ); | var page = jQuery( this ).attr( 'data-lake' ); | ||
var obs = '-'; if ( typeof jQuery( this ).attr( 'data-obs' ) != 'undefined' ) { obs = jQuery( this ).attr( 'data-obs' ); }; | |||
var searchStr = 'action=ask&query=[[' + page + ']]'; | var searchStr = 'action=ask&query=[[' + page + ']]'; | ||
Rivi 97: | Rivi 111: | ||
//'attribution': '<a href="//wwwp2.ymparisto.fi/kayttoehdot.html">Ympäristöhallinnon paikkatietoaineistot</a>', | //'attribution': '<a href="//wwwp2.ymparisto.fi/kayttoehdot.html">Ympäristöhallinnon paikkatietoaineistot</a>', | ||
'visible': true, | 'visible': true, | ||
'fillColor': 'rgba( 100, 193, 203, 0.75 )', | |||
'strokeColor': 'rgba( 0, 96, 133, 1 )', | |||
'opacitySlider': true, | 'opacitySlider': true, | ||
'showLabels': false, | 'showLabels': false, | ||
'selectable': false, | 'selectable': false, | ||
'zoomToExtent': true | 'zoomToExtent': true, | ||
'padding': [ 20, 20, 20, 20 ] | |||
}); | }); | ||
if ( obs != '-' ) { | |||
layersArr.push({ | |||
'type': 'sitesNobses', | |||
'name': 'Havainnot', | |||
'obsSearch': "[[Alue::" + decodeURI(page) + "]][[ObsCode::" + obs + "]]", | |||
'obsDays': 7, | |||
'clustered': false, | |||
'attribution': 'Havainnot: Järvi-meriwiki', | |||
'selectable': false | |||
}); | |||
} | |||
var map = jwMakeMap({ | var map = jwMakeMap({ | ||
'container': id, | 'container': id, | ||
'base': ' | 'base': 'none', | ||
'nointeraction': true, | |||
'lon': 25, | 'lon': 25, | ||
'lat': 65, | 'lat': 65, |