Hi,
I am trying to get the latitude and longitudes from an address posted by the
user into a database. I am using the code below using php and google maps
API. Can someone help with the code below. Is this the right forum to ask
this?
function load(){
if (GBrowserIsCompatible()) {
var map = new GMap2(document.getElementById("map"));
map.addControl(new GSmallMapControl());
map.addControl(new GMapTypeControl());
var homeAddress = "<?php echo $_POST["address"] ?>";
var geoCoder = new GClientGeocoder();
geoCoder.getLatLng(homeAddress, function(point) {
map.setCenter(point, 14);
var marker = new GMarker(map.getCenter());
GEvent.addListener(marker, "click", function () {
marker.openInfoWindowHtml("I am safe");
});
map.addOverlay(marker);
/*map.addOverlay(new GMarker(point));
map.openInfoWindowHtml(point, "I am safe!");*/
});
}
}
Very much appreciate your help
Thanks
--
You received this message because you are subscribed to the Google Groups
"Google Maps API" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-maps-api?hl=en.