Skip to content

Commit

Permalink
extra option
Browse files Browse the repository at this point in the history
  • Loading branch information
xoolive committed May 27, 2024
1 parent 0577aa6 commit b3727f9
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/traffic/visualize/leaflet.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,12 @@ def route_leaflet(self: Any, **kwargs: Any) -> Optional[Polyline]:
return Polyline(locations=coords, **kwargs)


def map_add(_map: Map, elt: Any, **kwargs: Any) -> Any:
def map_add(
_map: Map,
elt: Any,
with_points: bool = True,
**kwargs: Any,
) -> Any:
from ..core import (
Airspace,
Flight,
Expand Down Expand Up @@ -325,8 +330,9 @@ def map_add(_map: Map, elt: Any, **kwargs: Any) -> Any:
if isinstance(elt, Route):
layer = elt.leaflet(**kwargs)
_old_add(_map, layer)
for point in elt.navaids:
map_add(_map, point, **kwargs)
if with_points:
for point in elt.navaids:
map_add(_map, point, **kwargs)
return layer
if isinstance(elt, FlightIterator):
for segment in elt:
Expand Down

0 comments on commit b3727f9

Please sign in to comment.