Skip to content

Commit

Permalink
revert back to default layer name in legend to resolve issue #5
Browse files Browse the repository at this point in the history
  • Loading branch information
mccarthyryanc committed Nov 5, 2018
1 parent de293e9 commit 6ac3dc0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
4 changes: 1 addition & 3 deletions foliumgee/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
'Google Earth Engine</a> ')
_gee_url = "https://earthengine.googleapis.com/map/%s/{z}/{x}/{y}?token=%s"

def map(image,vis_params=None,folium_kwargs={}, name='GEE Basemap'):
def map(image,vis_params=None,folium_kwargs={}):
"""
Function to view Google Earch Engine tile layer as a Folium map.
Expand All @@ -22,7 +22,6 @@ def map(image,vis_params=None,folium_kwargs={}, name='GEE Basemap'):
image : Google Earth Engine Image.
vis_params : Dict with visualization parameters.
folium_kwargs : Keyword args for Folium Map.
name : Legend name for basemap, default is 'GEE Basemap'.
"""

# Get the MapID and Token after applying parameters
Expand All @@ -31,7 +30,6 @@ def map(image,vis_params=None,folium_kwargs={}, name='GEE Basemap'):
token = image_info['token']
folium_kwargs['attr'] = (_gee_attr)
folium_kwargs['tiles'] = _gee_url%(mapid,token)
folium_kwargs['name'] = name

return folium.Map(**folium_kwargs)

Expand Down
3 changes: 1 addition & 2 deletions foliumgee/tests/test_add_map.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ def test_map(html=None):
vis_params = {'min':0.0, 'max':3000}
folium_params={'location':[lat, lon],
'zoom_start':zoom_start}
m = foliumgee.map(image,vis_params=vis_params,folium_kwargs=folium_params,
name='SRTM')
m = foliumgee.map(image,vis_params=vis_params,folium_kwargs=folium_params)

# Create a reference to the image collection
l8 = ee.ImageCollection('LANDSAT/LC8_L1T_TOA')
Expand Down

0 comments on commit 6ac3dc0

Please sign in to comment.