- πΊπΈUnited States m.stenta
I opened a pull request that does the first part of this: https://github.com/farmOS/farmOS/pull/779
This PR takes the first, simplest, and most impactful step towards [Issue #2551091: Show map in /locations and /asset/[id]/locations]( https://www.drupal.org/project/farm/issues/2551091 β ).
It adds a map of locations to the /locations page in farmOS.
It does NOT add a map of locations to the /asset/[id]/locations pages. This has additional complexity, and I don't think there's a lot of value in taking this first step, and tackling the second part in a follow-up.
This PR also makes another general change, which is to rename/replace the current
dashboard
map type alocations
map type (and also cleans up some dependencies). The thought behind this change is that the currentdashboard
map type is not dashboard-specific at all (other than the fact that it's only used on the dashboard). It is provided by thefarm_ui_map
module, not thefarm_ui_dashboar
` module, and it adds layers for all locations to the map. So this just generalizes that to be more reusable, and then uses it in the /location page.If we merge that, then I think we can rename this issue to focus on the next step of adding maps to /asset/[id]/locations pages.
- πΊπΈUnited States m.stenta
If we merge that, then I think we can rename this issue to focus on the next step of adding maps to /asset/[id]/locations pages.
I took a quick look at what will be needed for this. The main complexity is that we generate the geometry layers in our
farm_asset_geojson
View. We will need to be able to contextually filter those Views based on a parent asset ID. This is not currently possible with current Views handlers (that I'm aware of). I think we will need to code our own custom contextual filter for it.Once we have that contextual filter in place, we can add an option to our
asset_type_layers
behavior that allows it to pass a parent asset ID into the Views contextual filter. Then we can use that new option inLocationHierarchyForm
and it should "just work"! - Status changed to Needs work
11 months ago 12:29pm 18 January 2024 -
m.stenta β
committed dc009561 on 3.x
Issue #2551091: Show map on /locations
-
m.stenta β
committed dc009561 on 3.x