Using the Google API - GClientGeocoder ()

I am trying to follow this page:

http://melandri.net/2009/07/03/get-location-coordinates-using-google-maps/ 

but GClientGeocoder () is undefined - an error has occurred.

I already find 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 mistake?

This is how I succesfuly use the API:

 var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions); 
+6
source share
1 answer

GClientGeocoder() is a Version 2 object. You are loading the Version 3 API and must use the Version 3 objects and methods.

equivalent to version 3 of google.maps.Geocoder() and is described in the documentation . This is not the same as version 2 implementation.

+19
source

Source: https://habr.com/ru/post/913551/


All Articles