I have been trying to get my geocoder working this morning for the following URL but can't seem to figure out what I am doing wrong: http://www.dlplaw.com/media/map.html
When clicking encode, the geocoder is doing it's job and returning the correct Lat / Long coordinates but it gets hung up on setCenter.
Uncaught TypeError: Cannot call method 'setCenter' of undefined
I tried to follow the Google example here and can't understand why this won't work: http://code.google.com/apis/maps/documentation/javascript/examples/geocoding-simple.html
Thanks in advance.
map
is not in scope. You declaremap
twice – once in the global scope and once ininitialize
, but you only set themap
ininitialize
(the globalmap
is shadowed).Remove the
var
fromvar map = new google.maps.Map(...);
(but not thevar map;
at the top).