User map [Deleted]

I think you're seeing the scrollbar because of the banner add at the top which does not change on the fly. The map, for me, changes to fit as you resize the window.
 
No idea what the Latitude and Longitude fields are. Not my add-on.

As for the Map Location - it should not (I don't think) be shown by default. Did you enable it by mistake?
Nonetheless, you can turn it off here:
View attachment 148130

HTH
C

Blah, Sorry!:rolleyes: Must have been from something from another addon requirement!:eek:

I wished I would have remembered to check Custom User Fields! :mad:
 
CrispinP updated User map with a new update entry:

New grouping functionality

Two new bits of functionality added -
  • Start a conversation with everyone visible on the map
  • Show groups on the map, hide groups etc.
  • Maintenance fixes.

Start a conversation with everyone visible on the map
You can now start a conversation with everyone visible on the map. This is handy if you want to contact everyone in a certain area. Normal permissions kick in with starting conversations and conversation limits.
This can be turned off in ACP.

Show...

Read the rest of this update entry...
 
Hello @CrispinP

Other cool stuff:
- view only all staffs
- view only all members in my group or group xyz (nice for social group addons)
...

I think that will be a grand feature for your cool map addon. (y)

Hey, This has been added on there now. Feedback welcome :)


I'm going through the previous posts for ideas outstanding.
 
This basic spatial query for a distance from a specific point is a good example on only about 4k rows that have location data

Code:
SELECT
  user_id,
  X(cum_map_location) AS "latitude",
  Y(cum_map_location) AS "longitude",
  (
    GLength(
      LineStringFromWKB(
        LineString(
          cum_map_location,
          GeomFromText('POINT(39.900757 -76.606021)')
        )
      )
    )
  )
  AS distance
FROM xf_user_profile
WHERE cum_map_location IS NOT NULL
  ORDER BY distance ASC
  LIMIT 0,30;
The main sorting stage of the query is about 5-10 times slower on the InnoDB with no index.

I'm also doing an accurate distance query taking into account longitude differential which shows some difference as well but is mostly restricted by the function math. Just playing around today and figuring out various methods for semi-accurately finding other users close without too much SQL work.

Code:
drop function if exists lineDistanceC;
delimiter //
CREATE FUNCTION lineDistanceC (la1 DOUBLE, lo1 DOUBLE, la2 DOUBLE, lo2 DOUBLE) RETURNS DOUBLE
BEGIN
    SET @r = 6371;
    SET @lat1 = RADIANS(la1);
    SET @lon1 = RADIANS(lo1);
    SET @lat2 = RADIANS(la2);
    SET @lon2 = RADIANS(lo2);
    SET @x = (@lon2-@lon1) * COS((@lat1+@lat2)/2);
    SET @y = (@lat2 - @lat1);
    RETURN (SQRT((@x*@x) + (@y*@y)) * @r);
END
//
delimiter ;

SELECT
  user_id,
  location,
  lineDistanceC(X(cum_map_location),Y(cum_map_location),39.900757,-76.606021) AS distance
FROM xf_user_profile
WHERE cum_map_location IS NOT NULL
  HAVING distance <=75
  ORDER BY distance ASC

How did you think of including functionality like this in the map? I think something like a slider to say "show x distance from me"?

I'll look at splitting the table out too now. I have enough custom columns in there to justify it :)
 
How did you think of including functionality like this in the map? I think something like a slider to say "show x distance from me"?

I'll look at splitting the table out too now. I have enough custom columns in there to justify it :)
Well I'll be using it for my own custom purposes :cool: but for the map I was thinking something like a slider or dropdown with incremental distances and a show users. Depending on what distance is selected, you could auto-zoom to an appropriate level to show all the pins and then follow-on to your Start a conversation function (which works well, nice!)
 
.maptoggled_button
  • Any chance to add some text into this (for now is only 3 dots)
  • Any chance to replace with some FA icon
  • Any chance to have open by default
 
I've just updated the update - I forgot to include two new bits of functionality :sleep:

New bits of functionality added -
  • Start a conversation with everyone visible on the map
  • Show groups on the map, hide groups etc.
  • User Opt-out
  • You can not decide if you want to use Map Location custom field or the built-in Location field.
  • Maintenance fixes.
 
Well I'll be using it for my own custom purposes :cool: but for the map I was thinking something like a slider or dropdown with incremental distances and a show users. Depending on what distance is selected, you could auto-zoom to an appropriate level to show all the pins and then follow-on to your Start a conversation function (which works well, nice!)

Cool. Same ideas then.
I'll have to spend some time swapping out the data from the profile table to a custom table in the next release. I'll add a slider at that point too.
 
@CrispinP BUGs v3.5.1:

  1. Member_View: when you click on the "Map" tab the map is empty. I guess you forgot to adapt the new selection method to the member view, so the map shows "nothing selected". It should show only the pin of the member by the way, not other members like in previous versions.
  2. User Group Selection and view on the map does not work. Either just a few are shown (less than the correct numbers) or none of a specific group at all.
 
Last edited:
The groups thing -


It uses the display group - not any-group-the-user-has. I had a bit of back and forth about this and, well, the display group was easier :)

So, for example - my main group is Administrator so it shows me. I have a group called Registered+20 which people with more than 20 posts are in as a secondary group.
Selecting this group on the map will actually show nobody as it's no anyone's title group.

Not sure if this is ideal or not. Are you looking for secondary groups to work to? If so, I need to spend some time trying to work out how to do it without killing your server. XF stores secondary group in a less-than-ideal-way in the DB.

Also, for the benefit of all - If you have 10 members in a group and only 5 with a location it'll only show 5 ;) (But you all knew that)

C
 
Not sure if this is ideal or not. Are you looking for secondary groups to work to?

Of course secondary groups... because, in accordance to the "best practice" by the XF development team, ALL members should be in the "Registered" as the primary user group and then be added to the specific secondary groups. Everything else is too vague and you will have big trouble to explain why it only works when you have certain parameters in the forum setting...
 
Top Bottom