Do not set routingmode if transportmode value is equivalent to 'walk' mode for HERE Isolines v8.4
This commit is contained in:
parent
f32d37f312
commit
a16f00966e
@ -168,10 +168,12 @@ class HereMapsRoutingIsolineV8(Traceable):
|
|||||||
QUALITY_PARAM_V7 = 'quality'
|
QUALITY_PARAM_V7 = 'quality'
|
||||||
DEFAULT_OPTIMIZEFOR = 'quality'
|
DEFAULT_OPTIMIZEFOR = 'quality'
|
||||||
DEFAULT_ROUTINGMODE = 'short'
|
DEFAULT_ROUTINGMODE = 'short'
|
||||||
|
HERE_WALK_MODE = "pedestrian"
|
||||||
|
HERE_CAR_MODE = "car"
|
||||||
|
|
||||||
ACCEPTED_MODES = {
|
ACCEPTED_MODES = {
|
||||||
"walk": "pedestrian",
|
"walk": HERE_WALK_MODE,
|
||||||
"car": "car"
|
"car": HERE_CAR_MODE
|
||||||
}
|
}
|
||||||
|
|
||||||
OPTIONAL_PARAMS = [
|
OPTIONAL_PARAMS = [
|
||||||
@ -338,7 +340,9 @@ class HereMapsRoutingIsolineV8(Traceable):
|
|||||||
else:
|
else:
|
||||||
mode_type = self.DEFAULT_ROUTINGMODE
|
mode_type = self.DEFAULT_ROUTINGMODE
|
||||||
|
|
||||||
mode_params.update({'routingmode': mode_type})
|
# 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'):
|
if not ('mode_traffic' in options and options['mode_traffic'] == 'enabled'):
|
||||||
mode_params.update({'departuretime': 'any'})
|
mode_params.update({'departuretime': 'any'})
|
||||||
|
Loading…
Reference in New Issue
Block a user