AttributeError: 'Map' object has no attribute 'Marker'
AttributeError: 'Map' object has no attribute 'Marker'
我有以下代码:
import folium
from folium.plugins import MarkerCluster
map1 = folium.Map(location=SF_COORDINATES, zoom_start=12)
marker_cluster = MarkerCluster().add_to(map1)
for each in data[0:MAX_RECORDS].iterrows():
map1.Marker(location = [each[1]['Y'],each[1]['X']],
clustered_marker = True).add_to(marker_cluster)
display(map1)
我收到此错误消息:
AttributeError: 'Map' object has no attribute 'Marker'
有人可以帮忙吗?谢谢
Marker
是 folium
的一部分,而不是 folium.Map
.
的一部分
我有以下代码:
import folium
from folium.plugins import MarkerCluster
map1 = folium.Map(location=SF_COORDINATES, zoom_start=12)
marker_cluster = MarkerCluster().add_to(map1)
for each in data[0:MAX_RECORDS].iterrows():
map1.Marker(location = [each[1]['Y'],each[1]['X']],
clustered_marker = True).add_to(marker_cluster)
display(map1)
我收到此错误消息:
AttributeError: 'Map' object has no attribute 'Marker'
有人可以帮忙吗?谢谢
Marker
是 folium
的一部分,而不是 folium.Map
.