The fundamentals of how maps are handled in the OpenLayers module is based on a map array in PHP, that gets pass through hooks and rendered on the server side, then passed to Javascript to be turned into an OpenLayers map on the client side.
$default_map = array(
'projection' => '4326',
'width' => 'auto',
'default_layer' => 'openlayers_default_wms',
'height' => '300px',
'center' => array(
'lat' => '0',
'lon' => '0',
'zoom' => '2',
),
'options' => array(
'displayProjection' => '4326',
),
'controls' => array(
'LayerSwitcher' => TRUE,
'Navigation' => TRUE,
'PanZoomBar' => TRUE,
'MousePosition' => TRUE,
),
);