Skip to content

Commit

Permalink
Fix Randy's terrible formatting (#188)
Browse files Browse the repository at this point in the history
  • Loading branch information
blackary authored May 7, 2024
1 parent ce82c39 commit b231927
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions examples/pages/realtime.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@
"""
function(responseHandler, errorHandler) {
var url = 'https://api.wheretheiss.at/v1/satellites/25544';
fetch(url)
.then((response) => {
return response.json().then((data) => {
var { id, timestamp, longitude, latitude } = data;
return {
'type': 'FeatureCollection',
'features': [{
Expand All @@ -53,7 +53,7 @@
}
"""
)

on_each_feature = folium.JsCode(
"""
(feature, layer) => {
Expand All @@ -67,11 +67,11 @@
location: event.sourceTarget.feature.geometry
});
});
}
"""
)

update_feature = folium.JsCode(
"""
(feature, layer) => {
Expand All @@ -83,14 +83,14 @@
}
"""
)

Realtime(
source,
on_each_feature=on_each_feature,
update_feature=update_feature,
interval=10000,
).add_to(m)

data = st_folium(m, returned_objects=[], debug=False)

st.write(data)

0 comments on commit b231927

Please sign in to comment.