Skip to content

Commit 30edf51

Browse files
committed
Merge pull request #313 from ocefpaf/iter_points_tuple
iter_points list/tuple
2 parents 85cc200 + ddf1453 commit 30edf51

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

folium/utilities.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -449,9 +449,9 @@ def iter_points(x):
449449
"""Iterates over a list representing a feature, and returns a list of points,
450450
whatever the shape of the array (Point, MultiPolyline, etc).
451451
"""
452-
if isinstance(x, list):
452+
if isinstance(x, (list, tuple)):
453453
if len(x):
454-
if isinstance(x[0], list):
454+
if isinstance(x[0], (list, tuple)):
455455
out = []
456456
for y in x:
457457
out += iter_points(y)
@@ -461,4 +461,4 @@ def iter_points(x):
461461
else:
462462
return []
463463
else:
464-
raise ValueError('List type expected. Got {!r}.'.format(x))
464+
raise ValueError('List/tuple type expected. Got {!r}.'.format(x))

0 commit comments

Comments
 (0)