Commits

timbutler committed 8b9e2aa

Updated to use Google V3 API

  • Participants
  • Parent commits 44b1cd3

Comments (0)

Files changed (1)

File easy_maps/models.py

             return
         try:
             if hasattr(settings, "EASY_MAPS_GOOGLE_KEY") and settings.EASY_MAPS_GOOGLE_KEY:
-                g = geocoders.Google(settings.EASY_MAPS_GOOGLE_KEY)
+                g = geocoders.GoogleV3(settings.EASY_MAPS_GOOGLE_KEY)
             else:
-                g = geocoders.Google(resource='maps')
+                g = geocoders.GoogleV3(resource='maps')
             address = smart_str(self.address)
             self.computed_address, (self.latitude, self.longitude,) = g.geocode(address, exactly_one=False)[0]
             self.geocode_error = False