Skip to content

Commit

Permalink
Casting to boolean Directions service parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
alexpechkarev committed Feb 19, 2023
1 parent 8c70382 commit 7b0443b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Parameters.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ public static function getQueryString( &$param ){
$param['transit_mode'] = self::joinParam( $param['transit_mode'], '', '|', false );
}

if( isset($param['alternatives']) && is_bool($param['alternatives'])){
$param['alternatives'] = $param['alternatives'] ? 'true' : 'false';
}


// Elevation & Road parameters
if( isset($param['locations']) && is_array($param['locations'])){
$param['locations'] = self::joinParam( $param['locations'], '', '|', false );
Expand Down

0 comments on commit 7b0443b

Please sign in to comment.