public function Layer::setOpacity in Openlayers 7.3
Set the opacity of the layer.
Parameters
float $opacity: The opacity value, allowed values range from 0 to 1.
Return value
LayerInterface The parent layer.
Overrides LayerInterface::setOpacity
File
- src/
Types/ Layer.php, line 89 - Class Layer.
Class
- Layer
- Class Layer.
Namespace
Drupal\openlayers\TypesCode
public function setOpacity($opacity) {
return $this
->setOption('opacity', floatval($opacity));
}