how to access geo:point in JSON syntax

 
  • how to access geo:point in JSON syntax

    Hello everybody,

    can someone please tell me how to get the geo:lat and geo:long out of the geo:point in th JSON syntax?

    I have made an AJAX call to the method geo.getEvents and got a JSON object.
    I've made a JSONP call to work around the cross domain issues. Now I have something like this:

    "venue":{
    "name":"Das Bett",
    "location":{"geo:point":{"geo:lat":"50.113368","geo:long":"8.671815"},
    "city":"Frankfurt am Main","country":"Germany",
    "street":"Klappergasse 16",
    "postalcode":"60594",
    "timezone":"CET"},

    Is there a way to escape the colon or something like this? Other workarounds?
    venue.location.geo:point doesn't work, suprise :)

    Thanks
    Jay

  • similar to the #text field quirk you must use the following syntax:

    venue.location['geo:point']['geo:lat']
    venue.location['geo:point']['geo:long']

  • yeah thanks

  • Can anyone show how to access the city from the above JSON. Looks like its within location and I'm not able to figure out.

    • marc2003 ha detto...
    • Utente
    • Apr 13 2012, 16:48
    venue.location.city

Gli utenti anonimi non possono inviare messaggi. Per inserire messaggi nei forum, accedi o crea il tuo account.