You are here

public function OpenlayersMap::addMapLayer in Openlayers 8.4

File

src/Entity/OpenlayersMap.php, line 250

Class

OpenlayersMap
Defines the Openlayers Map entity.

Namespace

Drupal\openlayers\Entity

Code

public function addMapLayer($configuration) {
  $uuid = \Drupal::service('uuid')
    ->generate();
  $this->layers[$configuration['uuid']] = $configuration;
  return $uuid;
}