public function removeLayer(Layer $layer)
    {
        $key = array_search($layer, $this->baseLayers);
        if ($key !== false) {
            unset($this->baseLayers[$key]);
        }

        $key = array_search($layer, $this->overlays);
        if ($key !== false) {
            unset($this->overlays[$key]);
        }

        return $this;
    }
public function removeLayer(Layer $layer)
    {
        $key = array_search($layer, $this->baseLayers);
        if ($key !== false) {
            unset($this->baseLayers[$key]);
        }

        $key = array_search($layer, $this->overlays);
        if ($key !== false) {
            unset($this->overlays[$key]);
        }

        return $this;
    }
public function removeLayer ( Layer $ layer ) { $ key = array_search ( $ layer , $ this -> baseLayers ) ; if ( $ key !== false ) { unset ( $ this -> baseLayers [ $ key ] ) ; } $ key = array_search ( $ layer , $ this -> overlays ) ; if ( $ key !== false ) { unset ( $ this -> overlays [ $ key ] ) ; } return $ this ; }
Remove a layer.

@param Layer $layer Layer to be removed.

@return $this
Remove a layer .