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

Major geographic feature planning issue #1070

Closed
19 of 28 tasks
jywarren opened this issue Dec 6, 2016 · 40 comments
Closed
19 of 28 tasks

Major geographic feature planning issue #1070

jywarren opened this issue Dec 6, 2016 · 40 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 outreach issues involve community involvement and helping people who're stuck somewhere

Comments

@jywarren
Copy link
Member

jywarren commented Dec 6, 2016

We've had a wide variety of geographic features planned, built, attempted... this is the issue to organize them all! This is from a planning session with @ebarry and @steviepubliclab. Ask if you'd like to be involved!

Things listed here can/should be broken out into their own issues, and added to the Geography milestone: https://github.com/publiclab/plots2/milestone/7

Add location to profile

Profile display

  • Design a display for a location on a profile page (like https://publiclab.org/profile/liz)
  • Choose a single, random "example location" (Publiclandia) for someone to figure out how to display
  • Hide this display behind a "geo" GET parameter like https://publiclab.org/profile/liz?geo=true
  • Display grid as in above leaflet-virtual-grid issue and shade the appropriate
  • Display a small map to show on profile pages -- hidden behind get param (same as above) and show example location
  • Connect small profile map to profile stored location

Remove location from profile

  • Controller action to do this --
  • use user_tag_controller
  • Message: Your location was removed.
  • Interface on the profile -- button with "confirm"

View people by region on a map


Other projects to plan for:

  • Think about how people and projects and questions and other things are listed in a common map
  • Map view for tag page
  • Location-based notifications
    • subscription to location notifications
    • subscriptions to additional region grid squares you're not in yourself
    • callouts to regions: @location:lat,lon -- "oh hai @region:42,-75 did you see this new permit that got filed for a sand frac mine?"
  • adding location using above location input form, but to notes or wiki pages
  • a map view for notes/wiki pages
  • a generalizable/parametric partial template for location entry
@jywarren jywarren added 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 outreach issues involve community involvement and helping people who're stuck somewhere high-priority labels Dec 6, 2016
@jywarren jywarren added this to the Geographic features milestone Dec 6, 2016
@ebarry
Copy link
Member

ebarry commented Dec 7, 2016

Quick reading shows that the convention might be to use the lower left coordinate pair lat,lng to indicate a grid square. Any other thoughts on this?

@jywarren
Copy link
Member Author

jywarren commented Dec 7, 2016 via email

@jywarren
Copy link
Member Author

Hi @mridulnagpal -- if you're interested in a new challenge, these two (from above) could become a new issue:

@mridulnagpal
Copy link
Member

@jywarren Roger that 👍

@mridulnagpal
Copy link
Member

@jywarren How do I proceed?

@jywarren
Copy link
Member Author

So, first if you could use the helper method in #1094 to display a map in the provided box, then change the template to a partial template. You can look up partial templates in the rails docs but it means you can include it in another template. Make sense? Thanks!!!

@mridulnagpal
Copy link
Member

@jywarren What would be the arguments for the helper method?

@jywarren
Copy link
Member Author

jywarren commented Dec 18, 2016 via email

@mridulnagpal
Copy link
Member

@jywarren It gives an error because of the empty array of objects undefined method `each' for nil:NilClass

@jywarren
Copy link
Member Author

jywarren commented Dec 18, 2016 via email

@mridulnagpal
Copy link
Member

Cool, I tried it and it worked but cannot see a map on the page yet.

@jywarren
Copy link
Member Author

jywarren commented Dec 19, 2016 via email

@mridulnagpal
Copy link
Member

mridulnagpal commented Dec 19, 2016 via email

@jywarren
Copy link
Member Author

jywarren commented Dec 19, 2016 via email

@mridulnagpal
Copy link
Member

No its just the script tag in _leaflet no div tags

@jywarren
Copy link
Member Author

Ah - it needs a div with the right ID -- check out how it's done in /views/sidebar/_related.html.erb, for reference. And perhaps we should move the div into the helper template, since it'll usually be needed? Or people may want to style it differently and we should keep it outside?

Let's also create a new issue for this sub-issue, so we don't clutter the comments up for this umbrella-issue, since we'll be using it for a while :-) sound good? Thanks, and apologies for the slower pace of input while I'm traveling for the next few days!

@mridulnagpal
Copy link
Member

@jywarren I think #1130 is resolved in #1131. Please review.

@jywarren
Copy link
Member Author

Yes -- thanks! If you'd like to tackle the next two here, they have to do with Leaflet JavaScript work.

@mridulnagpal
Copy link
Member

@jywarren Yeah sure

@jywarren
Copy link
Member Author

jywarren commented Jan 4, 2017

@jywarren
Copy link
Member Author

Great work, @mridulnagpal -- maybe this new next step?

make gridSquareNWCorner() method which returns upper-left bound of active grid square

@jywarren
Copy link
Member Author

Hi, it looks all right, but the shaded grid square is not refreshing. I see a delayFactor parameter in the code -- do you know what's going on, @mridulnagpal ?

https://publiclab.org/locations/form

@mridulnagpal
Copy link
Member

@jywarren delayFactor decides how much interval is there in rendering different cells, for example if delayFactor is high all the cells come after some interval one after the other, we can set it to 0 if we want alll the cells to render at the same time.

@jywarren
Copy link
Member Author

jywarren commented Jan 27, 2017 via email

@mridulnagpal
Copy link
Member

@jywarren I have made another PR for it. It works fine now.

jywarren pushed a commit that referenced this issue Jan 31, 2017
* update

* update

* update
@mridulnagpal
Copy link
Member

@jywarren how do we start on the next one?

@jywarren
Copy link
Member Author

Placename autocompletion (break me up) like MapKnitter new map form, as done in this interface, which you can view at https://publiclab.org/profile/info/your_username

So I think we'll need to start using the Google Geocoding API, so look into the links from the above list, especially the form here:

https://github.com/publiclab/plots2/blob/master/app/views/users/_tags_form.html.erb#L101

You can try this search-location-by-text interface here: https://publiclab.org/profile/info/warren (but with your own username)

@mridulnagpal
Copy link
Member

@jywarren Okay so I studied the code for the API but how do I implement it for this one?

@jywarren
Copy link
Member Author

jywarren commented Feb 6, 2017

Hi, Mridul - why don't you try copying in the key portions of the form from the other document, and we'll see how it runs?

@mridulnagpal
Copy link
Member

@jywarren What is our API_KEY for geocoding API?

@jywarren
Copy link
Member Author

jywarren commented Feb 8, 2017

I think we can't share that out publicly, but you should be able to get your own. But now that I think about it, i'm not sure it's required anymore! Are you sure?

@mridulnagpal
Copy link
Member

How do I import the autocomplete method if I can't import the object google? Is there any other way to Import google?

@jywarren
Copy link
Member Author

jywarren commented Feb 9, 2017

Hi, Mridul, perhaps we should open a new issue for this, as we're making a very long comments thread on this more general issue. But i looked and apologies, it looks like the Google Maps API and key are shown here: https://github.com/publiclab/plots2/blob/master/app/views/users/info.html.erb#L8

jywarren pushed a commit that referenced this issue Feb 14, 2017
* update

* update

* update

* autocomplete working
@mridulnagpal
Copy link
Member

@jywarren What's next?

@jywarren
Copy link
Member Author

HI, @mridulnagpal - I notice that the update doesn't happen until you deselect the search form box, do you think you could make it happen upon selecting a place?

Next up will be a method to get the northwest corner of the current box, then working down the list above. I've been checking them off as we go!

Thanks!

jywarren pushed a commit that referenced this issue May 11, 2017
* changes

* form for location

* Gemfile fix

* indentation fix

* conflict resolved
@jywarren
Copy link
Member Author

OK, lots just moved over to: publiclab/leaflet-blurred-location#1 -- this will continue, though plots2-side issues will remain here.

@jywarren
Copy link
Member Author

OK, i'm now closing this and will open a new one for those plots2-side functions we'll need!

@mridulnagpal
Copy link
Member

@jywarren Can you check off the points that have been completed

@jywarren
Copy link
Member Author

Yep!

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 outreach issues involve community involvement and helping people who're stuck somewhere
Projects
None yet
Development

No branches or pull requests

4 participants