You are here

function hook_leaflet_geojson_bean_view_features_alter in Leaflet GeoJSON 7.2

Same name and namespace in other branches
  1. 7 modules/leaflet_geojson_bean/leaflet_geojson_bean.api.php \hook_leaflet_geojson_bean_view_features_alter()

Alter a leaflet geojson features array before being viewed in a bean.

@params array $features The features to be passed to the leaflet map. @params array $context An associative array containing contextual information as

  • array $map The leaflet map definition.
  • array source_info The leaflet map geojson source definition.
  • Bean bean The bean that renders the map based on the source.
1 function implements hook_leaflet_geojson_bean_view_features_alter()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

leaflet_geojson_bean_leaflet_geojson_bean_view_features_alter in modules/leaflet_geojson_bean/leaflet_geojson_bean.module
Implements hook_leaflet_geojson_bean_view_features_alter().
1 invocation of hook_leaflet_geojson_bean_view_features_alter()
LeafletGeoJSONBean::view in modules/leaflet_geojson_bean/plugins/bean/leaflet_geojson_bean.inc
Displays the bean.

File

modules/leaflet_geojson_bean/leaflet_geojson_bean.api.php, line 27
Hooks provided by the Leaflet GeoJSON Bean module.

Code

function hook_leaflet_geojson_bean_view_features_alter(array &$features, array &$context) {

  // Add bbox js.
  if (isset($context['source_info']['bbox'])) {
    leaflet_geojson_add_bbox_strategy($context['source_info']['url']);
  }
}