function hook_leaflet_views_alter_points_data_alter in Leaflet 7
Allow modules to alter the points data while rendering a leaflet views row.
1 invocation of hook_leaflet_views_alter_points_data_alter()
- leaflet_views_plugin_style::render in leaflet_views/
leaflet_views_plugin_style.inc - Renders view.
File
- leaflet_views/
leaflet_views.api.php, line 11 - API documentation for Leaflet views.
Code
function hook_leaflet_views_alter_points_data_alter($result, &$points) {
if (isset($result->number)) {
// Add number value to every points data entry, if present.
array_walk($points, function (&$point, $key, $number) {
$point['number'] = $number;
}, $result->number);
}
}