473,799 Members | 2,926 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.addListe ner(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 2521
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.addListe ner(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.addListe ner(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
2072
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 thing exists in Firefox. Thanks a lots,
18
43567
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. (It's for Google Maps, but I won't bore you with the complexities of that, as it doesn't affect the question). Mochas kudos to anyone able to solve this widdle.
4
1293
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 (http://www.google.com/apis/maps/documentation/). Thanks
3
1645
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 out, my button calls my OnClick function. However if I uncomment the first script tag, I get the following error: Button1_onclick is not defined <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">...
2
7673
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
7488
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 geocoder and the script uses getLatLng() to draw the two points on two different maps. My problem is hw do I assign these coordinates to variables or some means of entering them into my perl scrip? My Javascript code is below: <!DOCTYPE html...
10
3539
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 = fso.OpenTextFile( Server.MapPath("orbit.csv"), ForReading); return(f.ReadAll()); }
2
3275
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
3740
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 had to explore the internet in order to discover various tutorials and examples that have led me on a positive path. Right now I am working on a Google Mash-Up that will incorporate over 14,000 records, which will appear as separate markers that...
0
9541
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10482
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10225
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10027
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9072
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7564
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5463
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5585
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4139
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.