public function Layer::setStyle in Openlayers 7.3
Set the style of this layer.
Parameters
StyleInterface $style: The style object.
Return value
LayerInterface The parent layer.
Overrides LayerInterface::setStyle
File
- src/
Types/ Layer.php, line 55 - Class Layer.
Class
- Layer
- Class Layer.
Namespace
Drupal\openlayers\TypesCode
public function setStyle(StyleInterface $style) {
/** @var Style $style */
$this
->setOption('style', $style
->getMachineName());
return $this
->addObject($style);
}