You are here

function farm_movement_farm_map_view in farmOS 7

Implements hook_farm_map_view().

File

modules/farm/farm_movement/farm_movement.farm_map.inc, line 70
Farm Map hooks implemented by the Farm Movement module.

Code

function farm_movement_farm_map_view($name, $element) {

  // Add farmOS map behaviors that add asset geometries and clusters, as well as
  // the combined area geometry and popups.
  if ($name == 'farm_assets') {
    farm_map_add_behavior('areas_combined', array(
      'zoom' => FALSE,
    ));
    farm_map_add_behavior('assets_full', array(
      'zoom' => TRUE,
    ));
    farm_map_add_behavior('assets_cluster');
    farm_map_add_behavior('popup');
  }

  // Add move behavior to movement maps.
  if ($name == 'farm_movement') {
    farm_map_add_behavior('move');
  }
}