bills commited on
Commit
ead65bf
1 Parent(s): c8281c5

Edit app.py

Browse files
Files changed (1) hide show
  1. apps/home.py +3 -3
apps/home.py CHANGED
@@ -32,11 +32,11 @@ def app():
32
  ais_data = folium.FeatureGroup(name="marine_vessels")
33
  mCluster = MarkerCluster(name="Marine Vessels")
34
  for i in ais_list:
35
- html = f"<h3>{i[1]}</h3> Vessel Type: {i[8]} </br> Destination Port: {i[2]} </br> Reported Destination: {i[4]} </br> Current Port: {i[6]}\
36
- </br> Latitude: {i[10]} </br> Longitude: {i[11]}"
37
  iframe = folium.IFrame(html)
38
  popup = folium.Popup(iframe, min_width=250, max_width=300)
39
- ais_data.add_child(mCluster.add_child(folium.Marker(location=[i[10], i[11]], popup=popup, icon=folium.Icon(color="black", icon="ship", prefix="fa"))))
40
  jakarta_vessels.add_child(ais_data)
41
  folium_static(jakarta_vessels, width=1100, height=700)
42
 
 
32
  ais_data = folium.FeatureGroup(name="marine_vessels")
33
  mCluster = MarkerCluster(name="Marine Vessels")
34
  for i in ais_list:
35
+ html = f"<h3>{i[1]}</h3> Vessel Type: {i[7]} </br> Destination Port: {i[2]} </br> Reported Destination: {i[4]} </br> Current Port: {i[5]}\
36
+ </br> Latitude: {i[9]} </br> Longitude: {i[10]}"
37
  iframe = folium.IFrame(html)
38
  popup = folium.Popup(iframe, min_width=250, max_width=300)
39
+ ais_data.add_child(mCluster.add_child(folium.Marker(location=[i[9], i[10]], popup=popup, icon=folium.Icon(color="black", icon="ship", prefix="fa"))))
40
  jakarta_vessels.add_child(ais_data)
41
  folium_static(jakarta_vessels, width=1100, height=700)
42