Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using service account #2

Closed
guy1ziv2 opened this issue Jun 28, 2018 · 4 comments
Closed

Using service account #2

guy1ziv2 opened this issue Jun 28, 2018 · 4 comments

Comments

@guy1ziv2
Copy link

I am trying to use this with a service account on a Colab. This does not work because line 7 in your main code -
ee.Initialize()
whereas I need to have
credentials = ee.ServiceAccountCredentials(service_account, 'privatekey.json')
ee.Initialize(credentials)

Can I ask why you initialize at all? Why not assume the user of the package initialize somehow before running any of the codes in your package ?

Guy

@mccarthyryanc
Copy link
Owner

@guy1ziv2 good points. This was a quick and dirty way to get GEE into folium. Let me clean this up a little and turn it into a more robust package.

@mccarthyryanc
Copy link
Owner

@guy1ziv2 , I updated the code and made it more like a real package. I'm not very familiar with Colab, do you mind testing out the install and applying service account creds?

@guy1ziv2
Copy link
Author

guy1ziv2 commented Jun 29, 2018

It works nicely ! @mccarthyryanc Is there a way in the .ipynb example to rename the SRTM layer so that in the overlay control it shows us as something other than a long URL?

@mccarthyryanc
Copy link
Owner

@guy1ziv2 good question. I don't like how that looks either but I'm not sure how to fix it... I might need to dig into the Folium source... have to find out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants