Show all user profiles and geolocated content on a map I'm trying to create a map that shows user profiles and other geolocated content (for example, news and events). A view doesn't allow to mix users and other content. I know I can show content that is referenced from a user, but how can I accomplish this without references? 

The users and the content share the same taxonomy, though.

edit:

I have tried rovr138 suggestion to no avail, I always get the error (below image) as soon as the both views share the same display name that i have set here:




  Error: Class 'Views' not found in combine_views_views_pre_render() (row 24 in /var/www/html/myproject/web/modules/custom/combine_views/combine_views.module)


Here's the code i adapted minimally:

use \Drupal\views\ViewExecutable;

function combine_views_views_pre_render(\Drupal\views\ViewExecutable $view) {
if($view-&gt;id() == 'page_test' &amp;&amp; $view-&gt;current_display == 'map') {

  $args = []; //these are contextual filters on the view
  foreach ($view-&gt;argument as $argument_key =&gt; $argument_value) {
    if(is_string($argument_value-&gt;argument)) {
      $args[] = $argument_value-&gt;argument;
    }
    else {
      $args[] = $argument_value-&gt;argument[0];
    }
  }

  // Get user view
  $user_view = Views::getView('event_test');
  if (is_object($user_view)) {
    $user_view-&gt;setArguments($args);
    $user_view-&gt;setDisplay('map');
    $user_view-&gt;preExecute();
    $user_view-&gt;execute();
  }

  if (!empty($user_view-&gt;result)) {
    $view-&gt;result = array_merge($user_view-&gt;result, $view-&gt;result);
  }
}
}
Alternative,

Create your 2 views. Let's say they're called, user_points and node_points and both have a display called map.

You could then create a simple module that does,

use \Drupal\views\ViewExecutable;
use \Drupal\views\Views;

function hook_views_pre_render(ViewExecutable $view) {
  if($view-&gt;id() == 'node_points' &amp;&amp; $view-&gt;current_display == 'map') {

    $args = []; //these are contextual filters on the view
    foreach ($view-&gt;argument as $argument_key =&gt; $argument_value) {
      if(is_string($argument_value-&gt;argument)) {
        $args[] = $argument_value-&gt;argument;
      }
      else {
        $args[] = $argument_value-&gt;argument[0];
      }
    }

    // Get user view
    $user_view = Views::getView('user_points');
    if (is_object($user_view)) {
      $user_view-&gt;setArguments($args);
      $user_view-&gt;setDisplay('map');
      $user_view-&gt;preExecute();
      $user_view-&gt;execute();
    }

    if (!empty($user_view-&gt;result)) {
      $view-&gt;result = array_merge($user_view-&gt;result, $view-&gt;result);
    }
  }
}


On your node_points view, you'll now have the results from user_points.