0

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.
This commit is contained in:
Jamie Bliss
2015-02-23 21:16:49 +01:00
committed by MasterofJOKers
parent 7229fcc3df
commit 3cd2afb0c4

View File

@@ -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']