leafmap.leafmap fails to show the gdf if index does not start with 0? Sometimes, we filter gdf during preprocessing, and thus, the index does not start with 0. leafmap.foliumap works with any index.
show_what_fails = True
import geopandas as gpd
from shapely.geometry import Point
if show_what_fails:
import leafmap.leafmap as leafmap
else:
import leafmap.foliumap as leafmap
gdf = gpd.GeoDataFrame({"geometry": [Point(70.778174, 26.654166)]}, crs="EPSG:4326")
gdf.index = [1]
m = leafmap.Map()
m.add_basemap("HYBRID")
m.add_gdf(gdf)
m
Environment Information
Description
leafmap.leafmap
fails to show thegdf
if index does not start with 0? Sometimes, we filter gdf during preprocessing, and thus, the index does not start with 0.leafmap.foliumap
works with any index.