Locations Plugin

Ah, that might also add to the rotten pile, I’ll also keep that in mind.

2 Likes

Can I drop a feature request in @angus @merefield ?

It’d be really useful if we could limit the search of a members location to just the UK.

eg:

image

None of those results are in the UK.

Being able to force GBR only results (or whatever country code(s) via an admin setting) would be great and would instantly suggest what people are actually looking for:

We use ESRI geosearch on another site we have, here’s what we do to limit the above to GBR and also to a predetermined UK bounding box:

    // Search button
    var searchControl = L.esri.Geocoding.geosearch({
	useMapBounds: false,
	searchBounds: L.latLngBounds(SW, NE),
	providers: [L.esri.Geocoding.arcgisOnlineProvider({
	    countries: ['GBR'],
	    // https://developers.arcgis.com/rest/geocode/api-reference/geocoding-category-filtering.htm#ESRI_SECTION1_502B3FE2028145D7B189C25B1A00E17B
	    //categories: ['Address', 'Postal', 'Coordinate System'],
	    categories: ['District', 'City', 'Postal', 'Coordinate System'],
	    maxResults: 10
	})],
	placeholder: 'Town, Postcode, Co-ordinates...',
	position: 'topright'
    }).addTo(map);

Would something like this be possible?

4 Likes

@angus it would be great if we could have the option to show the location in the topic lists. I haven’t seen an option for that but please let me know if I’ve missed it! Thanks

I was also wondering what the Enable location topic status icons for topic lists in this category setting does. I couldn’t quite make sense of it and couldn’t see any changes when applying it.

Just had a user on my forum say they couldn’t set their location.

They could see foreign locations being suggested, but as soon as they got to a certain point in typing their location all suggestions would disappear.

I was able to set the location for them just fine, which makes me wonder why the API would work for me but not for others?

Has anyone else come across this?

2 Likes

Yes, we have exactly the same issue. It was discussed on a recent thread on our forum.

I have been unable to pinpoint the exact cause though :confused:

1 Like

Interesting, yep this is the exact problem my users were having.

2 Likes

I’m aware of an issue here and it’s always been broken on this plugin. It is possible your users are hitting a rate limit which happens on the default, free, geo provider which as you might imagine is not very generous. The issue may hit users at random, seemingly arbitrary moments and make no particularly sense. Unfortunately the broken bit (which I believe has never worked) is the lack of an action handler to display this error when it occurs.

Are you getting an error in the javascript console?

Workaround is to wait a few hours and return to it. No rate limit, no error and it may work.

I’m on deadline at the moment for a large piece of client work but will take a look at this afterwards and add the missing handler. Once that is added we will get better information if I’m wrong about the underlying issue.

4 Likes

No errors in the console :confused:

It’s bizarre though as entering ‘coven’ gives results, further adding to it so it becomes ‘coventr’ provides no results, then adding a Y on the end to make it ‘coventry’ does then offer results :man_shrugging:

2 Likes

I don’t think this is a bug with Locations.

If you search on https://www.openstreetmap.org/ directly, it also behaves similarly in an unhelpful manner?

2 Likes

I don’t get any search suggestions at all on that site? :thinking:

1 Like

It’s not dynamic, sure, you have to press enter each time. However the search results are a big clue.

2 Likes

Ooooo, I see what you mean now!

:scream:

1 Like

Hi everyone, we are using the locations plugin together with the events plugin, to locate our events on the map.

We also have the so-called Fairphone Angels Program, where groups of people can offer their help to other Fairphoners in their area. There is a custom map currently that we are building via Github Pages, but it would be far more convenient if we could locate existing Discourse groups on a map.

Reading some posts here I found out that it is possible to make a user map (I was not aware of this before). A group map would be a nice addition, IMO. What do you think?

Best, Stefan

1 Like

Hey! Great plugin, thanks a lot for the awesome work (not only on this plugin)!

One question or feature request: Is or will it be possible to add more than one location to a topic? Couldn’t find neither a setting nor any hints in the forum. Or maybe will it be possible to add a (second and further) locations via topic replies?

2 Likes

Just one Location per Topic. Post level locations are not supported.

Sounds like an edge case to me? Managing your expectations I doubt this would get implemented as level of use would not warrant the level of effort required.

Perhaps you could explain your use case in a little more detail. Why do you need more than one location per Topic?

You know that if you post multiple Topics with locations within a single Category you can see the locations shown together on the Category’s map? Can you alter the way you are structuring things to take advantage of that?

1 Like

Hi @forgenst, you probably have to enable locations in the category settings you are trying to create the topic in. According to your screenshot the ‘Uncategorized’ category.

3 Likes

Hi Robert, our use case is very specific: at our courier company we write every evening a diary about the day in which we include the charging/parking places of our electronic cars for the drivers and the dispatchers next day. And thus we have more than one car, it would be nice to have the convenience of both geocoded and mapped locations in one topic.

But theres no need to make this a feature request - we have other solutions for communicating the locations. It would just be convenient for us admins and our staff here.

2 Likes

It’s not in the plugin settings, but in the settings of each category. So when you navigate to the category overview of your Discourse instance, you click i.e. on ‘Uncategorized’ and then on the ‘Edit’ button at the top if the page. In the now opened category settings should be ‘Settings’ tab where you find a section named ‘Locations’. There (and for every other category for which you want to enable locations) you have to enable locations.

4 Likes

Got it, thanks.

Don’t forget this is free software. That’s quite a requirement. :). It’s often burden enough to support plugins to remain compatible with the latest version of Discourse.

We might consider a funded project to deliver such an enhancement but it would be quite involved.

We might use some post level markup scheme.

4 Likes