You need to log into your google api console and make sure that Google Maps Javascript API, Geolocation API, and the Geocoding API are all enabled for the api key you are using. Google recently added this api as separate options and they now have to be enabled individually.