You are here

function openlayers_views_style_map::query in Openlayers 7.2

Same name and namespace in other branches
  1. 6.2 modules/openlayers_views/views/openlayers_views_style_map.inc \openlayers_views_style_map::query()

Query - override to make sure this doesn't get run

Overrides views_plugin_style::query

File

modules/openlayers_views/views/openlayers_views_style_map.inc, line 55
This file holds style plugin for OpenLayers Views

Class

openlayers_views_style_map
@class Extension of the Views Plugin Syle for OpenLayers

Code

function query() {
  if (isset($this->view->query->fields)) {
    $this->view->query->fields = array();
  }
  $this->view->executed = TRUE;
  $map = openlayers_map_load($this->options['map']);
  $render = openlayers_render_map($map);
  if ($render || !$map->data['hide_empty_map']) {
    $this->map = $render;

    // Map display doesn't contain the view results, layer displays do.
    // Fill view result with a pseudo value so it is not empty.
    $this->view->result = array(
      array(),
    );
  }
}