[OpenLayers-Users] Programatically Select a Feature

Arnd Wippermann arnd.wippermann at web.de
Wed Jan 21 13:52:06 EST 2009


Hi,

With the Select Control I do it this way:

ctrlSelectFeatures = new OpenLayers.Control.SelectFeature(...

ctrlSelectFeatures.select(vlyr.features[idx]);
 
The reference to the feature have to come from your select box. 
An example for the Select Control can be seen here:

http://gis.ibbeck.de/ginfo/apps/OLExamples/OL26/examples/select-feature-with
-function.html

Arnd Wippermann

-----Ursprüngliche Nachricht-----
Von: users-bounces at openlayers.org [mailto:users-bounces at openlayers.org] Im
Auftrag von Dizzle
Gesendet: Mittwoch, 21. Januar 2009 15:54
An: users at openlayers.org
Betreff: [OpenLayers-Users] Programatically Select a Feature


I have a modify control on a map, and there are multiple features on that
map.  I also have an associated option for each feature in a select box on
the page.  When the user changes the select box, I'm having trouble figuring
out how to automatically select that feature on the map for use by the
modify feature control.  Am I missing something, or is this not possible? 
Thanks.

- Dom
--
View this message in context:
http://n2.nabble.com/Programatically-Select-a-Feature-tp2192485p2192485.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.

_______________________________________________
Users mailing list
Users at openlayers.org
http://openlayers.org/mailman/listinfo/users




More information about the Users mailing list