@sagarpreet-chadha updated us that:
I had implemented a new route /map (https://github.com/publiclab/plots2/pull/6874) with a full screen map with URL Hash implemented. Check this link:
https://publiclab.org/map/mapknitter#lat=60.23981116999893&lon=5.976562500000001&zoom=4
It looks great!
Follow up tasks:
Copied from https://github.com/publiclab/plots2/issues/6801
/map/_wiki_slug_
routes that source lat/lon/zoom from matching wiki page #7061/map/_wiki_slug_#zoom/lat/lon
pages as you drag #7061/map/SLUG
pages/map/SLUG
permalinks/map/SLUG
for wikis, and /map#zoom/lat/lon
permalink for notes #7061/map/…
pages to add a note, question or wiki at that location (go to a selection page between these options, at /post/choose?tags=lat:10,lon:10
-- preserving params!)A couple notes that may be helpful to @nstjean @sagarpreet-chadha @crisner --
These styles can bust out of the Bootstrap margins to become full-width, when applied to divs in the main content column. I used them in https://publiclab.org/wiki/inline-maps and they work on mobile too!
For the View on a map
buttons, we can use the same style buttons as the "Add a location" buttons:
But with this nice "map" icon maybe? <i class="fa fa-map" aria-hidden="true"></i>
and actually the same locations for those buttons - they should appear whenever there IS a location, so exactly the opposite condition from when the Add a location
button appears.
What do you think?
It all looks good!
I like the thought of having the footer still exist below it, it has a lot of information in there and would allow the map page to feel like still part of the overall website.
For these two options:
Make
/map/_wiki_slug_
routes that sourcelat/lon/zoom
from matching wiki page
get notes, wikis, and people all showing on/map/SLUG
pages
How will the code decide if it's a wiki page or if it's supposed to grab all the notes/wikis/people for the slug? Should there be a route like /map/tag/SLUG
to differentiate?
The "Add your location" button opens the popup modal, right?
Should the "view on a map" button have a red icon as well, or just the default color?
Ah, sorry - so, at /map/_wiki_slug_
, it would look up the lat/lon from the corresponding wiki page; for /map/providence
it would look for lat/lon at /wiki/providence
for example. Then it would show the content/people for that location, just as the first maps on this page do (though they're missing people; we need to sort that out in #3090): https://publiclab.org/wiki/inline-maps
Re "add your location" that's right!
The View on a map button could also have a red icon, i suppose, to match the Add location button?
Awesome!
Excellent. :smile:
@sagarpreet-chadha @jywarren What should happen if a wiki doesn't have a lat/lon? If it has a lat/lon and no zoom we can calculate zoom, but what if it doesn't have any location information?
And what should be the default for the page /map when there is no lat/lon/zoom specified?
If there's no coord info, we won't show the map button, and if someone
manually goes to that path, we can just display an alert that the page has
no location information, maybe?
As to the main /map/ page, we should default to user profile location and
fall back to a global map, I think, what do you think?
Thanks!
On Mon, Dec 23, 2019, 9:46 AM Natalie St Jean notifications@github.com
wrote:
@sagarpreet-chadha https://github.com/sagarpreet-chadha @jywarren
https://github.com/jywarren What should happen if a wiki doesn't have a
lat/lon? If it has a lat/lon and no zoom we can calculate zoom, but what if
it doesn't have any location information?And what should be the default for the page /map when there is no
lat/lon/zoom specified?—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/publiclab/plots2/issues/6993?email_source=notifications&email_token=AAAF6J5GQYFK4MCJP6X3BXDQ2DEZ3A5CNFSM4J35CYQKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHRIIIY#issuecomment-568493091,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAAF6J7YA7UW3SJSLFSZIJDQ2DEZ3ANCNFSM4J35CYQA
.
Ok that sounds just fine!
@jywarren .inline-fullwidth-content
is not working on the /map/ page for some reason. So strange! This is what I get when I apply that class with no other width specificiations.
You can take a look here: https://github.com/publiclab/plots2/pull/7048
@jywarren In your instructions you say /map/_wiki_slug_#zoom/lat/lon
as the URL. But @sagarpreet-chadha had already implemented a URL hash in the format /map/layernames#lat=6.3&lon=-10.7&zoom=11
Do you prefer that I keep what Sagarpreet has done and build around that format? Or do you want me to change it all to the format you initially described?
I'm working on these all as-is but I can change it if you want me to.
Hi! Regarding the inline style, it's designed to work with the #content div
as in the wiki and note page templates, so perhaps your page is differently
structured?
Let's go with the shorter url I proposed! Just to ask, was layernames a
param or just a static string?
Thanks! Happy New Year!
On Tue, Dec 31, 2019, 10:59 AM Natalie St Jean notifications@github.com
wrote:
@jywarren https://github.com/jywarren In your instructions you say
/map/_wiki_slug_#zoom/lat/lon as the URL. But @sagarpreet-chadha
https://github.com/sagarpreet-chadha had already implemented a URL hash
in the format /map/layernames#lat=6.3&lon=-10.7&zoom=11 Do you prefer
that I keep what Sagarpreet has done and build around that format? Or do
you want me to change it all to the format you initially described?I'm working on these all as-is but I can change it if you want me to.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/publiclab/plots2/issues/6993?email_source=notifications&email_token=AAAF6J2ZQ4R7ZMBFTFKAL3TQ3NT7DA5CNFSM4J35CYQKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEH4MATA#issuecomment-569950284,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAAF6J66IKQTUITDVEYHXXLQ3NT7DANCNFSM4J35CYQA
.
Yes it might be structured differently!
Ok, I'll change the hash! The layernames was set up as a route param. I think it would be better to add it to the end of the url as an optional string.
Happy new year!!
I've checked off the items that are completed in the current PRs!
@jywarren @sagarpreet-chadha I need some clarification on these items:
get notes, wikis, and people all showing on /map/SLUG pages
make “#” link in grey appear on wiki page popups that show /map/SLUG permalinks
And from #6801
get popups showing title, link for each wiki, note, and question
By popups you mean markers on the map with an info popup that shows up on hover or click? And for each wiki page map you want it showing all the data from the site, all notes, wikis and people?
get notes, wikis, and people all showing on /map/SLUG pages
Here, just wanting them to be like the map on this page, in that it shows site content, whether pages, notes, or people: https://publiclab.org/wiki/puerto-rico -- but I think we have to address this in https://github.com/publiclab/plots2/issues/3090
make “#” link in grey appear on wiki page popups that show /map/SLUG permalinks
For this, I was thinking something like this:
Very roughly (i'm sure we can make it look better) but where the #
link is a permalink to the /map/_slug_
URL for that node. Does that make sense?
Regarding popups, yeah, that's right! I think we can refine the popups that are shown a lot. The best thing would be if they appeared as they do on pages like this: https://publiclab.org/tag/water-quality
But as a map popup:
You both have some excellent mockup/design skills. Would you like to try giving the popup design a go?
Yeah sure! I'll do some designing!
get notes, wikis, and people all showing on /map/SLUG
Do we want notes, wikis and people showing on /map/
? Or just /map/wikislug/
?
@jywarren If this issue is incomplete I would
like to do try this .
Hi @NitinBhasneria This is a project I am almost done with. :) Thanks for offering to help, though!
Do we want notes, wikis and people showing on /map/? Or just /map/wikislug/?
On both, thank you!
I believe this is all complete! Closing!!!
Most helpful comment
Here, just wanting them to be like the map on this page, in that it shows site content, whether pages, notes, or people: https://publiclab.org/wiki/puerto-rico -- but I think we have to address this in https://github.com/publiclab/plots2/issues/3090
For this, I was thinking something like this:
Very roughly (i'm sure we can make it look better) but where the
#
link is a permalink to the/map/_slug_
URL for that node. Does that make sense?Regarding popups, yeah, that's right! I think we can refine the popups that are shown a lot. The best thing would be if they appeared as they do on pages like this: https://publiclab.org/tag/water-quality
But as a map popup:
You both have some excellent mockup/design skills. Would you like to try giving the popup design a go?