• This forum has been archived. New threads and replies may not be made. All add-ons/resources that are active should be migrated to the Resource Manager. See this thread for more information.

Digital Point User Map

Not open for further replies.


Well-known member
I ported one of my long-time vBulletin addons from 5 1/2 years ago to XenForo, so here it is...

This is a system for geo-locating your currently online users and plotting them on a world Google Map. You can click any of the pins for a link to pull up the user's location in Google Earth.

This is something I originally made 5 1/2 years ago, and decided to port it to XenForo yesterday.

  • Put the contents of the js directory into your XenForo js directory.
  • Put the contents of the library directory into your XenForo library directory.
  • Install the addon_digitalpointUserMap.xml file in your Admin Control Panel -> Install Add-on option.
  • Important! - this uses the free GeoIP PHP extension, so you must have it installed on your server in order for it to work.
  • Uses the XenForo data_registry so it does not repeat GeoIP queries unnecessarily.
You can see a live version (although it's the vBulletin version) in action here:

usermap.webp usermap_europe.webp


Twitter sucks for this, so here we go^^

Change the router to:
return $router->getRouteMatch('DigitalPointUserMap_ControllerPublic_UserMap', $routePath, 'usermap');

Then you don't need
'selected' => ($GLOBALS['fc']->route()->getControllerName() == 'DigitalPointUserMap_ControllerPublic_UserMap')
Ah... that was the magic I was missing. I figured there *had* to be a better way to do it, I was just too tired to go digging deeper. :) Thx
Thanks for the add-on... Looks awesome! Might I ask, there was a mapping addon on VB with the ability for users to submit points on the map and comments.
I think it was "graveyarded" back in VB3.5 or so....
I could REALLY use something like that!
Any plans for this mapping utility going forward?
Nah... no plans to make a system where users can input their own location. I'm a minimalist, so making something always work without any interaction from the end users is preferable in my opinion.

There are a couple reasons:
  • Users can enter fake (or just accidentally wrong) locations.
  • It kind of becomes a privacy issue. Even though the user entered their location and opted into it, do you really want to show people exactly where users are attached to their username?
  • If you only show online users it would be pretty bare since the majority of users wouldn't bother to enter their location.
  • If you showed all users, it would be overloaded and kind of pointless.
  • I like things that just "work magically" and don't require end users to do anything for it to work (oh yeah, I said that... hehe)
Nice Addon i really would like to use. Unfortunately i am using a webspace where i cant install any extras.
Load is minimal... GeoIP does not hit the database or make external calls to do the location query and a normal server should be able to do 20,000 lookups a second. You can find a benchmarking table from years ago (it would be faster now if you use a server made in the last 5 years since those numbers are from a 1.7Ghz Celeron haha) here: http://www.maxmind.com/app/benchmark We are using the C API (the first section of the table).

It also internally caches all lookups so when a user goes to the page, it only needs to lookup user locations that are new since the last time someone visited the page.

So worst case scenario would be if you had like 10,000 users online and a crappy server, it might take 0.5 seconds to lookup everyone if no one had visited the page in the last hour. For anyone else (or a reload), it would probably take 0.1 seconds since it's just pulling everything from the cache other than new users that came online in your site since the last time someone looked.
I'v e been waiting for something like this, although I have a feature request. Any chance the user can have the option "not to show" their location on the map?
I'v e been waiting for something like this, although I have a feature request. Any chance the user can have the option "not to show" their location on the map?
Not really sure how useful that would be since it intentionally does not expose what user is represented by which marker.
ahhhhh, I didn't realize. I seen a version that actually shows where a user lives. Yours is perfect as is. Thanks.
Sorry I didn't get back to you. Been very busy, but it worked phenomenally. Didn't expect issues and didn't find anything wrong.
Not open for further replies.
Top Bottom