[Seaside] Google Maps API Services Geocoding ( resend for wrong format )

Steve Wart steve.wart at gmail.com
Wed Feb 11 17:44:08 UTC 2009

Hi Dario,

I'm also interested in using the Google maps API from Seaside. I am far from
an expert but it's possible to use an HttpRequest object to do this from the

My question is why would you do it from the server when you could make the
request directly from the user's browser using the JavaScript API?

I'm also wondering why you chose the static API instead of the dynamic one.
I haven't played with the static version and I'm curious about its


On Wed, Feb 11, 2009 at 9:19 AM, Dario Trussardi <dtrussardi at tiscali.it>wrote:

>  Hi All,
> i work with Squeak and Seaside 2.8.
> In my application i have integrate a Google StaticMap support  from
> squeakSource GoogleStaticMaps.
> Now i'm interested, when the user create a new address,  to define and save
> the relative geographic coordinates.
> In the Google documentation i read:
> ***********************************************************************************
> Geocoding is the process of converting addresses (like "1600 Amphitheatre
> Parkway, Mountain View, CA") into geographic coordinates (like latitude
> 37.423021 and longitude -122.083739), which you can use to place markers or
> position the map. The Google Maps API Geocoding Service provides a direct
> way to access a geocoder via an HTTP request.
> Note: the geocoding service may only be used in conjunction with displaying
> results on a Google map; geocoding results without displaying them on a map
> is prohibited. For complete details on allowed usage, consult the Maps API
> Terms of Service License Restrictions.
> Geocoding Requests
> You may access the Google Maps API Geocoding Service directly over HTTP. To
> access the geocoder, send a request to http://maps.google.com/maps/geo?with the following parameters in the URL:
>   a.. q (required) - The address that you want to geocode.
>   b.. key (required) - Your API key.
>   c.. sensor (required) - Indicates whether or not the geocoding request
> comes from a device with a location sensor. This value must be either true
> or false. (Note that devices with sensors generally perform their own
> geocoding by definition; therefore, most geocoding requests to the Maps API
> Geocoding service should set sensor to false.)
>   d.. output (required) - The format in which the output should be
> generated. The options are xml, kml, csv, or (default) json. (For more
> information, see Geocoding Responses below.)
>   e.. oe (optional but strongly encouraged) - The output encoding format of
> the response. It is recommended that you set this output encoding explicitly
> to utf8 unless you have specific requirements to handle other encoding
> types.
>   f.. ll (optional) - The {latitude,longitude} of the viewport center
> expressed as a comma-separated string (e.g. "ll=40.479581,-117.773438" ).
> This parameter only has meaning if the spn parameter is also passed to the
> geocoder. (For more information see Viewport Biasing below.)
>   g.. spn (optional) - The "span" of the viewport expressed as a
> comma-separated string of {latitude,longitude} (e.g. "spn=11.1873,22.5" ).
> This parameter only has meaning if the ll parameter is also passed to the
> geocoder. (For more information see Viewport Biasing below.)
>   h.. gl (optional) - The country code, specified as a ccTLD ("top-level
> domain") two-character value. (For more information see Country Code Biasing
> below.)
> Note: The gl and spn,ll viewport parameters will only influence, not fully
> restrict, results from the geocoder.
> In this example, we request the geographic coordinates of Google's
> headquarters:
> http://maps.google.com/maps/geo?q=1600+Amphitheatre+Parkway,+Mountain+View,+CA&output=json&oe=utf8&sensor=true_or_false&key=your_api_key
> **********************************************
> Now :
> after the user crate new address i can create a new WAUrl as above with
> specific address.
> My question is:
>     how,  i can, send from squeak this request to the internet for receive
> the answer?
> It's a good solution or i wrong?
> Any pointers would be greatly appreciated!
> Thanks!
>  Dario
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20090211/419a7851/attachment-0001.htm

More information about the seaside mailing list