Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Web Programming > JavaScript > BOOK: Beginning Ajax ISBN: 978-0-470-10675-4
Password Reminder
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Beginning Ajax ISBN: 978-0-470-10675-4
This is the forum to discuss the Wrox book Beginning Ajax by Chris Ullman, Lucinda Dykes; ISBN: 9780470106754
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning Ajax ISBN: 978-0-470-10675-4 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Display Modes
  #1 (permalink)  
Old January 29th, 2009, 06:59 PM
Registered User
Join Date: Jan 2009
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Question Google Map API Example question (cht 7, p203)

Hello Chris/Licinda
I study your book "Beginng Ajax.
I got stuck in chapter 7, p203 - Google Map API example.

My question is in JavaScript portion.
Below is the part.

function load(e)
if (GBrowserIsCompatible())
map = new GMap2(document.getElementById("map"));
geocoder = new GClientGeocoder();
placeMarkers(document.getElementById("address").va lue, e);

GDownloadUrl("data.xml", function(data, responseCode) {
var xml = GXml.parse(data);
var markers = xml.documentElement.getElementsByTagName("marker") ;

if (markers.length > 0)
point2 = new GLatLng(parseFloat(markers[0].getAttribute("lat")), parseFloat(markers[0].getAttribute("lng")));
map.setCenter(point2, 13);

geocoder.getLatLng("Paris", function(point){map.setCenter(point, 13)});

My question is in load function.
It has one argument but at the end, it refers to "point" (in red color) but it is not defined.
That is a part, which bugs me now.

I will appreciate if you can clarify me about this.
Reply With Quote
  #2 (permalink)  
Old January 30th, 2009, 06:33 PM
Registered User
Join Date: Jan 2009
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Answer to the Google Map API question

I serfed googlemap api help section for getLatLng.

The answer to my question was there.
The following is the defintion for the function and description.

getLatLng (addr:string, callback:function)
return: returns nothing
description: Sends a request to Google servers to geocode the specified
address. If the address was successfully located, the
user-specified callback function is invoked with a GLatLng
point. Otherwise, the callback function is given a null point.
In case of ambiguous addresses, only the point for the best
match is passed to the callback function.

So in summary, it is defined by getLatLng function. I hate black box notation but in this case, that is what it is.

Thanks Chris/Lucinda anyway.
Reply With Quote
  #3 (permalink)  
Old April 21st, 2010, 07:50 PM
Registered User
Join Date: Apr 2010
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Hi Everyone

I would like to know if is it possible to call a javascript fuction from the server side. I want to pass the map coordiantes into the google map on the web browser. I am writing my server side code in VB.net. I would like to know if there is any method that I can use to pass the coordinates from the database to the map.

Your assistance will be highly appreciatable.

Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Update Google Map API Markers msnyder0 Pro PHP 0 October 21st, 2008 07:22 AM
google map clicked coordinates neon20 Javascript 4 June 18th, 2008 07:32 AM
Heat Map over Google Map ajit Javascript 0 March 7th, 2008 08:01 AM
google map GetDirections problem mrjoka Javascript How-To 0 October 4th, 2007 09:08 AM

All times are GMT -4. The time now is 12:33 PM.

Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.