get filled color for polygon_marker
See original GitHub issueI 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).
Issue Analytics
- State:
- Created 8 years ago
- Comments:13 (6 by maintainers)
Top Results From Across the Web
PolygonMarker | Wolfram Function Repository
ResourceFunction["PolygonMarker"][shape,spec] returns a Polygon graphics primitive that can be used in ... Filled markers with lighter filling colors: ...
Read more >Draw a closed and filled contour - python - Stack Overflow
I am trying to draw a closed contour an fill it up with (transparent or whatever) color with folium ...
Read more >How can we make publication-quality PlotMarkers without ...
PolygonMarker [shape, spec] returns Polygon graphics primitive which can be used in Graphics . ... Filled markers with lighter filling colors:
Read more >How can i fill a marker with color? - MATLAB Answers
I have two plots. How can I fill the marker in plot2? At the moment it is empty. With: plot(x(i),y(i),'s','MarkerFaceColor',colors(ID(i),:));???
Read more >How to set Point Symbol outline colour in UniqueValueRenderer
The colour is being applied to the fill, but not to the shape outline. ... GetEsriSymbolTable(symbolIndex) returns a tuple with font, ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hello all,
This is not working properly in folium 0.11. We still get gradient colors in RegularPolygonMarker. CircleMarker works fine.
Thank you, Patricio
@prodriguezciae I agree, any fix for this - it’s quite annoying. 👍