Google map / jquery reverse geocoding
I have a google map that takes and puts coordinates from input fields.
Everything works fine - but now I want to try and add the ability to search by address to it - (address lookup) and I can't get it to work ...
Fiddle here: http://jsfiddle.net/obmerk99/rcTUH/
Any insight will be greatly appreciated. (and be gentle - I'm not a JS ninja :-))
+3
source to share
3 answers
You had two small problems that could be easily spotted in the browser debug console
/* geocoder was undefined ..add following*/
var geocoder= new google.maps.Geocoder();
/* exixting code*/
map = new google.maps.Map($('#map')[0], myOptions);
placeMarker(myLatlng);
/* changed variable in argument from "latLng" to "myLatLng"*/
GeoCode(myLatlng);
Working demo: http://jsfiddle.net/rcTUH/6/
0
source to share