Ei muokkausyhteenvetoa |
Ei muokkausyhteenvetoa |
||
| Rivi 39: | Rivi 39: | ||
var page = '<!--{$page|escape:'html'}-->'; | var page = '<!--{$page|escape:'html'}-->'; | ||
var short = '<!--{$short|escape:'html'}-->'; | var short = '<!--{$short|escape:'html'}-->'; | ||
var base = '<!--{$base|default:mmlTausta|escape:'html'}-->'; | var base = '<!--{$base|default:mmlTausta|escape:'html'}-->'; | ||
| Rivi 55: | Rivi 54: | ||
'zoomToExtent': true, | 'zoomToExtent': true, | ||
'bbox': false, | 'bbox': false, | ||
'attribution': 'Maakuntarajat: Tilastokeskus', | |||
}); | |||
var searchStr = 'action=ask&query=[[Luokka:Kunta]][[Maakunta::' + page + ']]'; | |||
//searchStr += encodeURI('mero|?JarviNro'); | |||
searchStr += '&format=json'; | |||
jQuery.ajax({ | |||
type: 'GET', | |||
url: queryApi, | |||
data: searchStr, | |||
success: gotMunis, | |||
dataType: 'jsonp', | |||
cache: true | |||
}); | }); | ||
function gotMunis( req ) { | |||
console.log( req ); | |||
} | |||
/* | |||
layersArr.push( { | layersArr.push( { | ||
'id': 'muni', | 'id': 'muni', | ||
| Rivi 71: | Rivi 87: | ||
//'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>', | ||
}); | }); | ||
*/ | |||
/* layersArr.push( { | |||
'id': 'muni', | |||
'type': 'anygeo', | |||
'name': 'Kunta', | |||
'restUrl': '//inspire-wfs.maanmittauslaitos.fi/inspire-wfs/au', | |||
'layer': 'au:AdministrativeUnit', | |||
'cql_filter': "nationalCode=%27" + muniNameToNumber( muni ) + "%27", | |||
'selectable': false, | |||
'zoomToExtent': true, | |||
'bbox': false, | |||
'fillColor': 'rgba( 0, 0, 0, 0 )', | |||
'strokeColor': 'rgba( 200, 100, 100, 0.5 )', | |||
'strokeWidth': 5 | |||
'attribution': 'Kuntarajat: Maanmittauslaitos', | |||
}); | |||
*/ | |||
layersArr.push( { | layersArr.push( { | ||
'type': 'jwanypage', | 'type': 'jwanypage', | ||


