I highly recommend using geopy . It will return latitude and longitude, after which you can use it in the Google JS client.
>>> from geopy.geocoders import Nominatim >>> geolocator = Nominatim() >>> location = geolocator.geocode("175 5th Avenue NYC") >>> print(location.address) Flatiron Building, 175, 5th Avenue, Flatiron, New York, NYC, New York, ... >>> print((location.latitude, location.longitude)) (40.7410861, -73.9896297241625)
In addition, you can specifically determine that you want to use Google services using the GoogleV3 class as a geolocation
>>> from geopy.geocoders import GoogleV3 >>> geolocator = GoogleV3()
Mr.Coffee
source share