Я создал файл geo json с меткой времени для нанесения маркеров на карте следующим образом:
def create_geojson_features(df):
features = []
for lat,lan,intensity,time in zip(df['latitude'],df['longitude'],df['intensity'],df['timestamp']):
time = str(time)
feature = {
'type': 'Feature',
'geometry': {
'type':'Point',
'coordinates':[lan,lat]
},
'properties': {'time':time,'marker-color':'red','iconstyle':{'marker-color':'red'}
}
}
features.append(feature)
return features
features = create_geojson_features(df)
from folium.plugins import TimestampedGeoJson
m = folium.Map([latmean,lonmean], zoom_start=11)
TimestampedGeoJson(
{'type': 'FeatureCollection',
'features': features}
, period='PT1H'
, duration= 'PT1H'
, add_last_point=True
, auto_play=False
, loop=False
, max_speed=1
, loop_button=True
, date_options='YYYY/MM/DD HH:mm:ss'
, time_slider_drag_update=True
).add_to(m)
Я пробовал разные вещи, такие как 'style', 'iconColor', но, похоже, не работает, единственное Цвет каждого маркера синий. Не могли бы вы помочь?