Google Maps Api

grasshopper
python

(Aononye) #1

Please is there anyway to import the googlemaps module into ghpython? Or that is not possible at this time?

Thanks.


(Giulio Piacentino) #2

Hi @aononye,

did you try installing it into a location known to sys.path and importing it?

Thanks,

Giulio


Giulio Piacentino
for Robert McNeel & Associates
giulio@mcneel.com


(Aononye) #4

Thanks for your response Glullo.

I have little knowledge about package installation except using “pip install”. However, i added the folder location to the module search path. Still nothing.



(Giulio Piacentino) #5

Hi @aononye

I went a stretch further and made this work for you. To make it work:

  • You will need to unzip the files into a folder (if you don’t change my definition, it needs to be the Desktop, inside another folder called “googlemaps”). Watch out! There are 2 folders called googlemaps, one inside the other.

desktop

googlemaps.zip (483.2 KB)

googlemaps.gh (3.3 KB)

  • It should then work as it does here. You’ll need to parse the results.

I hope this helps,

Thanks,

Giulio


Giulio Piacentino
for Robert McNeel & Associates
giulio@mcneel.com


(Aononye) #6

Thanks Giulio!

Not sure why i am getting this error.

image

I looked online and i saw it has something to do with the link below but not sure how to make this change. Rhino 6 is currently running on ironpython 2.7.5. I also reinstalled ironpython.


(Giulio Piacentino) #7

You need to enable frames in IronPython via the _EditPythonScript options.


(Aononye) #8

Giulio you have been rely helpful. Thanks.

Another error showed up. not sure why.

image


(Giulio Piacentino) #9

I am not sure why. Maybe try downloading and placing that module into the same folder.