public function setOptimizeWaypoints($optimizeWaypoints = null)
    {
        if (!is_bool($optimizeWaypoints) && ($optimizeWaypoints !== null)) {
            throw DirectionsException::invalidDirectionsRequestOptimizeWaypoints();
        }

        $this->optimizeWaypoints = $optimizeWaypoints;
    }
public function setOptimizeWaypoints($optimizeWaypoints = null)
    {
        if (!is_bool($optimizeWaypoints) && ($optimizeWaypoints !== null)) {
            throw DirectionsException::invalidDirectionsRequestOptimizeWaypoints();
        }

        $this->optimizeWaypoints = $optimizeWaypoints;
    }
public function setOptimizeWaypoints ( $ optimizeWaypoints = null ) { if ( ! is_bool ( $ optimizeWaypoints ) && ( $ optimizeWaypoints !== null ) ) { throw DirectionsException :: invalidDirectionsRequestOptimizeWaypoints ( ) ; } $ this -> optimizeWaypoints = $ optimizeWaypoints ; }
Sets if the directions request optimizes waypoints.

@param boolean $optimizeWaypoints TRUE if the directions request optimizes waypoints else FALSE.

@throws \Ivory\GoogleMap\Exception\DirectionsException If the optimize waypoints flag is not valid.
Sets if the directions request optimizes waypoints .