A new Google Maps Widget for SWT and RAP

A new Google Maps Widget for SWT and RAP

Your early Christmas present from EclipseSource: a custom-widget that displays, controls and reacts to a Google-Map. While there have been similar widgets before, this one is the first (as far as I know) that runs in RAP and RCP without any changes.

[ Download ] (You also need RAP 1.4M4.)

Creating custom-widgets for RAP is no easy task. You need to be familiar not only with Java and JavaScript, but with a lot of RAP’s complex internals as well. It’s a lot of work, even if you simply want to integrate an existing javascript-application or library.

That’s now a lot easier, using the much improved browser-widget. We recently added some missing features, tested different scenarios and fixed known bugs. This makes it an ideal platform to insert javascript-based applications with almost no overhead for the programmer. You simply call JavaScript from Java and vice versa! And the bonus: these custom-widgets can (under certain conditions) also run in RCP, as demonstrated here.

The widget is currently hosted at github, so feel free to check it out, use it in your application or fork it to add your improvements. Also check out Holger Staudachers carousel widget for RAP to see another example.

“Traditional” custom widgets for RAP are by no means obsolete with this, as they still have certain advantages (slightly better performance, themeability, can use rap client components). But for the cases mentioned above, the browser widget can make your life much easier!

Happy Holidays!

  • Elias
    Posted at 7:07 pm, December 20, 2010

    Very Nice!

    By the way: I think that the RAP homepage might benefit from a section that lists available 3rd party widgets (like this, the carousel widget, the widgets from the incubator and sandbox, etc).

    Best regards,

  • Erik
    Posted at 10:03 pm, February 17, 2012

    Very helpful! I tried to expand on your example. I ran into problems when trying to receive click events from the Map. They never seemed to come through. Also it seems with this technique only primitive data types are supported. Is there a way to pass more complex data types?