public function setPanControl()
    {
        $args = func_get_args();

        if (isset($args[0]) && ($args[0] instanceof PanControl)) {
            $this->panControl = $args[0];
            $this->mapOptions['panControl'] = true;
        } elseif (isset($args[0]) && is_string($args[0])) {
            if ($this->panControl === null) {
                $this->panControl = new PanControl();
            }

            $this->panControl->setControlPosition($args[0]);
            $this->mapOptions['panControl'] = true;
        } elseif (!isset($args[0])) {
            $this->panControl = null;

            if (isset($this->mapOptions['panControl'])) {
                unset($this->mapOptions['panControl']);
            }
        } else {
            throw MapException::invalidPanControl();
        }
    }
public function setPanControl()
    {
        $args = func_get_args();

        if (isset($args[0]) && ($args[0] instanceof PanControl)) {
            $this->panControl = $args[0];
            $this->mapOptions['panControl'] = true;
        } elseif (isset($args[0]) && is_string($args[0])) {
            if ($this->panControl === null) {
                $this->panControl = new PanControl();
            }

            $this->panControl->setControlPosition($args[0]);
            $this->mapOptions['panControl'] = true;
        } elseif (!isset($args[0])) {
            $this->panControl = null;

            if (isset($this->mapOptions['panControl'])) {
                unset($this->mapOptions['panControl']);
            }
        } else {
            throw MapException::invalidPanControl();
        }
    }
public function setPanControl ( ) { $ args = func_get_args ( ) ; if ( isset ( $ args [ 0 ] ) && ( $ args [ 0 ] instanceof PanControl ) ) { $ this -> panControl = $ args [ 0 ] ; $ this -> mapOptions [ 'panControl' ] = true ; } elseif ( isset ( $ args [ 0 ] ) && is_string ( $ args [ 0 ] ) ) { if ( $ this -> panControl === null ) { $ this -> panControl = new PanControl ( ) ; } $ this -> panControl -> setControlPosition ( $ args [ 0 ] ) ; $ this -> mapOptions [ 'panControl' ] = true ; } elseif ( ! isset ( $ args [ 0 ] ) ) { $ this -> panControl = null ; if ( isset ( $ this -> mapOptions [ 'panControl' ] ) ) { unset ( $ this -> mapOptions [ 'panControl' ] ) ; } } else { throw MapException :: invalidPanControl ( ) ; } }
Sets the map pan control.

Available prototypes:
- function setPanControl(Ivory\GoogleMap\Controls\PanControl $panControl = null)
- function setPanControl(string $controlPosition)

@throws \Ivory\GoogleMap\Exception\MapException If the pan control is not valid (prototypes).
Sets the map pan control .