[squeak-dev] Re: anyone ever use google maps with squeak?

Andreas Raab andreas.raab at gmx.de
Fri Jul 22 18:50:09 UTC 2011


Works fine with WebClient+SqueakSSL:

resp := WebClient httpGet: 
'https://maps.googleapis.com/maps/api/place/search/json?location=52.36973,5.381927&radius=5000&name=Zeewolde&sensor=false&key=AIzaSyD_fnY5M3jTlwUnkNf9p_oO3j8aVNPo_0c'. 

resp content.

  '{
    "html_attributions" : [],
    "results" : [
       {
          "geometry" : {
             "location" : {
                "lat" : 52.3311970,
                "lng" : 5.540718099999999
             },
             "viewport" : {
                "northeast" : {
                   "lat" : 52.44016020,
                   "lng" : 5.796836900000001
                },
                "southwest" : {
                   "lat" : 52.22196470,
                   "lng" : 5.28459930
                }
             }
          },
          "icon" : 
"http://maps.gstatic.com/mapfiles/place_api/icons/geocode-71.png",
          "id" : "b97e941c7f1bdc5ccd568618e9f772d9a68c83e9",
          "name" : "Zeewolde",
          "reference" : 
"CnRpAAAAXCmbbBfcBJnImltpp3rbQ5EBzpAuR7oVx5AypvkGt4Dt12LSptveOj9l0jWupkZVz2nqdZpXaDpuFB1F3VjfC4kM05YUmt0pD254R5dfjC1T3kHJNXkK8G5jHjC4tcakRmMw_yhzIEarGrbctLPZ_RIQXsIeW42OsUvgM0c1tvfocRoUuQHjM73xY0PTtRch_kxlYKgMD0Y",
          "types" : [ "locality", "political" ]
       }
    ],
    "status" : "OK"
}
'
Cheers,
   - Andreas

On 7/22/2011 20:12, Lawson English wrote:
> Hi all. I'm trying to use the google maps web API from squeak, but I'm
> stuck at square one (as usual).
>
> I can't seem to get https working properly to access a google map server.
>
> The closest I have gotten is using the HttpsSocket class and utilities
> found in Cobalt (squeak 3.8) but that doesn't quite work either.
>
> a:= HttpsUrl absoluteFromText:
> 'https://maps.googleapis.com/maps/api/place/search/json?location=52.36973,5.381927&radius=5000&name=Zeewolde&sensor=false&key=AIzaSyD_fnY5M3jTlwUnkNf9p_oO3j8aVNPo_0c'.
>
> Transcript show: a retrieveContents contents.
>
> It works in a browser, but not with any version of squeak I have tried
> using any code I have tried.
>
> The URL I'm trying to access is:
>
> 'https://maps.googleapis.com/maps/api/place/search/json?location=52.36973,5.381927&radius=5000&name=Zeewolde&sensor=false&key=AIzaSyD_fnY5M3jTlwUnkNf9p_oO3j8aVNPo_0c'
>
>
> Suggestions on how to get it through squeak? I'll take any version, any
> flavor at this point.
>
> Caveat: I just installed Mac OS X Lion, which may be complicating things
> somehow.
>
> Thanks.
>
> Lawson
>
>
>




More information about the Squeak-dev mailing list