From 3cd2afb0c4976a9102bbe8b1e0ba9d29d97c4051 Mon Sep 17 00:00:00 2001 From: Jamie Bliss Date: Mon, 23 Feb 2015 21:16:49 +0100 Subject: [PATCH] genPOI: don't ignore invalid polyline point There is no point in ignoring an invalid point, because without an error message the user might wonder, why it's poyline doesn't look the way it should. --- overviewer_core/aux_files/genPOI.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/overviewer_core/aux_files/genPOI.py b/overviewer_core/aux_files/genPOI.py index 4027d03..0d0851b 100755 --- a/overviewer_core/aux_files/genPOI.py +++ b/overviewer_core/aux_files/genPOI.py @@ -314,9 +314,7 @@ def create_marker_from_filter_result(poi, result): if 'polyline' in result and hasattr(result['polyline'], '__iter__'): d['polyline'] = [] for point in result['polyline']: - # This poor man's validation code almost definately needs improving. - if type(point) == dict: - d['polyline'].append(dict(x=point['x'], y=point['y'], z=point['z'])) + d['polyline'].append(dict(x=point['x'], y=point['y'], z=point['z'])) # point.copy() would work, but this validates better if isinstance(result['color'], basestring): d['strokeColor'] = result['color']