Locations Plugin

Just a question this time @angus :blush:

When new users sign up, we present a custom user field to them:

Is there a way we can add the “Map Location” to this sign-up form too?

And sadly, I have a new bug to report :slightly_frowning_face:

Steps to replicate:

  1. Create a new topic, enter UK location and Post code of: SW19 3AR

  1. Pin appears on Show Map button correctly:

  1. Edit the post

  2. Click the address button (to edit the map pin location)

  3. Change the LAT to 51.42 and the LNG to -0.20

  4. Click Done and Save your edited post.

  5. Click the Show Map button. The map is still centered where the old pin location was, and no pin is visible:

  1. Zoom out six clicks or so in order to see the new pin location

17

Also, the address is not updated in thread and still shows the original address and postcode of SW19 3AZ when in reality the new location is miles away from there.

Let me know if you need any more details!

Another feature request :wink:

Can you make this text configurable in the admin control panel?

image

We have a lot of members who when adding a location to their profile just enter the town. Which means when viewing the members map, you might see 8 pins in Cardiff, 12 pins in Manchester, etc.

Well, that’s the problem actually, is that you don’t see all the pins, because they’re all on top of each other.

If that line of text were editable on the control panel we’d probably change it to say “Please use a suburb, not a town” or something along those lines :+1:

Any news @angus if the previous feature request is do-able? To allow people to enter a location at the point of creating a new account?

And @Sudaraka any news on that bug report from a few weeks ago?

1 Like

How can I help translate the plugin?

1 Like

Another feature request, this time from some of our club members :slight_smile:

You’ll recall we often arrange meetings in fields and pub car parks which don’t reverse geocode nicely, hence needing a lat/lng sometimes.

Well, some of our members often use what3words as it’s on 3m accuracy which is ideal for our club meetups.

It’d be great to be able to enter what3words and populate the lat/lng from them :+1:

That would be awesome! You can help translate it here: https://www.transifex.com/civically/discourse-locations

You can change this text in Customize > Text Content > enter “user.map_location.warning”.

You could achieve this by pairing this plugin with my Custom Wizard plugin. You’ll see an example of just that when you sign up for an account on my sandbox.

What3words is cool. However, this is not a priority as an additional feature. I want to bed down the existing functionality first.

@Richie I’ll take a look at your bug on the weekend.

1 Like

Hey Angus,

I was looking at the css of the locations map, wondering if I could style markers differently depending on which category they come from. Do you see a way that this is possible currently without any modifications to the plugin?

The changes you made to the coordinates only locations work great. Brilliant.
Keven

D’oh!! Thanks :blush:

Thanks @angus, it’s confusing quite a few people!

Cheers :+1:

Hi @angus,

i have all the plugins updated but on the maps, when you click on the pin point, it leads to the wrong URL’s.

Example :
if you click any pinpoint on the map here : https://francais-a-londres.org/c/logement/Offres/l/map

or here : Sortir - Activités - Français à Londres

am’ i the only one with this behavior?

I’ve just pushed an update that should address this. Let me know how it goes.

https://github.com/angusmcleod/discourse-locations/commit/712b2dd92341690b1388d3128d8c643b4f6efd58

2 Likes

:+1: great :clap:.

Thanks a lot

2 Likes

Hey @angus

I’m unable to add a minus value here?

The “0 to 2000000000” indicates the value should be positive. And because it is 2000000000 instead of 360, it suggests it is a database type limitation.

A work-around should be to give a positive only value eg.
360 - 2.46 = 357.54

3 Likes

Interesting… but then that is no longer a valid set of Latitude / Longitude co-ordinates?

And has something changed on this plugin recently re user locations?

Users are currently unable to remove an existing Map Location from their profile? :thinking:

They can change it with no problems, but they can’t remove it?

It may not be the typical way to express it, but I don’t see why it wouldn’t be correct. (for longitude, not latitude). If you go around in a circle far enough you’re back where you started.

What happened when you tried it?

1 Like

The map didn’t change :frowning:

1 Like

@Richie Thanks for your reports.

I’ve pushed a fix for the issue with removing user locations.

https://github.com/angusmcleod/discourse-locations/commit/be30b1323ebb0b9f748a34eceaeeba203bb825dc

I’ve also pushed a fix to allow for minus values in the location map center coordinates settings.

https://github.com/angusmcleod/discourse-locations/commit/bc5ca2cc71eae6973d4e6f7131215680358922a0

I’ve also merged in @Sudaraka’s work that adds the user map location to the user card!

https://github.com/angusmcleod/discourse-locations/commit/f2cec576f8ffe42f4a88c05699d21b98e7e8dbbd#diff-64f3e5b6c663d2e0743f78eaf07af55d

e.g.

Screenshot%20at%20Oct%2015%2009-10-33

6 Likes

Dear @angus and @Sudaraka

Thank you guys, this is simply fantastic work, it really is!

I installed the update this morning and sure enough, the user cards now display the “Map Location” value perfectly:

Similarly, I am now also able to enter the centre lat/lng points for the UK in the admin panel:

image

And last but not least, users are able to remove a Map Location from their profile and successfully save the changes.

What can I say…?

Thank you once again gentlemen, my life is now complete :bowing_man:

5 Likes

What is the correct way to control the zoom of the main topic map: location map zoom, location map marker zoom, or location map expanded zoom. None of these settings seem to have any effect on my main topic map (I’d like it to be a little more zoomed in at the beginning). One of them does effect the zoom of the individual maps on the topic page, but I can’t remember which at this time. Are my markers causing the zoom level automatically?

I would just like the zoom level so that the whitespace at the top won’t appear.