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
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;
}
?> 