# Locations Plugin 🌍

**URL:** https://meta.discourse.org/t/locations-plugin/69742
**Category:** Plugin
**Tags:** paid-support
**Created:** [September 10, 2017, 10:36am UTC](https://meta.discourse.org/t/locations-plugin/69742 "2017-09-10T10:36:41Z")
**Posts on this page:** 20
**Page:** 10

<div class="post-metadata">

### Author: ![Don](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/don/32/228726_2.png) [@Don](https://meta.discourse.org/u/Don)
#### Post date: [November 28, 2020, 12:37pm UTC](https://meta.discourse.org/t/locations-plugin/69742/673 "2020-11-28T12:37:57Z")

</div>

Thank you so much! ❤ It works great now! 🙂 I checked everywhere the map (topic, user card, category etc) looks good. Thanks again @merefield! 🙂

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [November 28, 2020, 12:38pm UTC](https://meta.discourse.org/t/locations-plugin/69742/674 "2020-11-28T12:38:20Z")

</div>

Pleasure … now back to moving 🏠 🙂

FYI This will probably break the Layouts map widget, but at least Locations is useable now.

I’ll leave it up to @angus to resolve that issue or I will follow up after house move 🙂

---

<div class="post-metadata">

### Author: ![Richie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/richie/32/115110_2.png) [@Richie](https://meta.discourse.org/u/Richie)
#### Post date: [November 29, 2020, 9:59am UTC](https://meta.discourse.org/t/locations-plugin/69742/675 "2020-11-29T09:59:01Z")

</div>

> [@merefield](#):
>
> If someone could try it now _without_ Layouts plugin, that would be great:

Confirmed all ok here now too!

Thanks Robert @merefield 😃

---

<div class="post-metadata">

### Author: ![angus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/angus/32/341715_2.png) [@angus](https://meta.discourse.org/u/angus)
#### Post date: [November 30, 2020, 2:11am UTC](https://meta.discourse.org/t/locations-plugin/69742/676 "2020-11-30T02:11:52Z")

</div>

Thanks @merefield, _mea culpa_. Sorry guys.

@ckshen I’ve pushed a new update to the locations plugin which will support layouts 0.2 without breaking the non-layouts version. I’ve also addressed the map render issue you’ve described above.

If anyone has any issues with either plugin (or any other plugin) in the next week please ping me, and I’ll respond promptly. Rob is busy moving.

---

<div class="post-metadata">

### Author: ![ckshen](https://avatars.discourse-cdn.com/v4/letter/c/ad7895/32.png) [@ckshen](https://meta.discourse.org/u/ckshen)
#### Post date: [November 30, 2020, 6:58am UTC](https://meta.discourse.org/t/locations-plugin/69742/677 "2020-11-30T06:58:28Z")

</div>

Thanks, Angus! I will update the plugins!

---

<div class="post-metadata">

### Author: ![omarfilip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/omarfilip/32/208019_2.png) [@omarfilip](https://meta.discourse.org/u/omarfilip)
#### Post date: [January 6, 2021, 3:23am UTC](https://meta.discourse.org/t/locations-plugin/69742/678 "2021-01-06T03:23:45Z")

</div>

With 2.7.0.beta1 and discourse-locations e18de2a we seem to have lost the ability to add a location in the user’s profile.

Typing in the location field does not trigger a lookup.

> **Log**
>
> ```
> Message (2 copies reported)
> 
> MaxMindDB (/var/www/discourse/vendor/data/GeoLite2-ASN.mmdb) could not be found: No such file or directory @ rb_sysopen - /var/www/discourse/vendor/data/GeoLite2-ASN.mmdb
> 
> Backtrace
> 
> /var/www/discourse/lib/discourse_ip_info.rb:81:in `rescue in mmdb_load'
> /var/www/discourse/lib/discourse_ip_info.rb:77:in `mmdb_load'
> /var/www/discourse/lib/discourse_ip_info.rb:15:in `open_db'
> /var/www/discourse/lib/discourse_ip_info.rb:10:in `initialize'
> /usr/local/lib/ruby/2.7.0/singleton.rb:125:in `new'
> /usr/local/lib/ruby/2.7.0/singleton.rb:125:in `block in instance'
> /usr/local/lib/ruby/2.7.0/singleton.rb:123:in `synchronize'
> /usr/local/lib/ruby/2.7.0/singleton.rb:123:in `instance'
> /var/www/discourse/lib/discourse_ip_info.rb:149:in `get'
> /var/www/discourse/app/serializers/concerns/user_auth_tokens_mixin.rb:22:in `location'
> 
> ```

Changing the location geocoding provider to any of the available choices results in an error:

 ![location geocoding provider](https://global.discourse-cdn.com/meta/original/3X/6/a/6a998da9b5bc10825397742a49e41597c4e75197.png)

---

<div class="post-metadata">

### Author: ![Richie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/richie/32/115110_2.png) [@Richie](https://meta.discourse.org/u/Richie)
#### Post date: [January 11, 2021, 7:29pm UTC](https://meta.discourse.org/t/locations-plugin/69742/679 "2021-01-11T19:29:27Z")

</div>

Confirmed, same issue here too.

The maps still load ok but new members can’t add a location to their profile at all.

---

<div class="post-metadata">

### Author: ![Richie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/richie/32/115110_2.png) [@Richie](https://meta.discourse.org/u/Richie)
#### Post date: [January 12, 2021, 8:00pm UTC](https://meta.discourse.org/t/locations-plugin/69742/680 "2021-01-12T20:00:53Z")

</div>

@angus @merefield would it help you guys if we reported bugs directly on [the github repo](https://github.com/paviliondev/discourse-locations/issues)?

---

<div class="post-metadata">

### Author: ![angus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/angus/32/341715_2.png) [@angus](https://meta.discourse.org/u/angus)
#### Post date: [January 13, 2021, 4:57am UTC](https://meta.discourse.org/t/locations-plugin/69742/681 "2021-01-13T04:57:48Z")

</div>

Hey @Richie, thanks as always, but the best place is still [Pavilion](https://thepavilion.io/w/bug-report).

@merefield will follow up soon.

We’re all just coming back online after Christmas / New Years so give him a bit of time to get back up to speed.

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [January 13, 2021, 11:49am UTC](https://meta.discourse.org/t/locations-plugin/69742/682 "2021-01-13T11:49:20Z")

</div>

Thanks for the report.

Unfortunately I’m snowed with work atm, but will look when I can.

---

<div class="post-metadata">

### Author: ![Richie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/richie/32/115110_2.png) [@Richie](https://meta.discourse.org/u/Richie)
#### Post date: [February 8, 2021, 9:05pm UTC](https://meta.discourse.org/t/locations-plugin/69742/683 "2021-02-08T21:05:52Z")

</div>

Could anyone point me in the direction of there the lat/lng values are stored in the database for user locations please? 🤔

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [February 8, 2021, 10:50pm UTC](https://meta.discourse.org/t/locations-plugin/69742/684 "2021-02-08T22:50:33Z")

</div>

For each user you can do something along the lines of:

```plaintext
myUser = User.find_by(username_lower: '<username>')

```

then

```plaintext
userLocation = JSON.parse(myUser.custom_fields[:geo_location])

```

then

```plaintext
userLatitude = userLocation.['lat']

```

on the rails console … etc.

---

<div class="post-metadata">

### Author: ![Richie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/richie/32/115110_2.png) [@Richie](https://meta.discourse.org/u/Richie)
#### Post date: [February 9, 2021, 5:30pm UTC](https://meta.discourse.org/t/locations-plugin/69742/685 "2021-02-09T17:30:23Z")

</div>

Thanks Robert @merefield 👍🏻

---

<div class="post-metadata">

### Author: ![Richie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/richie/32/115110_2.png) [@Richie](https://meta.discourse.org/u/Richie)
#### Post date: [March 8, 2021, 4:30pm UTC](https://meta.discourse.org/t/locations-plugin/69742/686 "2021-03-08T16:30:37Z")

</div>

Guys, would it be possible to change some parameters in the background?

Since moving to mapbox tiles `outdoors-v11` the text on the map itself is absolutely tiny:

 ![](https://global.discourse-cdn.com/meta/original/3X/8/9/89e4d5f9d27f0cfbcb91121e7dcd22da86e445c4.jpeg)

There are some parameters to change this:

> <https://gis.stackexchange.com/questions/346360/how-do-i-increase-the-font-size-of-contents-in-map-in-leaflet-js/346383#346383>

Namely just:

```plaintext
tileSize: 512, zoomOffset: -1
```

Which would then make the map readable:

 ![image](https://global.discourse-cdn.com/meta/original/3X/b/b/bbb339a3986f061fa0298d5cff7806e1dd2354b3.jpeg)

Are these parameter changes something you might be able to add in to a future update?

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [March 15, 2021, 3:30pm UTC](https://meta.discourse.org/t/locations-plugin/69742/687 "2021-03-15T15:30:50Z")

</div>

thanks for the suggestion @Richie

Be sure to raise a Feature Request with this info: [Pavilion](https://thepavilion.io/w/feature-request)

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [March 15, 2021, 3:32pm UTC](https://meta.discourse.org/t/locations-plugin/69742/688 "2021-03-15T15:32:43Z")

</div>

Well this is strange 🤔

The ability to _change_ a Topic’s location (once set) got removed, apparently by accident (front end code only, backend was still there!), 4 or so years ago (boy, time flies!). What is perhaps more strange is no-one complained about this feature being missing. 🤐

Good to know people are sure of their Topic Locations at the submission stage!

Here it is back again:

[https://github.com/paviliondev/discourse-locations/commit/e53770d2dad3c6dd962840733a3c57331c556304](https://github.com/paviliondev/discourse-locations/commit/e53770d2dad3c6dd962840733a3c57331c556304)

To update a Topics location, simply hit the pencil icon by the title and hit the location to bring up the form.

---

<div class="post-metadata">

### Author: ![m4ur1c3](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/m4ur1c3/32/267597_2.png) [@m4ur1c3](https://meta.discourse.org/u/m4ur1c3)
#### Post date: [March 18, 2021, 2:29am UTC](https://meta.discourse.org/t/locations-plugin/69742/689 "2021-03-18T02:29:24Z")

</div>

Hi @merefield ,

thanks a lot for this great plugin and the constant support!

I’m using the plugin with Nominatim as geocoder and get location results in the format `<housenumber>, <street>, <neighbourhood>, <suburb>, <city>, <postalcode>, <country>`. If I understand correctly, than I can manipulate the output via the setting _location user profile format_, but I don’t understand how to use it.

My goal is to display the addresses in [german standard format as `{*street_name*}, {postalcode} {*place*} `](https://wiki.openstreetmap.org/wiki/Nominatim/Country_Address_Format) (or written as `<street> <housenumber>, <postalcode> <city>` using the variables above).

Can you please guide me how to achieve this (if possible)? Thank you in advance!

---

<div class="post-metadata">

### Author: ![m4ur1c3](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/m4ur1c3/32/267597_2.png) [@m4ur1c3](https://meta.discourse.org/u/m4ur1c3)
#### Post date: [March 18, 2021, 2:42am UTC](https://meta.discourse.org/t/locations-plugin/69742/690 "2021-03-18T02:42:05Z")

</div>

I think there is an incompatibility when using the [User Card Directory Theme](https://meta.discourse.org/t/user-card-directory/144479) together with the `location user profile map` setting enabled. At least for me the toggled mini map isn’t in foreground in the user directory and overlaid by the card below:

 ![User-Cards_Location](https://global.discourse-cdn.com/meta/original/3X/9/d/9d1a5c98eb5ad665efc6ded7dc6bd1c92b4a16e5.png)

---

<div class="post-metadata">

### Author: ![Richie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/richie/32/115110_2.png) [@Richie](https://meta.discourse.org/u/Richie)
#### Post date: [March 23, 2021, 9:57pm UTC](https://meta.discourse.org/t/locations-plugin/69742/691 "2021-03-23T21:57:17Z")

</div>

785 and still going strong 😃

 ![Screen Shot 2021-03-23 at 21.55.01](https://global.discourse-cdn.com/meta/original/3X/0/0/0045ba04b22be02a0083e2cc9022799968ff240e.png)

> [@m4ur1c3](#):
>
> thanks a lot for this great plugin and the constant support!

This ☝🏻

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [March 23, 2021, 10:00pm UTC](https://meta.discourse.org/t/locations-plugin/69742/692 "2021-03-23T22:00:04Z")

</div>

Yeah not compatible. Follow plugin doesn’t work with this TC either. Don’t mix them. It’s a fundamental issue and will likely never be resolved.

This is because the Plugins use a plugin outlet on the user card and in that TC it is rather oddly repeating the outlet several times over which I believe is totally confusing Ember. So actually I believe the issue is with the TC not the plugins as it is breaking the outlets.

[Previous page](https://meta.discourse.org/t/locations-plugin/69742.md?page=9)

[Next page](https://meta.discourse.org/t/locations-plugin/69742.md?page=11)
