Hi Dario,<br><br>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 server.<br><br>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?<br>
<br>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 advantages.<br><br>Regards,<br>Steve<br><br><div class="gmail_quote">
On Wed, Feb 11, 2009 at 9:19 AM, Dario Trussardi <span dir="ltr"><<a href="mailto:dtrussardi@tiscali.it">dtrussardi@tiscali.it</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div bgcolor="#ffffff">
<div><font face="Arial">Hi All,<br><br>i work with Squeak and Seaside
2.8.<br><br>In my application i have integrate a Google StaticMap support
from squeakSource GoogleStaticMaps.<br><br>Now i'm interested, when the user
create a new address, to define and save the relative geographic
coordinates.<br><br>In the Google documentation i read: </font></div>
<div><font face="Arial"><br>***********************************************************************************<br><br>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.<br><br>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.<br><br>Geocoding
Requests<br>You may access the Google Maps API Geocoding Service directly over
HTTP. To access the geocoder, send a request to <a href="http://maps.google.com/maps/geo?" target="_blank">http://maps.google.com/maps/geo?</a>
with the following parameters in the URL: <br><br> a.. q (required) - The
address that you want to geocode. <br> b.. key (required) - Your API key.
<br> 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.) <br> 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.)
<br> 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. <br> 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.) <br> 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.)
<br> h.. gl (optional) - The country code, specified as a ccTLD
("top-level domain") two-character value. (For more information see Country Code
Biasing below.) <br>Note: The gl and spn,ll viewport parameters will only
influence, not fully restrict, results from the geocoder.<br><br>In this
example, we request the geographic coordinates of Google's
headquarters:<br><br><a href="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" target="_blank">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</a></font></div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial">**********************************************</font></div>
<div><font face="Arial"></font> </div>
<div><font face="Arial">Now :</font></div>
<div><font face="Arial"></font> </div>
<div><font face="Arial">after the user crate new address i can create a new WAUrl
as above with specific address.</font></div>
<div><font face="Arial"></font> </div>
<div><font face="Arial">My question is: </font></div>
<div><font face="Arial"></font> </div>
<div><font face="Arial"> how, i can, send from squeak this
request to the internet for receive the answer?</font></div>
<div><font face="Arial"></font> </div>
<div><font face="Arial">It's a good solution or i wrong?</font></div>
<div><font face="Arial"></font> </div>
<div><font face="Arial">Any pointers would be greatly appreciated!</font></div>
<div><font face="Arial">Thanks!</font></div>
<div><font face="Arial"></font> </div>
<div><font face="Arial"> Dario <br></font></div></div>
<br>_______________________________________________<br>
seaside mailing list<br>
<a href="mailto:seaside@lists.squeakfoundation.org">seaside@lists.squeakfoundation.org</a><br>
<a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" target="_blank">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a><br>
<br></blockquote></div><br>