When we receive the JSON we recursively traverse it, promoting
    {lat:1, lng:2}
to
    new google.maps.LatLng(1, 2)
and likewise for any google.maps.LatLngBounds.

Ben
On Feb 20, 2011 8:06 PM, "sgiddings" <mr.s.giddi...@gmail.com> wrote:
> Hi Rossko,
>
> No, this is not what I am wanting to do.
>
> If you "capture" the server response when doing a directions request,
> for example, the returned json response holds entries like this :
> "start_location": {
> "lat": 47.7088700,
> "lng": -2.6385000
> },
>
> Now, having looked through the google code, I do not see anywhere
> where this is specifically transformed into a "new
> google.maps.LatLng(xxx, yyy).
>
> So, my conclusion is that there is either an implicit conversion when
> doing the 'eval', or some other wizardry which remains unknown to me.
> This is the whole aim of my question - how can I do the same ?
>
> On Feb 20, 12:28 am, Rossko <ros...@culzean.clara.co.uk> wrote:
>> > No, what I want to do is to pass a JSON text response into eval()
>>
>> So, you make your server side script generate text like
>>    var someArray = [ new google.maps.LatLng( xxx, zzzz ) , new
>> google.maps.LatLng(aaa , bbb) , ....
>> this is not usually considered a classy way to go about it though
>>
>> I would have a look athttp://www.json.org/js.html
>
> --
> You received this message because you are subscribed to the Google Groups
"Google Maps JavaScript API v3" group.
> To post to this group, send email to
google-maps-js-api-v3@googlegroups.com.
> To unsubscribe from this group, send email to
google-maps-js-api-v3+unsubscr...@googlegroups.com.
> For more options, visit this group at
http://groups.google.com/group/google-maps-js-api-v3?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" group.
To post to this group, send email to google-maps-js-api-v3@googlegroups.com.
To unsubscribe from this group, send email to 
google-maps-js-api-v3+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.

Reply via email to