You are here

public function Map::setSize in Openlayers 7.3

Set the size of the map.

Parameters

array $size: An array with two elements, a width and a height.

Return value

MapInterface The map.

Overrides MapInterface::setSize

File

src/Types/Map.php, line 257
Class Map.

Class

Map
Class Map.

Namespace

Drupal\openlayers\Types

Code

public function setSize(array $size = array()) {
  list($width, $height) = array_values($size);
  return $this
    ->setOption('width', $width)
    ->setOption('height', $height);
}