First release of my Google Maps App
octubre 16, 2007 at 5:26 pm Deja un comentario
As wordpress.com don’t let me insert any javascript or iframes here, this is an screenshot of my first release of my first Google Map App:
Here is how it works:
- The polygon data is loaded using Dojo’s xhrPost.
- The data is prepared on a C# WebService and formatted using JSON. The WebService serves only the polygons of the Google Map view port (using bounds.getNortEast and bounds.getSouthWest) .. and it’s not sending any data which is already sent to help a little the performance. To achive this, I used a table that «remembers» all the data already sent for a given session.
- For every polygon received, a GMap Polygon objected is created (new GPolygon). As I am using the 2.x API version, I am attaching the «onclick» event to trigger a function to show the extended information:
GEvent.addListener(polygon, "click", function(point) { } );
- This triggered event calls another xhrPost for the polygon ID and retrieves another JSON string with the polygon details. This is formatted inside JavaScript and shown using openInfoWindowTabsHtml.
I have invested about 40 hours so far in this pet project. This is a «freelance» job for my ex employer.
I will add some functinalities and comment them here soon. 🙂
Thanks to the guys at Dojo for their excellent AJAX toolkit.
Entry filed under: Proyectos Mascota.
Trackback this post | Subscribe to the comments via RSS Feed