Do not set routingmode if transportmode value is equivalent to 'walk' mode for HERE Isolines v8.4

This commit is contained in:
Mmoncadaisla 2021-05-18 15:14:37 +02:00
parent f32d37f312
commit a16f00966e

View File

@ -168,10 +168,12 @@ class HereMapsRoutingIsolineV8(Traceable):
QUALITY_PARAM_V7 = 'quality'
DEFAULT_OPTIMIZEFOR = 'quality'
DEFAULT_ROUTINGMODE = 'short'
HERE_WALK_MODE = "pedestrian"
HERE_CAR_MODE = "car"
ACCEPTED_MODES = {
"walk": "pedestrian",
"car": "car"
"walk": HERE_WALK_MODE,
"car": HERE_CAR_MODE
}
OPTIONAL_PARAMS = [
@ -338,6 +340,8 @@ class HereMapsRoutingIsolineV8(Traceable):
else:
mode_type = self.DEFAULT_ROUTINGMODE
# Do not set routingmode if transportmode value is equivalent to 'walk' mode
if mode_source != self.HERE_WALK_MODE:
mode_params.update({'routingmode': mode_type})
if not ('mode_traffic' in options and options['mode_traffic'] == 'enabled'):