mccarthyryanc / folium_gee

A few simple functions to render Google Earth Engine Tile Layers with Folium
MIT License
18 stars 6 forks source link

__init__ reports error in Folium #5

Open guy1ziv2 opened 5 years ago

guy1ziv2 commented 5 years ago

I tried to run your example script -

 import ee
 import foliumgee

 ee.Initialize()

 image = ee.Image('srtm90_v4')
 m = foliumgee.map(image)
 m.save('srtm.html')

and get this -

TypeErrorTraceback (most recent call last)

in () 5 6 image = ee.Image('srtm90_v4') ----> 7 m = foliumgee.map(image) 8 m.save('srtm.html') /usr/local/lib/python2.7/dist-packages/foliumgee/__init__.pyc in map(image, vis_params, folium_kwargs, name) 34 folium_kwargs['name'] = name 35 ---> 36 return folium.Map(**folium_kwargs) 37 38 def layer(folium_map,image,vis_params=None,folium_kwargs={}): TypeError: __init__() got an unexpected keyword argument 'name'
mccarthyryanc commented 5 years ago

That was an attempt at cleaning up the legend names for custom tilelayers that required a special branch of folium. The pull request didn't get accepted so I revert this package back to old behavior. Try to reinstall and let know if works for you.

mccarthyryanc commented 5 years ago

BTW, @guy1ziv2 , the GEE docs say to use python 2.7, but I've been using 3.6 without any issues.