first you need a selectControl, which you must if you can select a shape
via mouse click:
selectControl = new OL.Control.SelectFeature(vectorLayer,{})
then later when you need to select a certain feature:
selectControl.select(feature);________________________________ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Luciano - Uol Sent: Thursday, October 02, 2008 11:10 AM To: [email protected] Subject: Re: [OpenLayers-Users] Selecting a polygon without mouse Hi All, Completing the e-mail above, i think i can't select a polygon without clicking a mouse, i think i can do this altering the style. How can i alter a style of a polygon? See the images. The images show a blue polygon after i click it, how can i do this with a event like a combo onchange? Luciano Luciano - Uol escreveu: Hi All, Is there any way I select a polygon without clicking with the mouse? For example, selecting an item from a combo? Sds, Luciano. _______________________________________________ Users mailing list [email protected] http://openlayers.org/mailman/listinfo/users ________________________________ No virus found in this incoming message. Checked by AVG - http://www.avg.com Version: 8.0.173 / Virus Database: 270.7.5/1703 - Release Date: 2/10/2008 07:46
<<tela.jpg>>
_______________________________________________ Users mailing list [email protected] http://openlayers.org/mailman/listinfo/users
