1

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 1

1

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.