_openlayers_get_map_defaults

openlayers/openlayers.module, line 636

Versions
6
_openlayers_get_map_defaults()

Get Map Defaults

This is the "system defaults" that come with the module. The goal of these defaults is so that a map can be rendered simply by installing the OL API module.

Return value

map array

▾ 4 functions call _openlayers_get_map_defaults()

openlayers_admin_default_settings in openlayers/includes/openlayers.defaults.inc
Menu callback; Displays the openlayers module default settings page.
openlayers_admin_default_settings in openlayers/includes/openlayers.defaults.inc
Menu callback; Displays the openlayers module default settings page.
openlayers_render_map in openlayers/openlayers.module
Render Map
openlayers_render_map in openlayers/openlayers.module
Render Map

Code

<?php
function _openlayers_get_map_defaults() {
  $map_default = array(
    'id' => _openlayers_create_map_id(),
    'projection' => '4326',
    'width' => 'auto',
    'default_layer' => 'openlayers_default_wms',
    'only_these_layers' => FALSE,
    'height' => '300px',
    'center' => array(
      'lat' => '0',
      'lon' => '0',
      'zoom' => '2',
    ),
    'options' => array(
      'displayProjection' => '4326',
    ),
    'controls' => array(
      'LayerSwitcher' => TRUE,
      'Navigation' => TRUE,
      'PanZoomBar' => TRUE,
      'MousePosition' => TRUE,
    ),
  );
  return $map_default;
}
?>