Ei muokkausyhteenvetoa |
Ei muokkausyhteenvetoa |
||
| (6 välissä olevaa versiota samalta käyttäjältä ei näytetä) | |||
| Rivi 44: | Rivi 44: | ||
var days = parseInt('<!--{$days|default:365|escape:'html'}-->'); | var days = parseInt('<!--{$days|default:365|escape:'html'}-->'); | ||
var pointradius = parseInt('<!--{$pointradius|default:6|escape:'html'}-->'); | var pointradius = parseInt('<!--{$pointradius|default:6|escape:'html'}-->'); | ||
var obstypebar = ( | var obstypebar = ( "<!--{$obstypebar|default:yes|escape:'html'}-->" == "yes" ); | ||
var zoomto = ("<!--{$zoomto|default:false|escape:'html'}-->" == "true"); | var zoomto = ("<!--{$zoomto|default:false|escape:'html'}-->" == "true"); | ||
var simplepoints = ("<!--{$simplepoints|default:false|escape:'html'}-->" == "true"); | var simplepoints = ("<!--{$simplepoints|default:false|escape:'html'}-->" == "true"); | ||
| Rivi 50: | Rivi 50: | ||
var vesifi = ( "<!--{$vesifi|default:yes|escape:'html'}-->" == "yes" ); | var vesifi = ( "<!--{$vesifi|default:yes|escape:'html'}-->" == "yes" ); | ||
var mapbg = "<!--{$mapbg|default:x|escape:'html'}-->"; | var mapbg = "<!--{$mapbg|default:x|escape:'html'}-->"; | ||
var muni = "<!--{$muni|default:x|escape:'html'}-->"; | var muni = "<!--{$muni|default:x|escape:'html'}-->"; | ||
var muniA = muni.split( ',' ); | |||
for ( var mi in muniA ) { | |||
muniA[mi] = 'nationalCode=%27' + muniNameToNumber( muniA[mi].trim() ) + '%27'; | |||
} | |||
var layersArr = []; | var layersArr = []; | ||
if (mapbg == 'muni' ) { | if ( mapbg == 'muni' ) { | ||
console.log( muniA ); | |||
layersArr.push( { | layersArr.push( { | ||
'id': 'muni', | 'id': 'muni', | ||
'type': ' | 'type': 'anygeo', | ||
'name': 'Kunta', | 'name': 'Kunta', | ||
'restUrl': '// | 'restUrl': '//inspire-wfs.maanmittauslaitos.fi/inspire-wfs/au', | ||
' | 'layer': 'au:AdministrativeUnit', | ||
'cql_filter': muniA.join( '%20OR%20' ), | |||
'selectable': false, | 'selectable': false, | ||
'zoomToExtent': true, | 'zoomToExtent': true, | ||
'bbox': false, | 'bbox': false, | ||
'fillColor': 'rgba( 0, 0, 0, 0 | 'fillColor': 'rgba( 0, 0, 0, 0 )', | ||
'strokeColor': 'rgba( | 'strokeColor': 'rgba( 200, 100, 100, 0.5 )', | ||
'strokeWidth': 5 | 'strokeWidth': 5 | ||
//'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>', | ||
}); | }); | ||
} | } | ||
console.log( obstypebar ); | |||
//console.log( "<!--{$obstypebar|default:yes|escape:'html'}-->" ); | |||
//console.log( obstypebar ); | |||
layersArr.push({ | layersArr.push({ | ||
| Rivi 83: | Rivi 90: | ||
'selectable': true, | 'selectable': true, | ||
'obstypebar': obstypebar, | 'obstypebar': obstypebar, | ||
'clustered': cluster, | |||
'pointRadius': pointradius, | |||
'simplepoints': simplepoints, | |||
'vesifi': vesifi, | 'vesifi': vesifi, | ||
'zoomToExtent': zoomto | 'zoomToExtent': zoomto | ||


