You are here

public function Layer::getStyle in Openlayers 7.3

Returns the style of this layer.

Return value

StyleInterface|FALSE The style of this layer.

Overrides LayerInterface::getStyle

File

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

Class

Layer
Class Layer.

Namespace

Drupal\openlayers\Types

Code

public function getStyle() {
  $style = $this
    ->getObjects('style');
  if ($style = array_shift($style)) {
    return $style instanceof StyleInterface ? $style : FALSE;
  }
  return FALSE;
}