Calling SQL to create XML from Javascript (Google Maps)

J

jobo

I'm sure there's some way to do this simply but I'm new to
Javascript.

So I'm creating an application that interacts with google maps and
everytime the user pans around the map I want it to send its
coordinates back to the server to generate an XML object with a bunch
of markers that google maps will plot back onto the map.

The problem is that I have no idea how to query SQL to create this XML
object from javascript. I have already created an event listener that
will trigger at the correct times, but what to do after that I don't
know. I already know how to generate an XML object after I've hit the
database but have no idea how to return it from my .aspx.cs back to
the javascript to be processed.

Does anyone know how do to this?

Here's the javascript method I have:

GEvent.addListener(oMap, "moveend", function() {
var latLngStrs = oMap.getBounds().getSouthWest();
var latLngStrs2 = oMap.getBounds().getNorthEastt();

\\Need to send these bounds back to a method in the code-
behind
\\that will query the database and then return an XML
object to be processed further

});

Thanks a lot!
 
B

bruce barker

you can use the ajax extensions for this, or even the 2.0 builtin server
callback.

-- bruce (sqlwork.com)
 
J

jobo

you can use the ajax extensions for this, or even the 2.0 builtin server
callback.

-- bruce (sqlwork.com)

Thanks for replying. How would I go about using an ajax extension or a
server callback? I'm using ASP.NET 2.0.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top