You must iterate over the options of #destSelect and create a IN()
-condition based on the values of these options:
function changeMap_0() {
var query={
select: "'geometry'",
from: "1xDlCWWj4WMCadzaua5bBss3UNLprGCnsS3H4vt0"
},
values=[],
options=document.getElementById('destSelect').options;
if(!options.length){
//no options added, remove the layer
//and leave the function
layer_0.setMap(null);
return;
}
//collect the values
for(var i =0;i<options.length;++i){
values.push(options[i].value.replace(/'/g, "\\'"));
}
//create where-clause
query.where="'Well Name' IN('"+values.join("','")+"')";
//set the options
layer_0.setOptions({query:query,map:map});
}