You are here

public function openlayers_layer_type::getProjections in Openlayers 7.2

Return value

array<openlayers_projection> List of all projections that are supported by the layer.

File

./openlayers.module, line 1295
Main OpenLayers API File

Class

openlayers_layer_type
We define base classes in the core module. All other parent classes can be autoloaded through ctools.

Code

public function getProjections() {
  $projections = array();

  // TODO Ignore incomplete data until cause is fixed (projection for every layer set during migration)
  if (isset($this->data['projection'])) {
    foreach ($this->data['projection'] as $projection) {
      $projections[] = openlayers_get_projection_by_identifier($projection);
    }
  }
  return $projections;
}