473,386 Members | 1,602 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Calling SQL to create XML from Javascript (Google Maps)

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!

Mar 21 '07 #1
2 2496
you can use the ajax extensions for this, or even the 2.0 builtin server
callback.

-- bruce (sqlwork.com)

jobo wrote:
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!
Mar 21 '07 #2
On Mar 21, 12:16 pm, bruce barker <nos...@nospam.comwrote:
you can use the ajax extensions for this, or even the 2.0 builtin server
callback.

-- bruce (sqlwork.com)

jobo wrote:
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!
Thanks for replying. How would I go about using an ajax extension or a
server callback? I'm using ASP.NET 2.0.

Mar 21 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Guillaume CABANAC | last post by:
Hi everybody, Does anybody know how to access a remote database (say Oracle) from JavaScript code (within a Firefox Extension) ? I know ADO via ActiveX in the IE world and think a similar...
18
by: Chris Ianson | last post by:
Hi geniuses (or is that genii, or genies) The challenge is as above really. I have a page with an iframe in it, and need to call a JS function in the *parent* page, *from* inside the iframe. ...
4
by: Navodit | last post by:
Can anyone recommend a good starting tutorial for Javascript? Basically I want to learn enough of Javascript so that I can work with Google Maps API...
3
by: Mr. Roper | last post by:
I'm pretty weak when it comes to Java script, hopefully someone will take mercy on my sole and explain this to me. How come on the following HTML page, when I have my first script tag commented...
2
by: moni | last post by:
Hi, I wanted to call a javascript function function showAddress(address) { ..... } from the aspx.cs file from the Gridview_RowCommand function
3
by: Harch84 | last post by:
Hi I am using a javascript for google maps to geocode two locations and I thin want to retrieve the two coordinates and enter them into a Perl Script. Now I have managed to set up the page with the...
10
by: HardySpicer | last post by:
I have a cvs data file orbit.csv and found this code. function ReadFile() { var fso, f1, ts, s; var ForReading = 1; fso = new ActiveXObject("Scripting.FileSystemObject"); f =...
2
by: sarah.kidd | last post by:
Hello I was wondering if someone could please help me. I have created a google map: http://www.cancerpatientgis.com/markers%20test/HospPat_markerstest.html
0
by: TrevRex | last post by:
Hello, I work for a non-profit in San Diego as a GIS Specialist. I have had to teach myself about some scripting to create some dynamic maps, but I am still very limited in my skills, so I have...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.