A new Google Maps Widget for SWT and RAP

December 18, 2010 | 2 min Read

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!