Open jywarren opened 7 years ago
@jywarren Shall we start with the integration?
Sure, how's the display library going?
For interface, I'd like to suggest you try to get the basic input to display in a partial template, as you originally did, but this time using the new library!
On Aug 25, 2017 3:08 PM, "Mridul Nagpal" notifications@github.com wrote:
@jywarren https://github.com/jywarren Shall we start with the integration?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/publiclab/plots2/issues/1416#issuecomment-325011018, or mute the thread https://github.com/notifications/unsubscribe-auth/AABfJxpV8v2CSZT_ib1ZzRxk_E-Mw7YFks5sbxuRgaJpZM4NYYC9 .
The display library is at a prototype stage now, it builds fine and has some basic methods.
We need to add the leaflet-blurred-location library to npm first, or we just link it from github itself?
The version is 1.1.0 and the name is leaflet-blurred-location Should I change anything?
I trust your call -- should i grab the latest master and publish it? :-)
added integration steps from #1655 !!
@jywarren Shall we get on with this now? What's our priority for now?
@jywarren Let's finish off with this milestone for starters, or you have something else in mind?
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?
Cleaned up and updated some tasks!!!
So basically, we enter place: buffalo-ny, it then converts to "Buffalo, New York, ZIPCODE, USA" and then does a search. Right?
so this would be in the tag input on a PublicLab.org page --
so we'd detect a place:____
tag here:
https://github.com/publiclab/plots2/blob/0647cb0a7549821f7442213b9571dddfaebedcbb/app/controllers/tag_controller.rb#L278
Then we'd replace '-' with ' '
Then we'd use the already-installed Geocoder gem to try to find where it is: https://github.com/alexreisner/geocoder
Then we'd add two additional tags: lat:____
and lon:____
.
What do you think? Should we instead try to catch this in JavaScript and have a popup that says "Looks like a location -- is this right?" and shows lat/lon? That'd give people a chance to agree/disagree.
Or we could even just let people add the tag, but then show an alert above the tag input area that says "That looked like a location -- click here to add coordinates."
Which do you think is the best experience and the most compact code?
On Wed, May 9, 2018 at 10:52 AM, Mridul Nagpal notifications@github.com wrote:
So basically, we enter place: buffalo-ny, it then converts to "Buffalo, New York, ZIPCODE, USA" and then does a search. Right?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/publiclab/plots2/issues/1416#issuecomment-387766023, or mute the thread https://github.com/notifications/unsubscribe-auth/AABfJy05shdyNk7GHKSZWfDo0jeX6oDgks5twwKtgaJpZM4NYYC9 .
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.
@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
@jywarren Any updates?
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
@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 ?
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:
addTag()
and if it has place:___
, then -
with
(a space) and try to geocodeYes, add coordinates
and No, just use the original tag
optionsYes
, add ,lat:_____,lon:______
to the submitted tag string, else just send the original place:_____
tag aloneHow does this sound?
Sounds awesome!! @jywarren #2734 Please have a look
@jywarren Whats next?
Hi Mridul there are a few open issues in the blurred image repo, want to try those and also some CodeClimate based code structure work?
Thanks!!!
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:
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:
I've moved this to its own issue, here: #3090
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?
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?
@jywarren Sure. Let's start up a fresh planning issue.
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 https://github.com/publiclab/leaflet-blurred-location/issues/1
Release v0.1 - bare bones minimal useful release
[map:all:lat:lon]
https://publiclab.org/wiki/inline-maps (#3090)[map:tag:______:lat:lon]
Release v0.2 - "people and privacy"
v0.2a - Location entry
(mostly via https://github.com/publiclab/leaflet-blurred-location/issues/1)
buffalo-ny
appear as you type "Buffalo, NY", and this is submitted asplace:buffalo-ny
with description "Buffalo, New York, ZIPCODE, USA"lat:xxx
+lon:xxx
- at what zoom level? "City"? Check google geocoder precision field?v0.2b - Map displays
[map:people:lat:lon]
(just people: requires privacy blurring)[map:question:_____]
,[map:activity:_____]
[map:content:Buffalo, NY]
(can this work?) or[map:content]Buffalo, NY[/map]
? -- no, let's just do this via the UI/people
or/questions
(in second half of #1940)41.03,71.04
if you zoom past xx.xx resolution?v0.2c - Map API
tag/tagname.json?geo=true&lat1=__&lat2=__&lon1=__&lon2=__
(bounding box) -- or just within 1 precision digit of/api/geo/41.0/51.8
(#1934) - coordinate w API team/geo/q=Buffalo, NY
? - coordinate w API teamGeo Subscriptions
follow:near:lat:lon
? Coordination w subscriptions team + UI design for this (default to your own location?)