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
jywarren opened this issue Dec 6, 2016 · 40 comments

Comments

@jywarren
Copy link
Contributor

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
@ebarry

This comment has been minimized.

Copy link
Member

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

This comment has been minimized.

Copy link
Contributor Author

commented Dec 7, 2016

@jywarren

This comment has been minimized.

Copy link
Contributor Author

commented Dec 18, 2016

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

  • move actual input form into a partial template for use in location entry across the site
  • Leaflet map display - at top of #1035's blank template - use Leaflet as per examples to display a zoomable/draggable map in the form (above) -- build on this helper: #1094 - code example here: <%= render_map(@node.lat, @node.lon, @maps) %>
@mridulnagpal

This comment has been minimized.

Copy link
Member

commented Dec 18, 2016

@jywarren Roger that 👍

@mridulnagpal

This comment has been minimized.

Copy link
Member

commented Dec 18, 2016

@jywarren How do I proceed?

@jywarren

This comment has been minimized.

Copy link
Contributor Author

commented Dec 18, 2016

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

This comment has been minimized.

Copy link
Member

commented Dec 18, 2016

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

@jywarren

This comment has been minimized.

Copy link
Contributor Author

commented Dec 18, 2016

@mridulnagpal

This comment has been minimized.

Copy link
Member

commented Dec 18, 2016

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

@jywarren

This comment has been minimized.

Copy link
Contributor Author

commented Dec 18, 2016

@mridulnagpal

This comment has been minimized.

Copy link
Member

commented Dec 19, 2016

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

@jywarren

This comment has been minimized.

Copy link
Contributor Author

commented Dec 19, 2016

@mridulnagpal

This comment has been minimized.

Copy link
Member

commented Dec 19, 2016

@jywarren

This comment has been minimized.

Copy link
Contributor Author

commented Dec 19, 2016

@mridulnagpal

This comment has been minimized.

Copy link
Member

commented Dec 19, 2016

No its just the script tag in _leaflet no div tags

@jywarren

This comment has been minimized.

Copy link
Contributor Author

commented Dec 20, 2016

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

This comment has been minimized.

Copy link
Member

commented Dec 28, 2016

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

@jywarren

This comment has been minimized.

Copy link
Contributor Author

commented Dec 28, 2016

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

@mridulnagpal

This comment has been minimized.

Copy link
Member

commented Dec 29, 2016

@jywarren Yeah sure

@jywarren

This comment has been minimized.

Copy link
Contributor Author

commented Jan 4, 2017

@jywarren

This comment has been minimized.

Copy link
Contributor Author

commented Jan 26, 2017

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

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

@jywarren

This comment has been minimized.

Copy link
Contributor Author

commented Jan 26, 2017

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

This comment has been minimized.

Copy link
Member

commented Jan 27, 2017

@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

This comment has been minimized.

Copy link
Contributor Author

commented Jan 27, 2017

@mridulnagpal

This comment has been minimized.

Copy link
Member

commented Jan 29, 2017

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

jywarren added a commit that referenced this issue Jan 31, 2017

Fix/grid scroll #1070 (#1223)
* update

* update

* update
@mridulnagpal

This comment has been minimized.

Copy link
Member

commented Jan 31, 2017

@jywarren how do we start on the next one?

@jywarren

This comment has been minimized.

Copy link
Contributor Author

commented Jan 31, 2017

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

This comment has been minimized.

Copy link
Member

commented Feb 4, 2017

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

@jywarren

This comment has been minimized.

Copy link
Contributor Author

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

This comment has been minimized.

Copy link
Member

commented Feb 8, 2017

@jywarren What is our API_KEY for geocoding API?

@jywarren

This comment has been minimized.

Copy link
Contributor Author

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

This comment has been minimized.

Copy link
Member

commented Feb 9, 2017

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

@jywarren

This comment has been minimized.

Copy link
Contributor Author

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 added a commit that referenced this issue Feb 14, 2017

Fix/grid scroll #1070 #1256 (#1257)
* update

* update

* update

* autocomplete working
@mridulnagpal

This comment has been minimized.

Copy link
Member

commented Feb 20, 2017

@jywarren What's next?

@jywarren

This comment has been minimized.

Copy link
Contributor Author

commented Feb 20, 2017

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 added a commit that referenced this issue May 11, 2017

Major Graphics Change #1070 (#1314)
* changes

* form for location

* Gemfile fix

* indentation fix

* conflict resolved

@jywarren jywarren referenced this issue May 11, 2017

Closed

Planning overview #1

35 of 39 tasks complete
@jywarren

This comment has been minimized.

Copy link
Contributor Author

commented May 11, 2017

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

@jywarren

This comment has been minimized.

Copy link
Contributor Author

commented May 11, 2017

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

@jywarren jywarren closed this May 11, 2017

@jywarren jywarren removed the priority label May 11, 2017

@jywarren jywarren referenced this issue May 15, 2017

Open

Long-term Geographic Features planning #1416

19 of 34 tasks complete
@mridulnagpal

This comment has been minimized.

Copy link
Member

commented Jan 22, 2018

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

@jywarren

This comment has been minimized.

Copy link
Contributor Author

commented Jan 23, 2018

Yep!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.