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

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

「いいね!」 3

Kicked that off.

「いいね!」 2

Merged, thanks @merefield

「いいね!」 6

Thank you David!

「いいね!」 3

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

「いいね!」 4

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

「いいね!」 2

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

「いいね!」 3

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

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

「いいね!」 4

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

merged, thanks!

「いいね!」 1

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

「いいね!」 2

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

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

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

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

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

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.