Skip to content

Numbers in map marker in Folium #734

@shubham039

Description

@shubham039

i want to display some geo locations on map, but i want the map-pin icon to display numbers instead of the default map pin.
Is there any way to do that?

I checked in font awesome icons but it didn't work.

Below is my code:

import folium
m = folium.Map(
    location=[45.3288, -121.6625],
    zoom_start=12,
    #tiles='Mapbox Bright'
)

folium.Marker([45.3288, -121.6625], popup='<i>Mt. Hood Meadows</i>').add_to(m)
folium.Marker([45.3311, -121.7113], popup='<b>Timberline Lodge</b>',icon=folium.Icon(color='red')).add_to(m)
m

enter image description here

What i want is instead of this default map marker i want to include numbers in my marker instead of info-sign

Something like this:

enter image description here

i couldn't find the answer anywhere. Any leads on this?

display number 1 to 9 inside map marker pin

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestFeature request or idea about how to make folium better

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions