3
0
Fork 0
mirror of https://github.com/farmOS/farmOS.git synced 2024-02-23 11:37:38 +01:00

Add an "Other locations" layer to the dashboard map.

This commit is contained in:
paul121 2021-03-01 13:23:12 -08:00 committed by Michael Stenta
parent a51c58185a
commit d2d42f3811

View file

@ -105,6 +105,20 @@ class MapRenderEventSubscriber implements EventSubscriberInterface {
}
}
// Add other locations layer to the dashboard.
// @todo Limit this layer to only the non-location asset types.
// The current view doesn't allow the "type" filter to override the
// contextual filter that defaults to "all" asset types.
$layers['other_locations'] = [
'group' => $group,
'label' => $this->t('Other locations'),
'filters' => [
'is_location' => 1,
],
'color' => 'grey',
'zoom' => TRUE,
];
// Add the asset_type_layers behavior.
$event->addBehavior('asset_type_layers');