Thursday, October 19th, 2006
Integrating a third party mega widget like Google Maps into a server-side framework like ZK or Echo2 is not so straightforward. At best these widgets sit there on the page sending and reacting to events independent-of and invisible-to the Ajax app in which they are embedded. At worst they consume and generate conflicting events and confuse the heck out of themselves and the server-side framework’s client engine.
The ZK team has taken up this challenge and has just released a ZK component that allows you to embed Google Maps in your application. With this component you can now both issue and respond to events from the server-side. For example, the following zul code allows you to use a ZK slider component to zoom a map:
Right now a limited set of events are supported, but more is on the horizon:
We have demonstrated how to use this new ZK gmaps component, the Google Maps component. The Google Maps API is a versatile API set. The ZK team will integrate more functions and events into the gmaps component so ZK application developers can control it easily.
Consider the possibilities: maps that zoom and pan in response to server-side events, such as election results coming in; maps that update realestate listings as a user types a query; listings that are updated based on where a users pans the map. I can hardly wait.
Posted by Dietrich Kappe at 8:00 am