Plots2: Add map of people to publiclab.org/people

Created on 9 Jan 2018  ·  19Comments  ·  Source: publiclab/plots2

Please describe the problem (or idea)

Here are draft steps (still open for edit)

break-me-up more-detail-please

Most helpful comment

Let's move forward with this plan of showing a max of 100 (most recent) people for a given viewport!

All 19 comments

I think we could start by combining the "questions" and "answers" shown on profile pages: https://publiclab.org/profile/warren into a single column, and displaying a small map in the right-most column.

If the person has a location marked, it can show that location. If not, we can show a link there to enter your location, which would trigger the location selection modal (same as the map marker icon button in the tag input area at the bottom of the profile page).

Let's start with a sketch of this interface so we're all on the same page!

How about this ? Is it fine ?
Display map on the profile page :
screen shot 2018-01-10 at 1 40 57 pm

Oh, this looks cool! If the user has the blurred:true tag we should not show a map marker, but if they don't, we can!

We could display a generic map tile with a white button centered over it for people who haven't entered a location yet --

map

In the middle of the tile, the button could say Share your location -- what do you think?

There's also a good overview although a bit technical, of the location blurring, that could be adapted here: https://github.com/publiclab/leaflet-blurred-location/

And for the displayed map let's try for a square -- it'll show up black and white if we use the template here:

https://github.com/publiclab/plots2/tree/master/app/views/map/_leaflet.html.erb

We do need to supply an items local variable to that template when we use it -- i think it'll be: render partial: '', locals: { items: [@profile_user] }

This is exciting!

Opened PR #1965 .

I just sorted this a bit and articulated the latter 2 tasks. @sagarpreet-chadha is tackling the first two.

But actually i have a clarification -- on https://publiclab.org/people do we want to show /all/ people? That could rapidly become a lot. Options:

  1. all people (this would be ok at first but rapidly too much)
  2. just the most recently active ones, as that page already lists?
  3. ones near the current user's location (or a random one if you haven't saved a location)?
  4. ones near the most recently self-located active user (trying to be creative here)

Thoughts?

@jywarren , i was thinking that ,
CASE 1 : if user has shared his/her location , we can show only the nearby people(if any) .
CASE 2: if user has not shared his/her location , we may show 40-50 (maybe more) recent contributors .
What do you think ? Should i break this issue into smaller solve-able parts ? Thanks !

Hi, i just updated the checklist a bit and renamed. I think we should start by just showing the most recent 100 people. Once this starts to act funny, we can widen the query. How's that sound? Your help would be great!

Feel free to break out sub-issues using parts of this, then!

@jywarren , should we create an API using the model function self.people_map and rendering a blank map and then calling the API asynchronously OR simply making a query on database like before ?

Yes, that sounds perfect to use the API asynchronously! This should result in substantially simpler and more re-used code. Thanks!!

Regarding the map of people on /people, the point of having this is to show the worldwide breadth of people. I realize we do not want to load a live view of all people in the database, so how about using a static snapshot that's only updated once every so often, and has clustered markers as the version of the map that initially loads on the page.

Then, if someone wants to browse by map, they could click some text under the map or something. This would load an actual, interactive map that could have different behaviors, like only showing markers at certain zoom levels, or the idea of "most recent" that was proposed above (although that's not a very exciting idea to me)

I think we face a similar issue to some of our tag visualization issues here. Even if we only update periodically, it could take down the site for a minute or two when that happens.

I'm trying to think of what kind of query could handle a couple thousand tags, though.

Liz, what do you think of

  • loading a random set of ~100 people BUT
  • as you zoom in, it'd refresh and load ~100-500 only inside your bounding box, SO
  • the further you zoom in the more likely you are to see /everybody/ for that view?

Would that be a good first step foward? We get a map, all the setup, and then we can continue changing exactly what people are shown on the page.

Let's move forward with this plan of showing a max of 100 (most recent) people for a given viewport!

Okay ! Will start work on this as soon as we get this PR #2044 correct 👍 !

awesome!

On Fri, Jan 26, 2018 at 2:52 AM, Sagarpreet Chadha <[email protected]

wrote:

Okay ! Will start work on this as soon as we get this PR #2044
https://github.com/publiclab/plots2/pull/2044 correct 👍 !


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/publiclab/plots2/issues/1940#issuecomment-360708456,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AABfJ1lWVWD9RScFIzS8FDuMXpn7LVrcks5tOYRAgaJpZM4RYYo1
.

great!!! I realize the wiki page on location privacy is still outstanding and it's on my list

@ebarry , can i write the writeup page on location security ?

Please do @sagarpreet, thank you! We may take a revision afterwards but
would love the help :-)

On Thu, Feb 1, 2018 at 9:48 PM, Sagarpreet Chadha notifications@github.com
wrote:

@ebarry https://github.com/ebarry , can i write the writeup page on
location security ?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/publiclab/plots2/issues/1940#issuecomment-362493047,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AABfJ1TZXzasaODYhNQowrBVxLCU_i5nks5tQqG2gaJpZM4RYYo1
.

I'm closing this, as we've completed everything on the list! https://publiclab.org/wiki/location-privacy

Was this page helpful?
0 / 5 - 0 ratings

Related issues

SidharthBansal picture SidharthBansal  ·  87Comments

SidharthBansal picture SidharthBansal  ·  142Comments

grvsachdeva picture grvsachdeva  ·  183Comments

jywarren picture jywarren  ·  81Comments

SidharthBansal picture SidharthBansal  ·  116Comments