Friday, 15 June 2012

javascript - Google maps API can't get the longitude -


I am trying to get latitude and latitude for an address with google map api, but i do not know How to do it? This is an example of what I'm trying to do:

  GoogleObjectAdress ("New York") - & gt; And this should be the longitude and latitude back for me!  

Any solution?

Try the following code:

  & lt; Script src = "http://maps.google.com/maps?file=api&v=2.x&key=YourApiKey" type = "text / javascript" & gt; & Lt; / Script & gt; Var Geocoder = New GCL GuoCoder (); Geocoder.getLatLng ("New York", function (dot) {// code});  

For more information, read.


No comments:

Post a Comment