That function will never return the result because geocoding is an asynchronous process within the context of gmap3. Which is why a callback is being passed upon calling the method. So when the geocoder sends back the data the callback is called allowing the outside world to do something with that value. The short of it is that the GetLatLngFromZip() function requires an additional argument that should be a function which pases the zipcode value once it has been resolved.