giancarlo.dimassa.net A web programmer's blog

User profile

Status:
Name: giancarlo
Nickname: giancarlo
Member since: 2007-07-01 19:40:50
Website URL: http://giancarlo.dimassa.net
About me: i'm a web engineer

Facebook profile
 

User comments

How to find the right point in Google Maps (longitude and latitude)

Tha is called
“Geocoding”. There are two methods to retrieve this sort of data: Javascript and HTTP. If you need to populate a table with geographic coordinates, use the HTTP method. Go on with Javascript if your queries should be done in realtime, on the page.

Example of Javascript geocoding:

var geocoder = new GClientGeocoder();
Geocoder.getLatLng(address, function(point) {
if (!point) {
alert(address + " not found");
} else {
// a new point object with the coordinates has been set
}
};

Example of geocoding via HTTP is a JSON call to google with parameters sent with GET method. Try following this link.

Further informations can be found on the Google geocoding API page

How to find the right point in Google Maps (longitude and latitude)

Hi Ray,
try to place the code after the initialization script, to clarify that I call a function named google_buildmap() located in

/lib/google_maps/js/google_maps.js

from the main init function.

How to find the right point in Google Maps (longitude and latitude)

try changing

var markerdebug = new GMarker(map.getCenter()),{draggable:true});

into

markerdebug = new GMarker(map.getCenter(),{draggable:true});

How to find the right point in Google Maps (longitude and latitude)

Checked out your website, but the code is commented out so I can’t check with Firebug where the problem is!
I suppose the map fails to load even if you don’t use it in debug mode, so it could be a simple syntax error somewhere.
Could you try uncomment it (or create another page with the code uncommented) so we can try to debug it?
It would be very interesting, indeed.

The top ten best free Firefox extensions

Thank you, I checked out the Add-On and discovered there is even a function for publishers and ready made plugins for the major blog types. I installed it on this site.

How to find the right point in Google Maps (longitude and latitude)

You mean in the live example? Because in the article I don’t mention the zoom feature. The notation for zooming here in Italy is not different from the international standard. There’s even the lucky (for me!) event that you found an error in the live example! Did you experience inverted zooming on the live example? Where you using the scroller of the mouse or the controls on screen? If you’re using the scroller, what mouse do you have? What is your browser?