mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Make lines_to_leaflet tolerant of single lines.
This commit is contained in:
parent
d488bcffbd
commit
1adafac35f
@ -34,6 +34,10 @@ class ShapelyUtil:
|
||||
|
||||
@classmethod
|
||||
def lines_to_leaflet(
|
||||
cls, lines: MultiLineString, theater: ConflictTheater
|
||||
cls, line_string: MultiLineString | LineString, theater: ConflictTheater
|
||||
) -> list[list[LeafletLatLon]]:
|
||||
return [cls.line_to_leaflet(line, theater) for line in lines.geoms]
|
||||
if isinstance(line_string, MultiLineString):
|
||||
lines = line_string.geoms
|
||||
else:
|
||||
lines = [line_string]
|
||||
return [cls.line_to_leaflet(line, theater) for line in lines]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user