MCPcopy Create free account
hub / github.com/python-visualization/folium / Icon

Class Icon

folium/map.py:286–373  ·  view source on GitHub ↗

Creates an Icon object that will be rendered using Leaflet.awesome-markers. Parameters ---------- color : str, default 'blue' The color of the marker. You can use: ['red', 'blue', 'green', 'purple', 'orange', 'darkred', 'lightred', 'beige', 'da

Source from the content-addressed store, hash-verified

284
285
286class Icon(MacroElement):
287 """
288 Creates an Icon object that will be rendered
289 using Leaflet.awesome-markers.
290
291 Parameters
292 ----------
293 color : str, default 'blue'
294 The color of the marker. You can use:
295
296 ['red', 'blue', 'green', 'purple', 'orange', 'darkred',
297 'lightred', 'beige', 'darkblue', 'darkgreen', 'cadetblue',
298 'darkpurple', 'white', 'pink', 'lightblue', 'lightgreen',
299 'gray', 'black', 'lightgray']
300
301 icon_color : str, default 'white'
302 The color of the drawing on the marker. You can use colors above,
303 or an html color code.
304 icon : str, default 'info-sign'
305 The name of the marker sign.
306 See Font-Awesome website to choose yours.
307 Warning : depending on the icon you choose you may need to adapt
308 the `prefix` as well.
309 angle : int, default 0
310 The icon will be rotated by this amount of degrees.
311 prefix : str, default 'glyphicon'
312 The prefix states the source of the icon. 'fa' for font-awesome or
313 'glyphicon' for bootstrap 3.
314
315 https://github.com/lvoogdt/Leaflet.awesome-markers
316
317 """
318
319 _template = Template(
320 """
321 {% macro script(this, kwargs) %}
322 var {{ this.get_name() }} = L.AwesomeMarkers.icon(
323 {{ this.options|tojavascript }}
324 );
325 {% endmacro %}
326 """
327 )
328 color_options = {
329 "red",
330 "darkred",
331 "lightred",
332 "orange",
333 "beige",
334 "green",
335 "darkgreen",
336 "lightgreen",
337 "blue",
338 "darkblue",
339 "cadetblue",
340 "lightblue",
341 "purple",
342 "darkpurple",
343 "pink",

Callers 1

Calls 1

TemplateClass · 0.90

Tested by 1

Used in the wild real call sites across dependent graphs

searching dependent graphs…