Folium:渲染问题

时间:2018-01-24 07:49:35

标签: python visualization folium

有没有人试图在Folium地图上显示数据并最终得到灰色块,如下图所示? enter image description here

我使用的代码如下所示

 m = folium.Map([41.8781, -87.6298], 
               zoom_start=11)

for i, row in df_1.iterrows(): 
            if(row['counts'] < 300):
                for i in range(0, 5):
                    folium.CircleMarker(location=[row['start_latitude'], row['start_longitude']], radius=10,
                                        color='#00000000',fill = True,
                                        fill_color='blue').add_to(m)
            elif(row['counts'] < 1000):
                for i in range(0, 5):
                    folium.CircleMarker(location=[row['start_latitude'], row['start_longitude']], radius=10,
                                        color='#00000000',fill = True,
                                        fill_color='green').add_to(m)
            elif(row['counts'] < 2000):
                for i in range(0, 5):
                    folium.CircleMarker(location=[row['start_latitude'], row['start_longitude']], radius=10,
                                        color='#00000000',fill = True,
                                        fill_color='yellow').add_to(m)
            else:
                for i in range(0, 5):
                    folium.CircleMarker(location=[row['start_latitude'], row['start_longitude']], radius=10,
                                        color='#00000000',fill = True,
                                        fill_color='crimson').add_to(m)

m.save('mapPlot.html')

一般情况下,我试图根据它的计数绘制每个点的颜色。我循环绘制相同的区域5次,以巩固颜色,因为叶片中的圆圈标记略微透明。一切正常,但当我尝试放大以获取更多信息时,某些地方不会渲染产生灰色框。因此,有没有办法修复和删除这些灰色块?

0 个答案:

没有答案