Ero sivun ”Widget:Ol3RiverMap” versioiden välillä
Järvi-meriwikistä
Rivi 42: | Rivi 42: | ||
function gotCoords(request) { | function gotCoords(request) { | ||
− | for ( var x in request.query.results ) { | + | for ( var x in request.query.results ) { |
var resultItem = request.query.results[x].printouts; break; | var resultItem = request.query.results[x].printouts; break; | ||
} | } | ||
Rivi 52: | Rivi 52: | ||
//var zoom = parseInt(resultItem.Zoom[0]); | //var zoom = parseInt(resultItem.Zoom[0]); | ||
//var riverIdArr = resultItem.jokiNro; | //var riverIdArr = resultItem.jokiNro; | ||
− | var jokiNroArr = resultItem.JokiNro; | + | |
+ | var jokiNroArr = []; | ||
+ | for ( var j in resultItem.JokiNro ) { | ||
+ | jokiNroArr.push( 'jokiNro=' + resultItem.JokiNro[j] ); | ||
+ | } | ||
+ | |||
//var vesalIdObj = {}; | //var vesalIdObj = {}; | ||
var base = 'mmlTausta'; | var base = 'mmlTausta'; | ||
console.log( jokiNroArr.join( ' OR ' ) ); | console.log( jokiNroArr.join( ' OR ' ) ); | ||
− | |||
− | |||
− | |||
var layersArr = []; | var layersArr = []; |