javagwt-openlayers

How can I programmatically select a VectorFeature in GWT-OpenLayers?


The javascript version provides OpenLayers.Control.SelectFeature.select, but the Java/GWT version does not.

Thanks.


Solution

  • You can see how to do selections in this example

    Click on the "View source" button to get the source code.

    To make the selection programmatically you can do:

    SelectFeature programmaticallySelectFeature = new SelectFeature(layer);
    programmaticallySelectFeature.select(feature);