I've got a pretty basic function that grabs the users current location. When I alert or log the geoCoder variable I successfully get a value. I'm trying to put that geoCoder value inside of my JSON call.
function userLocation(location, callback) {
var geoCoder = new google.maps.Geocoder();
geoCoder.geocode({
location: location
}
console.log(geoCoder);
}
var jsonCall;
jsonCall = '/bin/userlocation/locations.' + geoCoder + '.json'
When I run this I get a geoCoder is not defined js error. How would I go about getting the value of the geoCoder variable? I'm kind of a newb so code examples are appreciated.