You are here

public function OpenlayersMap::addMapStyle in Openlayers 8.4

File

src/Entity/OpenlayersMap.php, line 259

Class

OpenlayersMap
Defines the Openlayers Map entity.

Namespace

Drupal\openlayers\Entity

Code

public function addMapStyle($configuration) {
  $configuration['uuid'] = $this
    ->uuidGenerator()
    ->generate();
  $this
    ->getStyles()
    ->addInstanceId($configuration['uuid'], $configuration);
  return $configuration['uuid'];
}