function openlayers_behaviors_process_cluster in Openlayers 6
Callback for OpenLayers Behaviors (Cluster)
Parameters
$behavior: Data about behavior
$map: Map array
Return value
Behavior array or FALSE if not valid
1 string reference to 'openlayers_behaviors_process_cluster'
- openlayers_behaviors_openlayers_behaviors_info in modules/
openlayers_behaviors/ openlayers_behaviors.module - Implementation of hook_openlayers_behaviors_info().
File
- modules/
openlayers_behaviors/ includes/ openlayers_behaviors.behaviors.inc, line 213 - This file holds the main Drupal hook functions and private functions for the openlayers_behaviors module.
Code
function openlayers_behaviors_process_cluster($behavior, &$map) {
if ($behavior['layer'] && $map['layers'][$behavior['layer']]) {
// Make some defaults
$behavior['distance'] = empty($behavior['distance']) ? '20' : $behavior['distance'];
$behavior['threshold'] = empty($behavior['threshold']) ? '1' : $behavior['threshold'];
return $behavior;
}
return FALSE;
}