Layer.php in Geolocation Field 8.3
File
src/Plugin/views/style/Layer.php
View source
<?php
namespace Drupal\geolocation\Plugin\views\style;
class Layer extends GeolocationStyleBase {
public function render() {
$render = parent::render();
if ($render === FALSE) {
return [];
}
$build = [
'#type' => 'container',
'#attributes' => [
'id' => $this->displayHandler->display['id'],
'class' => [
'geolocation-layer',
],
],
];
foreach ($this->view->result as $row) {
foreach ($this
->getLocationsFromRow($row) as $location) {
$build['locations'][] = $location;
}
}
return $build;
}
}
Classes
Name |
Description |
Layer |
Allow to display several field items on a common map. |