I'm searching for a way to get the bounds of a bounding box a user can drag on a map with gwt-openlayers but i can't figure out how to translate the javascript stuff to the javaside of the wrapper classes. There is a javasript example for what i need to do. Is this possible with gwt-openlayers?
1 Answer
Yes you can. GWT is only a wrapper for the javascript untyped variables.
You have to locate if there is a class that wraps the OpenLayers.Handler.Box for example and listen to the done event.
There is a OpenLayers control called OpenLayers.Control.ZoomBox hat could implement most of that you need.
If you walk on GWT class hierarchy you will see that it extends a javascript object that has support for events already on GWT. You could then add listeners as defined by the Java exported API.
Unfortunely I do no have access here to a GWT capable IDE to see the exported classes.
If there is no built in classes you could create one by yourself with the use of JNI brigde that allows you to access the javaScript native code inside Java and vice versa.