question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Easy way to add title for folium maps

See original GitHub issue
#Here is my contribution to include title to folium maps:
m = folium.Map()

title_html = '''
             <h3 align="center" style="font-size:20px"><b>Your map title</b></h3>
             '''
m.get_root().html.add_child(folium.Element(title_html))

m

Problem description

There is currently no argument for title in the the folium.Map() method.

The current available method to include title is quite difficult requiring some lines of html code and then passing that through get_root().html.add_child()

Expected Output

It would be great to have something like: folium.Map(title=“Your map title”)

Output of folium.__version__

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:14
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

11reactions
ocefpafcommented, Sep 4, 2019

Bokeh is a plotting library and not a exclusive mapping library. Please, go for Bokeh for those needs! Better yet, check geoviews.

9reactions
ocefpafcommented, Sep 4, 2019

folium.Map(title=“Your map title”)

It is folium.Map(titles=url, attr="attribution"). Please check the docs!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Adding a Title or Text to a Folium Map - Stack Overflow
Of course you can add a title to a Folium map. For example: import folium loc = 'Corpus Christi' title_html = ''' <h3...
Read more >
Quickstart — Folium 0.12.1 documentation - GitHub Pages
To create a base map, simply pass your starting coordinates to Folium: [1]:. import folium m = folium.Map(location=[45.5236, -122.6750]).
Read more >
Use HTML in Folium Maps: A Comprehensive Guide for Data ...
Creating a basic folium map is simple. We first initiate an empty map and then loop through the rows in the data frame...
Read more >
25 map title - leafmap
In [1]: · # !pip install leafmap. # !pip install leafmap. The notebook requires the folium plotting backend. ipyleaflet is not supported. ;...
Read more >
[Example code]-Adding a Title or Text to a Folium Map
Of course you can add a title to a Folium map. For example: import folium loc = 'Corpus Christi' title_html = ''' <h3...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found