Closed
Description
I cannot get a flat filled color when I use polygon_marker. Instead I get a gradient that comes from Leaflet-DVF I suppose.
But many times, I would prefer to display a flat color.
Another point, I have noticed on the use of the property fill_color from polygon_marker is that the filled color is not displayed when you embed your map in a notebook.
Here is an example tested with 0.1.5
import folium
print folium.__version__
from IPython.display import HTML, display
def inline_map(m):
if isinstance(m, folium.folium.Map):
m._build_map()
srcdoc = m.HTML.replace('"', '"')
embed = HTML('<iframe srcdoc="{}" '
'style="width: {}px; height: {}px; '
'border: none"></iframe>'.format(srcdoc, m.width, m.height))
else:
raise ValueError('{!r} is not a folium Map instance.')
return embed
map_5 = folium.Map(width=600, height=400, location=[45.5236, -122.6750], zoom_start=13)
map_5.polygon_marker(location=[45.5318, -122.6745], popup='Broadway Bridge',
line_color='red',
fill_color='blue', num_sides=8, radius=10, fill_opacity=1)
inline_map(map_5)
Inspecting the SVG I find a
fill="url(#gradeac640f5-53f0-6c37-ea2b-10d33cbc9aa0)"
whereas in a saved html with map_5.create_map(path="myfile.html"), I get a
fill='blue' as expected (event if it is a gradient that is finally displayed).