Tags

GMapPanel Updated With Locale Support and More Examples

by Shea Frederick on April 26th, 2009

So I set aside a few hours over the past week to update my GMapPanel code with some new features and examples that I think would help everyone. Two new examples, and an update to one to add a form used for entering lat/lng or address to center the map on. Added locale support for the error messages that the map presents to the user - map locale support is still handled on Google's end of things.

dataviewThe first new sample demonstrates two things that allot of people seem to strugle with. First off, using a map within a border layout, which when you get down too it is dead simple, but causes much frustration and confusion if you happen to do it incorrectly. The second thing is using a DataView (could be a grid, tree, etc) to interact with the map by giving a list of points to recenter the map on. Recentering is accomplished by clicking on an item in the DataView list, this triggers a click event in the DataView which then pulls the lat/lng from the DataStore and tells the map to center on it.

recenterThe next example is also a new one, demonstrating how to use a form to interact with the map. A basic dialog has been created with a form in it, this dialog is opened from the tool section of the window in the recenter-map example. From this form you can enter in either a lat/lng or a street address, and the data entered is used to manipulate the map. Its a handy and fun little example.

localeThis last one was something I did on a whim, because I noticed these map windows being used all around the world I thought it would be a good idea to follow the standards used by ExtJS and localize the text contained within the code. When I set in to do this, I assumed I could pull localized text messages from Google for the error numbers Google provided - go figure, their API actually provides no text at all for the error codes they return. I ended up copying the error text from the Google API reference/docs into my code, which was annoying, but I didn't see any other options.

Thats it for now, enjoy the map panel updates!

http://code.google.com/p/ext-ux-gmappanel/source/detail?r=17

1 Comment
  1. Hi,
    This is good component and I am trying to use it for my proof of concept. The one thing which I find missing is the support for openInfoWindow. I am trying to add markers whose click should open an infoWindow but I am not able to get an handle to the marker at all. Any thoughts on whether there is any plan to accommodate this. Please let me know.

    Thanks,
    Best Regards,
    nacnez

Leave a Reply

Note: XHTML is allowed. Your email address will never be published.

Subscribe to this comment feed via RSS