# Show a map in /location 2.x

**URL:** <https://farmos.discourse.group/t/show-a-map-in-location-2-x/1034>\
**Category:** Using farmOS\
**Created:** [January 6, 2022, 2:32pm UTC](https://farmos.discourse.group/t/show-a-map-in-location-2-x/1034 "2022-01-06T14:32:13Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![BOTLFarm](https://yyz2.discourse-cdn.com/free1/user_avatar/farmos.discourse.group/botlfarm/32/74_2.png) [@BOTLFarm](https://farmos.discourse.group/u/BOTLFarm)\
**Post date:** [January 6, 2022, 2:32pm UTC](https://farmos.discourse.group/t/show-a-map-in-location-2-x/1034/1 "2022-01-06T14:32:14Z")

</div>

In 2.0.0beta1 the “/locations” page does not show a map. I’m not showing any errors when loading the page so I don’t think it is an issue, just maybe no map on this page?

I believe this page is mainly to rearrange hierarchy. Same with the “asset/xxx/locations” pages.

If the map was purposely left out I’m wondering why. I think having a map on these pages just as a visual reference would be super when you have a lot of land assets your managing.

---

<div class="post-metadata">

**Author:** ![mstenta](https://yyz2.discourse-cdn.com/free1/user_avatar/farmos.discourse.group/mstenta/32/4_2.png) [@mstenta](https://farmos.discourse.group/u/mstenta)\
**Post date:** [January 6, 2022, 2:46pm UTC](https://farmos.discourse.group/t/show-a-map-in-location-2-x/1034/2 "2022-01-06T14:46:25Z")

</div>

Ah yes @BOTLFarm ! That’s still on my wishlist too. Just didn’t make it into beta. 🙂

I don’t think it will be too hard to add. AND I think it will be neat to have it on the “asset/xxx/locations” paths too, which are filtered to only show child locations! This will essentially close a long standing feature request (more or less): [Show child areas in parent area map [#2551091] | Drupal.org](https://www.drupal.org/project/farm/issues/2551091)

I don’t think we have a dedicated issue open yet for this, but I have it in my wishlist doc locally, so I’ll try to spin up a feature request soon for it.

If you’re interested in working on it, @paul121 or I can probably point you in the right direction! v2 has a pretty robust system for building maps in pages… that said it is a bit of a “deep dive” so no pressure. 🙂

---

<div class="post-metadata">

**Author:** ![mstenta](https://yyz2.discourse-cdn.com/free1/user_avatar/farmos.discourse.group/mstenta/32/4_2.png) [@mstenta](https://farmos.discourse.group/u/mstenta)\
**Post date:** [January 6, 2022, 2:46pm UTC](https://farmos.discourse.group/t/show-a-map-in-location-2-x/1034/3 "2022-01-06T14:46:59Z")

</div>

> [@mstenta](#):
>
> I’ll try to spin up a feature request soon for it.

Or better yet, I may just repurpose that existing issue…

---

<div class="post-metadata">

**Author:** ![BOTLFarm](https://yyz2.discourse-cdn.com/free1/user_avatar/farmos.discourse.group/botlfarm/32/74_2.png) [@BOTLFarm](https://farmos.discourse.group/u/BOTLFarm)\
**Post date:** [January 6, 2022, 5:45pm UTC](https://farmos.discourse.group/t/show-a-map-in-location-2-x/1034/4 "2022-01-06T17:45:31Z")

</div>

> [@mstenta](#):
>
> If you’re interested in working on it

I can give it a shot if you point me in the right direction. I haven’t dug into the v2.x code really at all yet. Maybe it is to early for 2.x but the walkthrough of the code and how to modify it was super useful for 1.x that was done in the [2020 April Monthly Call](https://farmos.discourse.group/t/video-developing-farmos/299).

---

<div class="post-metadata">

**Author:** ![mstenta](https://yyz2.discourse-cdn.com/free1/user_avatar/farmos.discourse.group/mstenta/32/4_2.png) [@mstenta](https://farmos.discourse.group/u/mstenta)\
**Post date:** [January 7, 2022, 3:42pm UTC](https://farmos.discourse.group/t/show-a-map-in-location-2-x/1034/5 "2022-01-07T15:42:00Z")

</div>

@paul121 and I were just talking about how fun it would be to make a series of farmOS v2 development tutorial videos - similar to that monthly call intro we did a while back. 🙂

If you’re interested, maybe we can take a look at this together on next week’s dev call? Thursday at 12 Eastern: [Jitsi Meet](https://meet.jit.si/farmos-dev)

---

<div class="post-metadata">

**Author:** ![BOTLFarm](https://yyz2.discourse-cdn.com/free1/user_avatar/farmos.discourse.group/botlfarm/32/74_2.png) [@BOTLFarm](https://farmos.discourse.group/u/BOTLFarm)\
**Post date:** [January 7, 2022, 6:51pm UTC](https://farmos.discourse.group/t/show-a-map-in-location-2-x/1034/6 "2022-01-07T18:51:14Z")

</div>

Will see you on the call on Thursday!

---

<div class="post-metadata">

**Author:** ![mstenta](https://yyz2.discourse-cdn.com/free1/user_avatar/farmos.discourse.group/mstenta/32/4_2.png) [@mstenta](https://farmos.discourse.group/u/mstenta)\
**Post date:** [January 18, 2024, 12:28pm UTC](https://farmos.discourse.group/t/show-a-map-in-location-2-x/1034/7 "2024-01-18T12:28:36Z")

</div>

FYI: I opened a pull request to add a map to /locations.

> <https://github.com/farmOS/farmOS/pull/779>
>
> This PR takes the first, simplest, and most impactful step towards \[Issue #25510…91: 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 a \`locations\` map type (and also cleans up some dependencies). The thought behind this change is that the current \`dashboard\` map type is not dashboard-specific at all (other than the fact that it's only used on the dashboard). It is provided by the \`farm\_ui\_map\` module, not the \`farm\_ui\_dashboard\` 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.
> 
> This needs CHANGELOG.md line(s), and will be saved for 3.1.0, so I'll leave it as a draft for right now.

I also commented on [Issue #2551091](https://github.com/farmOS/farmOS/pull/779) with details about how we might also add a map to /asset/[id]/locations in the future. That’s a bit more complicated, but I don’t think it needs to block this first step.
