Skip to content

Commit

Permalink
Add example of point_to_layer usage
Browse files Browse the repository at this point in the history
  • Loading branch information
hansthen committed Dec 28, 2023
1 parent 5c35894 commit d1a7b5a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions folium/plugins/realtime.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ class Realtime(JSCSSMixin, MacroElement):
>>> rt = Realtime(
... "https://raw.githubusercontent.com/python-visualization/folium-example-data/main/subway_stations.geojson",
... get_feature_id=JsCode("(f) => { return f.properties.objectid; }"),
... point_to_layer=JsCode(
... "(f, latlng) => { return L.circleMarker(latlng, {radius: 8, fillOpacity: 0.2})}"
... ),
... interval=10000,
... )
>>> rt.add_to(m)
Expand Down

0 comments on commit d1a7b5a

Please sign in to comment.