Locations Plugin 🌍

Cannot repro.

For something to appear on the map you need to have searched for, found and selected a specific location and then it will then have a geo location which is required for it to appear on the map.

Just giving something a name and hitting save will not instantiate a geo location and therefore it won’t appear on the map. You must select a specific returned address.

Good catch. I note it will still show if the Category has a sub-Category, but that’s not particularly helpful :slight_smile:

This is tricky, we are between a rock and hard place here.

@david would you accept a PR to add a plugin outlet:

topic-list-after-badges

because we can’t use topic-list-after-title because that will render before the badge, which looks rubbish, and we can’t use topic-list-before-category because that’s not rendered always?

1 Like

Sounds reasonable to me. Could you make the PR to illustrate, and we can go from there

3 Likes

Kicked that off.

2 Likes

Merged, thanks @merefield

6 Likes

Thank you David!

3 Likes

I added a test to confirm, and what I think is the fix:

4 Likes

An excellent contribution, tricky problem, appreciate the work, thanks, merged!

2 Likes

Looks like it got reverted right after in this DEV: [gjs-codemod] convert admin files to gjs ¡ discourse/discourse@b29e0b6 ¡ GitHub

3 Likes

You can’t see it on default theme, but I see styling issues (with isabelle at least) on the maps page due to missing markup. Wrapping it with the Discovery::Layout resolved it

3 Likes

Sorry about that! I had a bit of a nightmare rebasing/merging that gjs PR. New outlets are now restored.

4 Likes

Thank you (and well done @dsims for noticing).

I wonder if that was why my tests were passing locally and failing on the PR?! :sweat_smile:

2 Likes

merged, thanks!

1 Like

Yup, that was it, the missing outlets were causing my PR tests to fail … I was like … :thinking: :thinking: :sweat_smile:

2 Likes

This is now fixed, merged and checked out:

Let’s hear it for Locations on Topics on Categories! :champagne:

PS this uses the new outlets which are very useful and I’m about to apply the same change to another of my plugins … :wink:

7 Likes

Thanks for this great plugin.

We use it to implement a hospitality network.

I hope to get some funding in the future, to pay for more features.

Minor bug report: The general map (all categories) does not use colors of categories for pin names. All pins have the same color.

1 Like

Sounds more like a feature request to me, but a nice idea nonetheless, noted!

Ah, sorry. It seems I misunderstood the documentation.

There will be plenty of feature requests, if you like to hear them, without me having money :innocent:.

1 Like

Hm, the search does not work here at the moment. Strange.

Anyway, is it possible to hide the user location and also the user map if not logged into Discourse or maybe also just being TL0?

1 Like

I’m afraid that isn’t possible right now - although I’d be very keen on it too!

A less than perfect solution is to make sure there are no links to the map reachable by anon, and that the map itself is hidden if someone shares the link; I use this:

// hide user map from anon
.anon div.users-map-container {
    display: none;
}

Of course, you won’t stop anyone with good technical skills who knows what they are looking for, but you’ll prevent the casual 99% (equivalent to a cheap bike lock in my mind).

This is the sort of thing that would be appropriate to sponsor for this plugin.

5 Likes

Yeah, thank you. I was aware of the CSS “solution”. But, as you said, not really perfect. And I would guess that search engines crawl and show this information in the search results anyway.