When add_last_point=True I see two markers as expected but when I set add_last_point=False, the marker disappears completely.
Relevant bit of code.
features = []
for index, row in df.iterrows():
coordinates = [row['longitude'], row['latitude']]
feature = {
'type': 'Feature',
'geometry': {
'type': 'LineString',
'coordinates': [[row['latitude'], row['longitude']]] # LineString needs at least two points
},
'properties': {
'time': row['timestamp'],
"icon": "marker",
"iconstyle": {
"iconUrl": 'picture.png',
"iconSize": [50, 50],
}
}
}
features.append(feature)
geojson_data = {
'type': 'FeatureCollection',
'features': features
}
# Adding TimestampedGeoJson to the map
plugins.TimestampedGeoJson(
geojson_data,
period='PT1S',
add_last_point=False,
duration="PT1S",
auto_play=True,
loop=True,
max_speed=4.0
loop_button=True,
time_slider_drag_update=True,
transition_time=500, #i sec
date_options='YYYY/MM/DD hh:mm:ss',
).add_to(mapObj)
# Adding PolyLine using imported data
folium.PolyLine(
locations=df[['longitude', 'latitude']].values.tolist(),
color="red",
weight=4
).add_to(mapObj)