Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Long-term Geographic Features planning #1416

Open
22 of 34 tasks
jywarren opened this issue May 11, 2017 · 27 comments
Open
22 of 34 tasks

Long-term Geographic Features planning #1416

jywarren opened this issue May 11, 2017 · 27 comments
Assignees
Labels
break-me-up break up for cleaner code separation, discrete tests, and, easier and iterative collaboration enhancement explains that the issue is to improve upon one of our existing features help wanted requires help by anyone willing to contribute planning Planning issues! Ruby

Comments

@jywarren
Copy link
Member

jywarren commented May 11, 2017

This is not a regular issue, but is a long-term tracking issue for all Geographic features. It's related to work on this repository (formerly #1070) and to publiclab/leaflet-blurred-location#1


Release v0.1 - bare bones minimal useful release


Release v0.2 - "people and privacy"

v0.2a - Location entry

(mostly via publiclab/leaflet-blurred-location#1)

  • standardize for use in nodes or profiles via separate module for BlurredLocation
  • creates tags "lat:____", "lon:_____", "blurred:true", "place:buffalo-ny"
  • parameterize location as you type, so you see buffalo-ny appear as you type "Buffalo, NY", and this is submitted as place:buffalo-ny with description "Buffalo, New York, ZIPCODE, USA"
  • display tag desc on tag hover (made into FTO at Display a description field for tags, if it exists #1406)
  • use tag description field for full placename? So "place:buffalo-ny" would have description; "Buffalo, New York, ZIPCODE, USA" ?
  • display tag desc on tag page
  • manual entry "place:buffalo-ny" auto-generates lat:xxx + lon:xxx - at what zoom level? "City"? Check google geocoder precision field?
  • Offer recent locations used so you can quickly reuse ones you've already entered? Last 3? And the location you've entered on your profile if that exists?

v0.2b - Map displays

  • Upgrade: bounding box request on drag or zoom (ability to refresh displayed inline maps' displayed data when you pan/zoom #1934)
  • Search box with geolocation and map refresh (follow-up to ability to refresh displayed inline maps' displayed data when you pan/zoom #1934)
  • Advanced short codes for inline maps:
    • (v0.2) [map:people:lat:lon] (just people: requires privacy blurring)
    • (v0.2 or v0.3) variations like [map:question:_____], [map:activity:_____]
    • (abandoned) [map:content:Buffalo, NY] (can this work?) or [map:content]Buffalo, NY[/map]? -- no, let's just do this via the UI
  • Map display on additional standard pages: /people or /questions (in second half of Add map of people to publiclab.org/people #1940)
  • display of blurred locations:
    • show blurred locations for only a range of zoom levels. When you zoom in too far on a blurred location, stop displaying it. Calculate this based on number of decimals and the zoom level.
    • For the highest zoom levels of display, begin showing a region instead of a point (think this through)
    • when does it stop being a point? when you zoom in far enough?
    • no longer display an anything for 41.03,71.04 if you zoom past xx.xx resolution?

v0.2c - Map API

Geo Subscriptions

  • area-based tag-based subscriptions? Perhaps via wildcard subscriptions?
  • "near me" or "near X" vía user tag like follow:near:lat:lon? Coordination w subscriptions team + UI design for this (default to your own location?)
@mridulnagpal
Copy link
Member

@jywarren Shall we start with the integration?

@jywarren
Copy link
Member Author

jywarren commented Aug 25, 2017 via email

@mridulnagpal
Copy link
Member

The display library is at a prototype stage now, it builds fine and has some basic methods.

@mridulnagpal
Copy link
Member

We need to add the leaflet-blurred-location library to npm first, or we just link it from github itself?

@mridulnagpal
Copy link
Member

The version is 1.1.0 and the name is leaflet-blurred-location
Should I change anything?

@jywarren
Copy link
Member Author

jywarren commented Sep 1, 2017

I trust your call -- should i grab the latest master and publish it? :-)

@jywarren
Copy link
Member Author

added integration steps from #1655 !!

@mridulnagpal
Copy link
Member

@jywarren Shall we get on with this now? What's our priority for now?

@jywarren jywarren added the planning Planning issues! label May 3, 2018
@mridulnagpal
Copy link
Member

@jywarren Let's finish off with this milestone for starters, or you have something else in mind?

@jywarren
Copy link
Member Author

jywarren commented May 9, 2018

Awesome. Maybe this one?

manual entry "place:buffalo-ny

This'll require rails-side geocode -- we have a gem installed I think? We'd want to check if there is already lat/lon tags set, but if not, try to geocode the tag and use that.

I think it'll be worth testing to see if this is a relatively reliable way to add location (just entering "place:location-name", stripping out the "-", geocoding) - because if it causes too many errors maybe it's not worth it.

We could start by looking at http://publiclab.org/tag/place:* and testing the different existing tags of this kind in the current JavaScript geocoder. Do they seem to work?

@jywarren
Copy link
Member Author

jywarren commented May 9, 2018

Cleaned up and updated some tasks!!!

@mridulnagpal
Copy link
Member

So basically, we enter place: buffalo-ny, it then converts to "Buffalo, New York, ZIPCODE, USA" and then does a search. Right?

@jywarren
Copy link
Member Author

jywarren commented May 9, 2018 via email

@mridulnagpal
Copy link
Member

The option to add location co-ordinates sounds better, as all the location won't be converted to lat lon as well, thus we could give a pop up as you said.

@mridulnagpal
Copy link
Member

@jywarren Also if we use javascript we can sync the co-ordinates with the leaflet-blurred-location library as well, using the same google API we used in leaflet-blurred-location

@mridulnagpal
Copy link
Member

@jywarren Any updates?

@jywarren
Copy link
Member Author

Ok so if we do it in JavaScript then we won't need the place tag dash removal in ruby code - we can do that in JavaScript! We will need to detect place tags being added in JavaScript though. I believe the file is app/assets/javascripts/tagging.js

@mridulnagpal
Copy link
Member

mridulnagpal commented May 17, 2018

@jywarren There is a method addTag with tagname and selector as input, we can directly check it there right, if its a place? Also when I do console log in the addTag method it doesn't display on the console when I publish the doc. How do I debug ?

@jywarren
Copy link
Member Author

Yes, that makes sense -- add a filter inside addTag(). I believe addTag() uses the HTML form on the page, rather than making an independent AJAX call. We might try to switch to doing an AJAX call, but I guess it really seems to work OK right now, so why bother?

But consider -- addTag() relies on this code being present in HTML: https://github.com/publiclab/mapknitter/blob/master/app/views/tags/_index.html.erb

In any case, on the tag_controller side, it's OK to submit several tags at once, separated by commas, like one,two,three:etc -- so you could:

  1. intercepts addTag() and if it has place:___, then
  2. replace - with (a space) and try to geocode
  3. if successful, pop up a modal saying "we've detected a location and tried to geocode it; does this look right?" showing a longer text description of the place and buttons of Yes, add coordinates and No, just use the original tag options
  4. if they click Yes, add ,lat:_____,lon:______ to the submitted tag string, else just send the original place:_____ tag alone

How does this sound?

@mridulnagpal
Copy link
Member

mridulnagpal commented May 17, 2018

Sounds awesome!!
@jywarren #2734 Please have a look

@mridulnagpal
Copy link
Member

@jywarren Whats next?

@jywarren
Copy link
Member Author

jywarren commented Jun 5, 2018 via email

@jywarren
Copy link
Member Author

Hi, we still need a "combined" content + people map syntax, like:

[map:all:_latitude_:_longitude_]

https://publiclab.org/wiki/inline-maps doesn't list it, so once we implement, we can add that new syntax.

We'd love to show BOTH nodes and profiles at https://publiclab.org/puerto-rico

It'd be a combination of:

  1. People maps: https://github.com/publiclab/plots2/blob/master/app/models/concerns/node_shared.rb#L220
  2. Note maps: https://github.com/publiclab/plots2/blob/master/app/models/concerns/node_shared.rb#L174

I think we could probably make private methods that did these two so there's no code duplication.

@mridulnagpal or @sagarpreet-chadha interested in this one? Mridul knows this stuff pretty well.

I think the templates themselves are at:

@jywarren
Copy link
Member Author

I've moved this to its own issue, here: #3090

@stale stale bot added the stale label Oct 7, 2020
@publiclab publiclab deleted a comment from stale bot Oct 8, 2020
@stale stale bot removed the stale label Oct 8, 2020
@daemon1024
Copy link
Member

Is this the meta issue for https://publiclab.org/wiki/gsoc-ideas#Geographic+features+refinements ? I wanted to discuss the proposed features, would this be the correct thread to get insights on it?

@jywarren
Copy link
Member Author

Hi @daemon1024 yes it is, but it's SOOOOO old! I wonder if we should start anew? Many above ideas are done or discarded. What do you think?

@daemon1024
Copy link
Member

@jywarren Sure. Let's start up a fresh planning issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
break-me-up break up for cleaner code separation, discrete tests, and, easier and iterative collaboration enhancement explains that the issue is to improve upon one of our existing features help wanted requires help by anyone willing to contribute planning Planning issues! Ruby
Projects
None yet
Development

No branches or pull requests

3 participants