UjjwalKGupta commited on
Commit
1855ff3
1 Parent(s): 574acf1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -157,8 +157,9 @@ def get_dem_slope_maps(buffer_ee_geometry):
157
  vis_params = {"min": min_value, "max": max_value, "palette": ["blue", "green", "yellow", "red"]}
158
  dem_map.addLayer(contours, vis_params, "Contours")
159
  # Create a colormap
160
- colormap = cm.LinearColormap(colors=vis_params["palette"], vmin=vis_params["min"], vmax=vis_params["max"])
161
- dem_map.add_child(colormap)
 
162
 
163
  # Create the map for Slope
164
  slope_map = gee_folium.Map()
@@ -569,5 +570,5 @@ if "result" in st.session_state:
569
  style_function=lambda x: {"color": "blue", "fillOpacity": 0.0, "fillColor": "blue"},
570
  )
571
  write_info(f"""<div style="text-align: center;">{title}</div>""")
572
- param_map.add_scale()
573
  param_map.to_streamlit()
 
157
  vis_params = {"min": min_value, "max": max_value, "palette": ["blue", "green", "yellow", "red"]}
158
  dem_map.addLayer(contours, vis_params, "Contours")
159
  # Create a colormap
160
+ #colormap = cm.LinearColormap(colors=vis_params["palette"], vmin=vis_params["min"], vmax=vis_params["max"])
161
+ #dem_map.add_child(colormap)
162
+ dem_map.add_colormap(vis_params=vis_params, discrete=True, tick_size=12, bg_color='white')
163
 
164
  # Create the map for Slope
165
  slope_map = gee_folium.Map()
 
570
  style_function=lambda x: {"color": "blue", "fillOpacity": 0.0, "fillColor": "blue"},
571
  )
572
  write_info(f"""<div style="text-align: center;">{title}</div>""")
573
+ param_map.add_layer_control()
574
  param_map.to_streamlit()