You are here

private function LeafletGeojson::leafletGeojsonMapPaneRenderJavascriptLibrary in Leaflet GeoJSON 8

Helper function to generate the javascript settings.

1 call to LeafletGeojson::leafletGeojsonMapPaneRenderJavascriptLibrary()
LeafletGeojson::build in src/Plugin/Block/LeafletGeojson.php
Builds and returns the renderable array for this block plugin.

File

src/Plugin/Block/LeafletGeojson.php, line 265

Class

LeafletGeojson
Provides a 'Leaflet Geojson' Block.

Namespace

Drupal\leaflet_geojson\Plugin\Block

Code

private function leafletGeojsonMapPaneRenderJavascriptLibrary() {

  // Attaching Ajax in case we have node description loaded by ajax.
  $libraries = [
    'leaflet_geojson/leaflet_geojson_bbox',
    'core/drupal.ajax',
  ];

  // Allow other modules to alter the map data.
  $this->moduleHandler
    ->alter('leaflet_geojson_map_pane_render_javascript_library', $libraries);
  return $libraries;
}