[DRAFT - download not yet available]
When we did our Event Payload Transformation Portlet, we were looking for some ready-to-use jsr-286 portlets in the public domain, that made use of the portlet API's eventing feature. Unfortunately, there was very little. Moreover, the examples I found were a) either targeted at a specific portal runtime and used more then just the standard portlet api provided by that portal runtime, or b) were unnecessarily using a lot of other frameworks on top.
In the case of a Google Maps Portlet, I felt that all that is really needed is a thin portlet API wrapper around the Google JavaScript API. And a sandboxing of the JavaScript code via an IFrame.
So here it is a simple, yet effective Google Maps Event Listener Portlet, with the following features:
- support of all request types ( GeoCoding, Directions, Elevations) and a preference switch for StreetView, reflecting one-to-one the Google Maps API 3.0 as documented at
http://code.google.com/apis/maps/documentation/javascript/services.html
- both fine-grained query data objects and simple strings as event payload for each request type
- source code included for own customizations
- compiled with java 1.5, to run e.g. in WebSPhere Portal 6.1 and above.
- use at your own risk - no warranty supplied
The String payloads can be directly wired in some portal runtimes, ignoring the qnames, e.g. in WebSpehere Portal. For the self-defined data objects in the payload, other portlets on the page will need to explicitly be adopted to throw the corresponding events. Or you can plug-in the payload transformation portlet inbetween, which I shall try to publish soon...