You are here

function openlayers_get_extent in Openlayers 7.2

Same name and namespace in other branches
  1. 6.2 openlayers.module \openlayers_get_extent()

Get extent given projection

Returns standard world-max-extents for common projections. Layers implementing other projections and subsets of the world should define their maxExtent in the layer array.

Parameters

$authority: String Organization code, such as EPSG.

$projection: String of the projection value, such as 4326.

Return value

Array of maxExtent in OpenLayers toArray() format.

2 calls to openlayers_get_extent()
openlayers_layer_type_gpx::options_init in plugins/layer_types/openlayers_layer_type_gpx.inc
Provide initial values for options.
openlayers_layer_type_kml::options_init in plugins/layer_types/openlayers_layer_type_kml.inc
Provide initial values for options.

File

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

Code

function openlayers_get_extent($authority, $projection) {

  // Use projected extend from openlayers_projection instead but keep this function for now as it's marked as API
  return openlayers_get_projection($authority, $projection)
    ->getProjectedExtent();
}