Hi All,
When I draw a polygon in a map, i put this id in a combobox, i would
like to know how can i choose an item from combobox and automaticaly
make the polygon selected?
I know how to select the polygon clicking there.
See my code:
// after create a polygon, put this id a combobox
function onFeatureAdded(feature){
idVetor = feature.id.split("_")[1];
tpVetor = feature.geometry.toString().split("(")[0];
with (document.f1.poligonos) {
options[options.length] = new Option (tpVetor + " " + idVetor,
feature.id);
}
}
function selecionaPoligono(vetor){
alert(vetor);
// the code i want comes here.
}
//HTML Code - here i'll put the vector
<select name="poligonos" onchange="selecionaPoligono(this.value)">
<option value="null">Selecione um polĂgono</option>
</select>
Thanks, Luciano.
_______________________________________________
Users mailing list
[email protected]
http://openlayers.org/mailman/listinfo/users