setCenter expects a google.maps.LatLng object. You'll need to convert from whatever structure your JSON is in to a LatLng object.
Check the docs: http://code.google.com/apis/maps/documentation/javascript/reference.html#LatLng Chris On Tue, Jan 4, 2011 at 4:30 AM, mapseeker <[email protected]> wrote: > I am trying to fetch the latitude longitude from the geometry.location > Node in the JSON object via javascript. I am able to display this > coordinate as an alert message. however i am trying to retrieve these > coordinates as string in a javascript function. > a sample snippet > > map.setCenter(results[0].geometry.location); > > > result = > results[0].geometry.location; > alert(result); > > if I were to send this object as a JSON object from JS to class how > do I serialize it into a class in C#? > > I have already created a project calling the web service and > fetching and traversing the xml object , however at this point in time > i need to do it via javasript. > > Regards > Dj > > -- > 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 > [email protected]. > To unsubscribe from this group, send email to > [email protected]<google-maps-js-api-v3%[email protected]> > . > 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 [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-maps-js-api-v3?hl=en.
