public function QuickMap::render in Openlayers 7.2
Renders the content.
Parameters
$hide_emtpy If set to true, then the renderer should return an empty: array if there is no content to display, for example if the user does not have access to the requested content.
$args Used during an ajax call to pass in the settings necessary to: render this type of content.
Overrides QuickContentRenderable::render
File
- plugins/
quicktabs/ QuickMap.inc, line 25
Class
- QuickMap
- Class for tab content of type "map" - this is for rendering a map as tab content.
Code
public function render($hide_empty = FALSE, $args = array()) {
if ($this->rendered_content) {
return $this->rendered_content;
}
$output = array();
$item = $this->settings;
// We should add a JS file here to automatically resize the map when
// the map is not the default tab.
$map = openlayers_map_load($item['map']);
$render = openlayers_render_map($map);
$output['#markup'] = $render;
$this->rendered_content = $output;
return $output;
}