Streamlit leafmap folium

Hi, does anyone know why this happens?

I’m trying to plot data from a netcdf file to a leafmap/folium map using this tutorial

However, the data is not showing up on the map

My app:

The code:

import leafmap.foliumap as leafmap
import streamlit as st


filename = ‘’
geojson = ‘
m = leafmap.Map(layers_control=True)
m.add_velocity(filename, zonal_speed=‘u_wind’, meridional_speed=‘v_wind’)

thanks !

Hi @jp12,

Without knowing the exact error message you’re getting or having access to the data file you’re using, it’s difficult to diagnose the issue precisely.

Can you please provide more information?


Hi @Charly_Wargnier,

There are no console errors

The repository with the data and code for this app is here:

Thanks for your prompt feedback, @jp12!

From what you shared, it seems that you’re attempting to load a local file, ‘,’ but it’s unclear if that file is correctly uploaded and accessible from the Streamlit app.

If the file isn’t uploaded correctly or can’t be accessed, no data will be displayed.

Can you please confirm that this has indeed been uploaded?


Hi @Charly_Wargnier , thanks !

You were correct, the filename was wrong.

Now, there’s a error on prompt


I’m not sure, but could you please check if the add_velocity function is supported by the foliumap backend of leafmap?


This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.