You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I tried to change the marker of the features of a TimeLine object. The GeoJSON input data only contains Point geometries.
Since TimeLine should base on GeoJSON class, I tried using the marker keyword in the timeline. The python code runs without an error, but when I try to open the map in the browser I get the following error:
Uncaught ReferenceError: circle_edc1a78feb8824a28fc2c53a5e766edf is not defined
at folium_ywd748p8.html:102:13
So apparently the circle referenced by the timeline_options is not created.
To Reproduce
import geopandas as gpd
from datetime import datetime
import folium
from folium.plugins import Timeline, TimelineSlider
data = gpd.read_file("https://raw.githubusercontent.com/python-visualization/folium-example-data/main/subway_stations.geojson")
data["start"] = (datetime.strptime("01.01.2025", "%d.%m.%Y")).timestamp()*10e2
data["end"] = (datetime.strptime("01.01.2026", "%d.%m.%Y")).timestamp()*10e2
m = folium.Map()
timeline = Timeline(
data=data,
marker = folium.Circle(radius=3, color="black")
).add_to(m)
TimelineSlider(
auto_play=False,
show_ticks=True,
enable_keyboard_controls=True,
start = (datetime.strptime("01.01.2024", "%d.%m.%Y")).timestamp()*10e2
).add_timelines(timeline).add_to(m)
m.show_in_browser()
Expected behavior
I would except that when the timeline class is based on the GeoJSON class, that I can change the marker for Point geometries with the marker keyword. The marker also needs to be created, when the map object is rendered to html.
Environment (please complete the following information):
Browser: MS Edge Version 131.0.2903.86
Python version: 3.9.7
folium version: 0.19.4
branca version: 0.8.1
The text was updated successfully, but these errors were encountered:
Okay, understood.
The workaround is working fine for me, thank you for providing that. I think in combination with the style_function there are hardly any or no restrictions, so I'll close this bug.
Describe the bug
I tried to change the marker of the features of a TimeLine object. The GeoJSON input data only contains Point geometries.
Since TimeLine should base on GeoJSON class, I tried using the marker keyword in the timeline. The python code runs without an error, but when I try to open the map in the browser I get the following error:
To Reproduce
Expected behavior
I would except that when the timeline class is based on the GeoJSON class, that I can change the marker for Point geometries with the marker keyword. The marker also needs to be created, when the map object is rendered to html.
Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: