Commits

Lorenzo Amato committed d4246db

fixed Issue #20
------------

  • Participants
  • Parent commits c0a88da

Comments (0)

Files changed (2)

gwt-openlayers-client/src/main/java/org/gwtopenmaps/openlayers/client/control/SelectFeature.java

     }
     
     /**
+     * Add feature to the layerŐs selectedFeature array, render the feature as selected, and call the onSelect function.
+     * @param feature The feature to select
+     */
+    public void select(VectorFeature feature)
+    {
+        SelectFeatureImpl.select(this.getJSObject(), feature.getJSObject());
+    }
+
+    /**
      * Remove feature from the layer’s selectedFeature array, render the feature as normal, and call the onUnselect function.
      * @param feature The feature to unselect
      */
     {
         SelectFeatureImpl.unselect(this.getJSObject(), feature.getJSObject());
     }
-
+    
     /**
      *
      * Select and deselect a feature by clicking on it with the mouse.

gwt-openlayers-client/src/main/java/org/gwtopenmaps/openlayers/client/control/SelectFeatureImpl.java

  *
  * @author Edwin Commandeur - Atlis EJS
  * @author Curtis Jensen
+ * @author Lorenzo Amato <lorenzo.amato@geosdi.org>
  *
  */
 class SelectFeatureImpl
     public static native void unselect(JSObject selectFeature, JSObject feature) /*-{
         selectFeature.unselect(feature);
     }-*/;
+    
+    public static native void select(JSObject vectorLayer, JSObject feature) /*-{
+    vectorLayer.select(feature);
+    }-*/;
 
     public static native void setToggleKey(JSObject selectFeature, String keyName) /*-{
         selectFeature["toggleKey"] = keyName;