Hi there,

Whilst capturing a web service request and parsing it's data is not a
Google Maps API related question, I'll attempt to answer as best as
possible for your current query.

Firstly, using a framework like JQuery makes this task extremely
simple, with their $.getJSON method. For documentation see:
http://api.jquery.com/jQuery.getJSON/

You can then write some code to fetch the feed, and store it in a
"data" variable

$(document).ready(function() {
    $.getJSON("http://localhost/myService.aspx, function(data) {
        parseMarkerList(data); //data = JSON returned
    });
});

Your parseMarkerList(data) function can then loop through the JSON
returned, and pull out nodes such as Latitude, Longitude etc,
something such as:

function parseMarkerList(data) {
    for (var i=0; i < data.length; i++) {
        var lat = data[i].Latitude; // Where Latitude is the node name
        var lng = data[i].Longitude; // Where Longitudeis the node
name
        createMarker(lat, lng);
    }
}

The createMarker function can then be a simple function that drops
markers on the map, see:
http://code.google.com/apis/maps/documentation/javascript/examples/marker-simple.html

Hope this has helped you.
The key is passing your data object from the request's response, to
the function that will iterate through the feed.
Using this technique you can drop hundreds of markers with no
additional code.

Cheers
Pete


On May 28, 8:22 am, ron1776 <[email protected]> wrote:
> I can't find documentation on how to capture the reply from Web
> Service Request.
>
> We want to set the json return array to a variable so we can parse the
> map data we need to then build the cost to make a map.
>
> Ideas?
>
> - Ron

-- 
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.

Reply via email to