Okay,
My script now looks like the following:
function initialize() {
if (GBrowserIsCompatible()) {
var map = new GMap2(document.getElementById
("map_canvas"));
map.setCenter(new GLatLng(51.70278, -0.70587), 11);
// SET UP MARKER POSITIONS
function createMarker(point) {
var marker = new GMarker(point);
return marker;
}
var request = GXmlHttp.create();
request.open("GET", "parks.xml", true);
request.onreadystatechange = function() {
if (request.readystate == 4) {
var xmlDoc = request.responseXML;
var points =
xmlDoc.documentElement.getElementsByTagName("point");
for (var i = 0; i < points.length; i++) {
var point = new GLatLng(parseFloat(points
[i].getAttribute("lat")), parseFloat(points[i].getAttribute("lng")));
var marker = createMarker(point);
map.addOverlay(marker);
}
}
}
request.send(null);
}
}
As stated, I have added to the "request.send(null);" but i am still
not getting anything back,
Any other ideas?
Thanks
On May 5, 11:43 pm, Mike Williams <[email protected]> wrote:
> After setting up your XML request and the callback handler it is
> necessary to send the request to the server, otherwise the server won't
> send a reply.
>
> request.send(null);
>
> See:http://code.google.com/apis/maps/documentation/services.html#XML_Requ...
>
> --http://econym.org.uk/gmap
> The Blackpool Community Church Javascript Team
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Maps API" 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-API?hl=en
-~----------~----~----~----~------~----~------~--~---