Closed notoriusjack closed 2 years ago
It would be a nice addition to add CircleMarker from folium to allow more control and display overlapping markers.
I have tried to use add_points_from_xy but without success. The following code snippet is what I am trying to replicate and works in folium
for i in range(len(filtered_data_street)): lat = filtered_data_street.iloc[i]['latitude'] long = filtered_data_street.iloc[i]['longitude'] popup_text = """Crime : {}<br> Month : {}<br>""" popup_text = popup_text.format(filtered_data_street.iloc[i]['Crime type'], filtered_data_street.iloc[i]['Month'] ) if filtered_data_street.iloc[i]['Crime type'] == 'Violence and sexual offences': color = c_violence print(color) folium.CircleMarker(location=[lat, long], radius=10, popup=popup_text, fill=True, color='red').add_to( marker_cluster) elif filtered_data_street.iloc[i]['Crime type'] == 'Anti-social behaviour': color = c_violence print(color) folium.CircleMarker(location = [lat, long], radius=10, popup= popup_text, fill =True, color='orange').add_to(marker_cluster)
See https://leafmap.org/notebooks/35_circle_markers
Description
It would be a nice addition to add CircleMarker from folium to allow more control and display overlapping markers.
I have tried to use add_points_from_xy but without success. The following code snippet is what I am trying to replicate and works in folium
Source code