# Visual map of users

**URL:** https://meta.discourse.org/t/visual-map-of-users/44020
**Category:** Feature
**Created:** [May 10, 2016, 11:13pm UTC](https://meta.discourse.org/t/visual-map-of-users/44020 "2016-05-10T23:13:33Z")
**Posts on this page:** 16
**Page:** 1

<div class="post-metadata">

### Author: ![MikeTaber](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/miketaber/32/116726_2.png) [@MikeTaber](https://meta.discourse.org/u/MikeTaber)
#### Post date: [May 10, 2016, 11:13pm UTC](https://meta.discourse.org/t/visual-map-of-users/44020/1 "2016-05-10T23:13:33Z")

</div>

Is there a way to create something like an embedded Google Map with the location of users embedded into it, either on a one-off basis (ie: manually created/updated 1x/month) or dynamically on the fly?

We run a private community website so the only people who could see it are the people who are logged in and have access. I looked around and while there is a Location field that appears on the user cards, I don’t see anywhere it’s surfaced in a way that allows us to either generate a map so that people can find & connect with one another individually or search for people within a geographic area if they happen to be visiting that region of the world.

Anyone have any thoughts here? I know that generally speaking, for a publicly available site there would be privacy concerns but these are generally not applicable to our community. Thanks!

---

<div class="post-metadata">

### Author: ![Stephen\_Gates](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stephen_gates/32/116638_2.png) [@Stephen\_Gates](https://meta.discourse.org/u/Stephen_Gates)
#### Post date: [May 11, 2016, 6:47am UTC](https://meta.discourse.org/t/visual-map-of-users/44020/2 "2016-05-11T06:47:02Z")

</div>

Why not use the [data explorer plug-in](https://meta.discourse.org/t/data-explorer-plugin/32566)? This [data model](https://meta.discourse.org/t/database-diagram-for-tables-keys-columns-etcetera-in-discourse/3947/10) will help.

You’ll also need to use [a service to convert the text location into coordinates](http://www.geonames.org/) so they can be mapped.

Location is shown on user cards:

 ![](https://global.discourse-cdn.com/meta/original/3X/8/a/8ae66cfa4f62d41ed94b6d85e17d997ccd41efb9.png)

---

<div class="post-metadata">

### Author: ![MikeTaber](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/miketaber/32/116726_2.png) [@MikeTaber](https://meta.discourse.org/u/MikeTaber)
#### Post date: [May 12, 2016, 1:22pm UTC](https://meta.discourse.org/t/visual-map-of-users/44020/3 "2016-05-12T13:22:01Z")

</div>

Thanks! That points me in the right direction. It will probably take a little while to figure out, but at least now I have a starting point.

---

<div class="post-metadata">

### Author: ![DeanMarkTaylor](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/deanmarktaylor/32/102462_2.png) [@DeanMarkTaylor](https://meta.discourse.org/u/DeanMarkTaylor)
#### Post date: [May 12, 2016, 6:11pm UTC](https://meta.discourse.org/t/visual-map-of-users/44020/4 "2016-05-12T18:11:15Z")

</div>

> [@Stephen\_Gates](#):
>
> Location is shown on user cards:

Yes, it is - however you have screen shot the user’s profile page…

… this is a user card:

 ![](https://global.discourse-cdn.com/meta/original/3X/4/1/41d3e6edd3189d2ff2ea9a82580535c5a41f47a8.png)

Also be aware that the Location field is a “free text” area, so it could say “The Moon, Outer-space” or “In my car”.

---

<div class="post-metadata">

### Author: ![MikeTaber](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/miketaber/32/116726_2.png) [@MikeTaber](https://meta.discourse.org/u/MikeTaber)
#### Post date: [May 12, 2016, 6:25pm UTC](https://meta.discourse.org/t/visual-map-of-users/44020/5 "2016-05-12T18:25:24Z")

</div>

I understand that. I’m well versed in the accuracy of user-entered data. 🙂

---

<div class="post-metadata">

### Author: ![mackk](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mackk/32/59500_2.png) [@mackk](https://meta.discourse.org/u/mackk)
#### Post date: [July 13, 2016, 8:05pm UTC](https://meta.discourse.org/t/visual-map-of-users/44020/6 "2016-07-13T20:05:06Z")

</div>

hey @MikeTaber, I’m curious what came of this – I’d love to add something like this to my site and it could be great if you could share anything you’ve learned about this!

---

<div class="post-metadata">

### Author: ![MikeTaber](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/miketaber/32/116726_2.png) [@MikeTaber](https://meta.discourse.org/u/MikeTaber)
#### Post date: [August 8, 2016, 4:24pm UTC](https://meta.discourse.org/t/visual-map-of-users/44020/7 "2016-08-08T16:24:30Z")

</div>

This is still on our TODO list to be honest. I’m the co-host of MicroConf and got too busy to keep going down this road with all the other things that were going on and this fell down on the priority list. It’s something we’ll come back to, but I don’t have an exact timeline for when we’ll be looking at it because there are too many other things in the air.

---

<div class="post-metadata">

### Author: ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)
#### Post date: [December 22, 2016, 8:06am UTC](https://meta.discourse.org/t/visual-map-of-users/44020/8 "2016-12-22T08:06:49Z")

</div>

I was asked to do something like this today. A fairly easy way to do it is to create the map of users on a WordPress site with an exising map plugin, and then use a custom onebox to embed it on your forum. I wrote a couple of functions in WordPress to add markers and some basic user-info to a map when the user fills out a ‘location’ field on their WordPress profile. I copied a onebox plugin that @fefrei posted on here yesterday to embed the map on the a forum.

With some changes that are being added to the wp-discourse plugin by @iamntz, it will soon be possible to use Discourse as an SSO provider for a WordPress site. Using that, it could be possible to set something up where one WordPress site provides a service like this to a number of forums.

This particular map plugin is quite good. It can potentially provide a lot of information.

 ![](https://global.discourse-cdn.com/meta/original/3X/c/a/ca9824552027e1f024e2872d47ace8cd398552f0.png)

---

<div class="post-metadata">

### Author: ![fefrei](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fefrei/32/119538_2.png) [@fefrei](https://meta.discourse.org/u/fefrei)
#### Post date: [December 22, 2016, 8:55am UTC](https://meta.discourse.org/t/visual-map-of-users/44020/9 "2016-12-22T08:55:23Z")

</div>

I recognize the shape of the title bar and border 😉

This is looking _awesome_!  
What’s up with the black bar at the bottom, though?

---

<div class="post-metadata">

### Author: ![mikechristopher](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mikechristopher/32/89135_2.png) [@mikechristopher](https://meta.discourse.org/u/mikechristopher)
#### Post date: [December 22, 2016, 10:53am UTC](https://meta.discourse.org/t/visual-map-of-users/44020/10 "2016-12-22T10:53:44Z")

</div>

would be great if it took details from the location field within Discourse - we use wordpress however only have the membership within Discourse rather than WP.

---

<div class="post-metadata">

### Author: ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)
#### Post date: [December 22, 2016, 8:06pm UTC](https://meta.discourse.org/t/visual-map-of-users/44020/11 "2016-12-22T20:06:24Z")

</div>

Yes, I think that will be able to be done with using Discourse as an SSO provider for WordPress. The only difficulty I can see in using a location that is supplied as a user custom field on Discourse would be if there was some ambiguity in the location. For example, ‘Paris, United States’ returns 10 possible geolocations (supplied by the Mapzen Search API.) I currently have things setup so that the top result is selected. It looks like this can be quite accurate if ‘city’, ‘state/province’, and ‘country’ fields are all supplied.

If the location was entered on the WordPress site instead of on Discourse, it would be easier to add some validation to ensure that the correct location was being selected. This could be done with a dropdown menu populated with the results returned by a geolocation service.

In terms of user experience, if Discourse is used as the SSO provider for the WordPress site, the user should be able to click on a link on the Discourse site (‘Add me to the map’) that will take them to a WordPress page (for example, a simplified WordPress profile page) where they can add their location and then return back to the forum.

---

<div class="post-metadata">

### Author: ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)
#### Post date: [December 22, 2016, 8:08pm UTC](https://meta.discourse.org/t/visual-map-of-users/44020/12 "2016-12-22T20:08:14Z")

</div>

> [@fefrei](#):
>
> What’s up with the black bar at the bottom, though?

It’s the bottom of a poorly designed iframe-page template.

---

<div class="post-metadata">

### Author: ![meglio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/meglio/32/71444_2.png) [@meglio](https://meta.discourse.org/u/meglio)
#### Post date: [May 21, 2017, 11:48pm UTC](https://meta.discourse.org/t/visual-map-of-users/44020/13 "2017-05-21T23:48:33Z")

</div>

This may be helpful as well:

> [@Show community member ads on Google Maps](https://meta.discourse.org/t/discourse-and-google-maps/62556):
>
> Sharing my success-story with adapting Google Maps to a category listing adverts from our users. Hope it will inspire others to use maps for their communities. [The map](http://map.kozovod.com/goat-market) looks like this: In our Ukrainian Goat Keeper community, we have a [Goat Market](http://forum.kozovod.com/c/kozij-rynok) category. People put their advertising for free there when then want to sell a goat, a pure-breed goat, a newborn goat kid and so on. I wanted to make it more visual and let people easily find who sells what close to them. This wa…

---

<div class="post-metadata">

### Author: ![rriemann](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rriemann/32/115238_2.png) [@rriemann](https://meta.discourse.org/u/rriemann)
#### Post date: [July 28, 2017, 6:25pm UTC](https://meta.discourse.org/t/visual-map-of-users/44020/14 "2017-07-28T18:25:20Z")

</div>

I would like to have such a map.

I have never written a Discourse plugin, but what about this approach:

- write a discourse plugin that creates a new route to access a geo file (either kmz or geojson). This plugin - the plugin would need to do already the conversion from location names to coordinates (a new data field could be introduced for each user that holds the coordinates and gets updated on each profile change)
- The map could then be rendered on some website based on the geojson file and [leafletjs.com](http://leafletjs.com), [mapbox.com](http://mapbox.com) or alike.
- In a next step, the [leafletjs.com](http://leafletjs.com) rendered map ([mapbox.com](http://mapbox.com) is paid-only) could get its own page in discourse

---

<div class="post-metadata">

### Author: ![Globulle](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/globulle/32/98005_2.png) [@Globulle](https://meta.discourse.org/u/Globulle)
#### Post date: [May 22, 2018, 5:56pm UTC](https://meta.discourse.org/t/visual-map-of-users/44020/15 "2018-05-22T17:56:54Z")

</div>

That would be a definitely good feature, I’m looking for it in the two communities I manage.

But Discourse being an open-source project, it would be great to use OpenStreetMap rather than Google! 😉 Just my two cents…

---

<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: [May 22, 2018, 6:05pm UTC](https://meta.discourse.org/t/visual-map-of-users/44020/16 "2018-05-22T18:05:03Z")

</div>

This is already a thing (well almost). See the Locations Plugin:

[https://meta.discourse.org/t/locations-plugin/69742/181?u=merefield](https://meta.discourse.org/t/locations-plugin/69742/181)

> [@Globulle](#):
>
> it would be great to use OpenStreetMap rather than Google! 😉

Agree!
