Skip to content

Commit

Permalink
Add CustomIcon as accepted type of Marker icon
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelsapphire committed Dec 17, 2024
1 parent 3a15bf7 commit 643a567
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions folium/map.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import warnings
from collections import OrderedDict
from typing import List, Optional, Sequence, Union
from typing import TYPE_CHECKING, List, Optional, Sequence, Union

from branca.element import Element, Figure, Html, MacroElement

Expand All @@ -21,6 +21,9 @@
validate_location,
)

if TYPE_CHECKING:
from folium.features import CustomIcon, DivIcon


class Evented(MacroElement):
"""The base class for Layer and Map
Expand Down Expand Up @@ -373,7 +376,7 @@ def __init__(
location: Optional[Sequence[float]] = None,
popup: Union["Popup", str, None] = None,
tooltip: Union["Tooltip", str, None] = None,
icon: Optional[Union[Icon, "DivIcon"]] = None,
icon: Optional[Union[Icon, "CustomIcon", "DivIcon"]] = None,
draggable: bool = False,
**kwargs: TypeJsonValue,
):
Expand Down

0 comments on commit 643a567

Please sign in to comment.