Ei muokkausyhteenvetoa |
Ei muokkausyhteenvetoa |
||
| (3 välissä olevaa versiota samalta käyttäjältä ei näytetä) | |||
| 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|default:yes|escape:'html'}-->" ); | //console.log( "<!--{$obstypebar|default:yes|escape:'html'}-->" ); | ||
console.log( obstypebar ); | //console.log( obstypebar ); | ||
layersArr.push({ | layersArr.push({ | ||


