On Jan 3, 9:08 am, domnic James <
domjb...@gmail.com> wrote:
> Hi,
> I am trying to extract the latitude longitude from the JSON object
> via javascript.. is there any possible way of extracting the
> coordinates.. I am able to display the lat ,lng as an alert on the
> screen but I need to return it as a string.. here is the code snippet
> which works
>
> map.setCenter(results[0].geometry.location);
>
> result =
> results[0].geometry.location;
> alert(result);
Geocoding is asynchronous. The coordinates are available in the
callback function.
>
> Another question:
> for the above example if I were to return a latLng object convert this
> object to C#. what kind of class must this be serialized to ?
>
> I am have already created a functional working project using the
> webservices directly, but for my purposes at this point in time I need
> fetch the coordinates via javascript..
Perhaps you can provide a link to that (or better yet, the map that
you are trying to get the coordinates into a string) so we can see
where you are running into trouble.
-- Larry
>
> thanks in advance