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

Class BaseMultiLocation

folium/vector_layers.py:128–152  ·  view source on GitHub ↗

Base class for vector classes with multiple coordinates. :meta private:

Source from the content-addressed store, hash-verified

126
127
128class BaseMultiLocation(MacroElement):
129 """Base class for vector classes with multiple coordinates.
130
131 :meta private:
132
133 """
134
135 def __init__(
136 self,
137 locations: TypeMultiLine,
138 popup: Union[Popup, str, None] = None,
139 tooltip: Union[Tooltip, str, None] = None,
140 ):
141 super().__init__()
142 self.locations = validate_multi_locations(locations)
143 if popup is not None:
144 self.add_child(popup if isinstance(popup, Popup) else Popup(str(popup)))
145 if tooltip is not None:
146 self.add_child(
147 tooltip if isinstance(tooltip, Tooltip) else Tooltip(str(tooltip))
148 )
149
150 def _get_self_bounds(self) -> List[List[Optional[float]]]:
151 """Compute the bounds of the object itself."""
152 return get_bounds(self.locations)
153
154
155class PolyLine(BaseMultiLocation):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…