src/Services/Directions/DirectionsWaypoint.php
public function setLocation()
    {
        $args = func_get_args();

        if (isset($args[0]) && is_string($args[0])) {
            $this->location = $args[0];
        } elseif (isset($args[0]) && ($args[0] instanceof Coordinate)) {
            $this->location = $args[0];
        } elseif ((isset($args[0]) && is_numeric($args[0])) && (isset($args[1]) && is_numeric($args[1]))) {
            if ($this->location === null) {
                $this->location = new Coordinate();
            }

            $this->location->setLatitude($args[0]);
            $this->location->setLongitude($args[1]);

            if (isset($args[2]) && is_bool($args[2])) {
                $this->location->setNoWrap($args[2]);
            }
        } else {
            throw DirectionsException::invalidDirectionsWaypointLocation();
        }
    }
public function setLocation()
    {
        $args = func_get_args();

        if (isset($args[0]) && is_string($args[0])) {
            $this->location = $args[0];
        } elseif (isset($args[0]) && ($args[0] instanceof Coordinate)) {
            $this->location = $args[0];
        } elseif ((isset($args[0]) && is_numeric($args[0])) && (isset($args[1]) && is_numeric($args[1]))) {
            if ($this->location === null) {
                $this->location = new Coordinate();
            }

            $this->location->setLatitude($args[0]);
            $this->location->setLongitude($args[1]);

            if (isset($args[2]) && is_bool($args[2])) {
                $this->location->setNoWrap($args[2]);
            }
        } else {
            throw DirectionsException::invalidDirectionsWaypointLocation();
        }
    }
Sets the directions waypoint location.

Available prototypes:
- function setLocation(string $destination)
- function setLocation(Ivory\GoogleMap\Base\Coordinate $destination)
- function setLocation(double $latitude, double $longitude, boolean $noWrap)

@throws \Ivory\GoogleMap\Exception\DirectionsException If the location is not valid (prototypes).