You are here

function openlayers_views_style_map::render in Openlayers 6.2

Same name and namespace in other branches
  1. 6 modules/openlayers_views/views/openlayers_views_style_map.inc \openlayers_views_style_map::render()
  2. 7.2 modules/openlayers_views/views/openlayers_views_style_map.inc \openlayers_views_style_map::render()

Renders views (map)

File

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

Class

openlayers_views_style_map
@class Extension of the Views Plugin Syle for OpenLayers

Code

function render() {
  $output = '';

  // Check for live preview.
  if (!empty($this->view->live_preview)) {
    return t('OpenLayers views are not compatible with live preview.');
  }

  // Get selected preset
  $preset = openlayers_preset_load($this->options['preset']);
  $map = openlayers_render_map($preset->data, $preset->name);
  return theme($this
    ->theme_functions(), $this->view, $this->options, $map);
}