You are here

public function Layer::getSource in Openlayers 7.3

Returns the source of this layer.

Return value

SourceInterface|FALSE The source of this layer.

Overrides LayerInterface::getSource

File

src/Types/Layer.php, line 25
Class Layer.

Class

Layer
Class Layer.

Namespace

Drupal\openlayers\Types

Code

public function getSource() {
  $source = $this
    ->getObjects('source');
  if ($source = array_shift($source)) {
    return $source instanceof SourceInterface ? $source : FALSE;
  }
  return FALSE;
}