I try to follow this page:
http://melandri.net/2009/07/03/get-location-coordinates-using-google-maps/
but GClientGeocoder() is not defined - there is an error.
I already us the google maps api on my page:
<script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?key=<%=System.Web.Configuration.WebConfigurationManager.AppSettings["myGoogleKey"]%>&sensor=false"></script>
How to resolve my error?
Here is how I succesfuly use the API:
var map = new google.maps.Map(document.getElementById("map_canvas"),
myOptions);
GClientGeocoder()
is a Version 2 object. You are loading the Version 3 API and need to use Version 3 objects and methods.
The Version 3 equivalent is google.maps.Geocoder()
and is described in the documentation. It's not the same as the Version 2 implementation.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With