Parse tuple point response (v8) and minor fix in HereMapsRoutingIsolineV8 options parameter

This commit is contained in:
Mmoncadaisla 2021-05-17 13:25:54 +02:00
parent 8e6da0b6fa
commit e21d850679
2 changed files with 6 additions and 2 deletions

View File

@ -56,7 +56,8 @@ class HereMapsRoutingIsoline(Traceable):
options)
def __calculate_isolines(self, source, mode, data_range, range_type,
options=[]):
options=None):
options = [] if options is None else options
parsed_options = self.__parse_options(options)
source_param = self.__parse_source_param(source, parsed_options)
mode_param = self.__parse_mode_param(mode, parsed_options)

View File

@ -11,7 +11,10 @@ def geo_polyline_to_multipolygon(polyline):
else:
coordinates = []
for point in polyline:
lat, lon = point.split(',')
if isinstance(point, tuple):
lat, lon = point
else:
lat, lon = point.split(',')
coordinates.append("%s %s" % (lon, lat))
wkt_coordinates = ','.join(coordinates)