Click here to Skip to main content
15,889,877 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hey what,s up i am trying to make a map through the library of folium but i am not getting the popup visible



Here is the code

import folium

import pandas

data = pandas.read_csv("makers.csv")

lat = list(data["LAT"])

lon = list(data["LON"])

elev = list(data["ELEV"])

map1 = folium.Map(location = [38.58, -99.09],tiles = "Mapbox Bright",zoom_start = 6 )

f = folium.FeatureGroup(name = "My map")


def color_picker(elevation):
if elevation < 1000:
return "green"

elif elevation >= 1000 and elevation <= 3000:
return "orange"

else:
return "red"

for lt, ln, el in zip(lat, lon, elev):
f.add_child(folium.CircleMarker(location=[lt, ln], popup=str(el),

icon = folium.Icon(color = color_picker(el) )))

map1.add_child(f)

map1.save("Map1.html")

What I have tried:

I tried to find the solution on internet. But maybe i have missed something ..
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900