How to load an OpenLayers view into the content area with an AJAX link?
NOTE FROM THE QUESTION'S AUTHOR:
This solution works for non OpenLayers views. It fails to build up the wrapper when the view is an OpenLayers though.

So the question remains to be answered.




You have to create a div wrapper where you are supposed to show the
ajaxified view content. You have to add the div wrapper in the
template file (MYTEMPLATE.tpl.php)
Create a module that will register the ajax link in hook_menu().
In the callback of the menu item you have to render the view content
using ajax_commands.


Sample code:

function MYMODULE_init() {
  // Add the Drupal AJAX library.
  // You can optionally provide a check to add AJAX library only on certain pages.
  drupal_add_library('system', 'drupal.ajax');
}

function MYMODULE_menu() {
  $items = array();

  $items['ajax-link/nojs'] = array(
    'title' =&gt; 'TITLE',
    'description' =&gt; 'DESCRIPTION',
    'page callback' =&gt; 'MYMODULE_ajax_link_callback',
    'page arguments' =&gt; array(1),
    'access callback' =&gt; PERMISSION,
    'type' =&gt; MENU_CALLBACK,
  );

  $items['ajax-link/ajax'] = array(
    'delivery callback' =&gt; 'ajax_deliver',
  ) + $items['ajax-link/nojs'];
}

function MYMODULE_ajax_link_callback($ajax) {
  // Check whether this is AJAX callback.
  $is_ajax = $ajax === 'ajax';

  if ($is_ajax) {
    // Your code to obtain view content in HTML format and store it in some variable say $ajax_content.

    $commands = array();

    $commands[] = ajax_command_replace('div.WRAPPER-YOU-ADDED-PREVIOUSLY', $ajax_content);

    return array(
      '#type' =&gt; 'ajax',
      '#commands' =&gt; $commands,
    );

  }
  else {
    drupal_set_message('Content added');
    drupal_goto();
  }
}