Dharmesh Raithatha wrote:
Has anyone got an example of a good googlemasup where you can click on
the map to make a web request with the location clicked on?
Sorry if I've misunderstood the question, and usual caveat of code in
emails, but something like this should work:
--8<------------------
GEvent.addListener(map, 'click', function(overlay, point) {
if (point) {
var query = 'x=' + point.x + '&y=' + point.y
var request = GXmlHttp.create();
request.open('GET', 'file.xml?' + query, true);
request.onreadystatechange = function() {
if (request.readyState == 4) {
var xml = request.responseXML;
// Do whatever you want with the response
}
}
request.send(null);
}
});
--8<------------------
--
ATB,
Matthew
-
Sent via the backstage.bbc.co.uk discussion group. To unsubscribe, please
visit http://backstage.bbc.co.uk/archives/2005/01/mailing_list.html.
Unofficial list archive: http://www.mail-archive.com/[email protected]/