|
From: Lukas J. <luk...@de...> - 2010-01-15 14:54:35
|
Hello, I'm trying to use SelectFeature in gwt-openlayers 0.4:
Layer layer = new Vector();
Control cntrl = new SelectFeature(layer);
SelectFeatureOptions options = new SelectFeatureOptions();
options.onSelect(new SelectFeatureListener() {
public void onFeatureSelected(VectorFeature vectorFeature) {
Window.alert("feature selected");
}
});
options.onUnSelect(new UnselectFeatureListener() {
public void onFeatureUnselected(JSObject vectorFeature) {
Window.alert("feature unselected");
}
});
map.addControl(cntrl);
But when the code is executed I get the following error:
14:52:51.378 [WARN] [Standard] Member
'onFeatureUnselected(Lorg/gwtopenmaps/openlayers/client/feature/VectorFe
ature;)' in JSNI reference
'@org.gwtopenmaps.openlayers.client.control.SelectFeature.UnselectFeatur
eListener::onFeatureUnselected(Lorg/gwtopenmaps/openlayers/client/featur
e/VectorFeature;)' could not be found; expect subsequent failures
java.lang.NoSuchFieldError:
onFeatureUnselected(Lorg/gwtopenmaps/openlayers/client/feature/VectorFea
ture;)
I've noticed that the onFeatureUnselected receives a JSObject while the
onFeatureSelected receives a VectorFeature which seams a bit odd.
Any help would be appreciated.
|