You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Lance Java <la...@googlemail.com> on 2012/01/01 16:19:05 UTC

Custom Google Maps Geocode Component

Hi, I'd like to create a component which does the following
1. Displays an "address" text field and a "find" button and two hidden
fields for "latitude" and "longitude"
2. Clicking on the "find" button invokes the googlemaps geocoding API
clientside (
http://code.google.com/apis/maps/documentation/javascript/services.html#Geocoding)
and
populates the hidden "latitude" and "longitude" text fields
3. When the containing form is posted, the latitude and longitude should be
available serverside

The forms / fields code seems to be quite involved and I wasn't sure
exactly how I should tackle this and make sure that the appropriate
validation etc works. I have been looking at the code for Palette and I
feel that I should be extending AbstractField, is this correct? I'm also
not sure what names I should be giving to the fields and how I should store
the latitude / longitude serverside.

I was hoping that there was a similar component out there that I could use
as a basis... any help would be appreciated.

Thanks,
Lance.