Skip to content

When API KEY From Google is used, the code crashes lol #193

@spyderkavin

Description

@spyderkavin

Try the code below with an API KEY, and then try w/o the api key.. Its wierfd

# from pprint import pprint
import googlemaps
import os
import gmplot as gm

apikey = ' '
map_client = googlemaps.Client(API_KEY)

#address = '1285 Escuela Pkwy, Milpitas, CA' #Not a required component
response = map_client.geocode(address)
lat = response[0]['geometry']['location']['lat']
lng = response[0]['geometry']['location']['lng']
print(lat, lng)

gmap = gm.GoogleMapPlotter(37.4499145,-121.9050326, 14, apikey=apikey)

gmap.marker(37.4507577,-121.9005336, color='red')
gmap.draw('map.html')
print(os.getcwd())

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions