You are here

protected function MarkerLayerGroup::renderLeafletGroup in Leaflet 2.1.x

Same name and namespace in other branches
  1. 8 modules/leaflet_views/src/Plugin/views/style/MarkerLayerGroup.php \Drupal\leaflet_views\Plugin\views\style\MarkerLayerGroup::renderLeafletGroup()
  2. 2.0.x modules/leaflet_views/src/Plugin/views/style/MarkerLayerGroup.php \Drupal\leaflet_views\Plugin\views\style\MarkerLayerGroup::renderLeafletGroup()

Render a single group of leaflet markers.

Parameters

string $title: The group title.

string $level: The current group level.

array $features: The list of leaflet features / points.

Return value

array Definition of leaflet markers, compatible with \Drupal::service('leaflet.service')->leafletRenderMap().

Overrides MarkerDefault::renderLeafletGroup

File

modules/leaflet_views/src/Plugin/views/style/MarkerLayerGroup.php, line 42

Class

MarkerLayerGroup
Style plugin to render leaflet features in layer groups.

Namespace

Drupal\leaflet_views\Plugin\views\style

Code

protected function renderLeafletGroup($title, $level, array $features = []) {
  return [
    'group' => TRUE,
    'label' => $title,
    'features' => $features,
  ];
}