-
Get a monthly update on best practices for delivering successful software.
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:
<zk>
<gmaps id="map" width="500px" height="300px"/>
<slider maxpos="17" curpos="${map.zoom}" onScroll="map.setZoom(self.curpos)"/>
</zk>
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.
We are going to discuss the "behind the scene" in another smalltalks about how this Google Maps API is integrated as a ZK gmaps component; especially how to route the Google Maps javascript event back to server as an ZK event. Sit tight.
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.
Related posts:
Topics: Ajax Frameworks, Ajax Widgets, Google, ZK
We’ve got a pretty nifty mashup control sample in our toolkit of the msn live maps control…
A must check out for all asp.net developers
http://ajaxwidgets.com/AllControlsSamples/LiveMapsMashup.aspx
Though thanx to the “IE only JS” in Live Maps it only works in IE
.t
Comment by Thomas Hansen, Sunday, March 11, 2007 @ 6:06 pm