Travel Mapping

Web Design Discussion => General Web Design Discussion => Topic started by: Jim on May 24, 2020, 10:05:04 pm

Title: Scrollable Mapview on tmtest
Post by: Jim on May 24, 2020, 10:05:04 pm
My first major Summer 2020 TM/METAL project has been to implement one of the features I've always wanted most myself: a version of Mapview that automatically loads all relevant TM data that's visible as the map is panned and zoomed.  I'm calling it "Scrollable Mapview."  I've made a ton of progress in the last several days and it's ready for some testing and feedback.

http://tmtest.teresco.org/user/mapview.php?v (http://tmtest.teresco.org/user/mapview.php?v)

Add a &u=username QS parameter if you also would like it to reflect your own clinched travels.

I'm most interested in hearing what you think so far and to report any problems you notice.  Please first check to see if it's something I already have noted with an Issue in the Web repository (https://github.com/TravelMapping/Web/issues).  You can report problems by commenting on existing or creating new Issues there or by replying in this thread.

I'd also welcome general testing of existing Mapview functionality on tmtest and any other use there to make sure my work on the new Mapview functionality hasn't broken anything else.  It's pretty much a whole different codebase than the existing Mapview, so I'm confident I haven't broken much.  I'd like to fold this version back into the production site before continuing much further, which I hope will involve using the new codebase to replicate/improve existing Mapview functionality as well.
Title: Re: Scrollable Mapview on tmtest
Post by: Jim on May 24, 2020, 10:14:31 pm
Note that the tmtest server doesn't switch databases to minimize disruptions during site updates, so if you notice problems with data not loading, try back in a few minutes as the DB update might be in progress.
Title: Re: Scrollable Mapview on tmtest
Post by: Jim on May 24, 2020, 10:19:08 pm
Also, I'd like to call a bit of attention to the fact that waypoint markers are not shown in Mapview by default, but in the existing production version can be shown under the "Show Map Options" of the dropdown menu on the upper right.  The Scrollable Mapview implementation does not include waypoints, so can't show the markers.  If you care, please weigh in at https://github.com/TravelMapping/Web/issues/425 .
Title: Re: Scrollable Mapview on tmtest
Post by: mapcat on May 24, 2020, 11:50:09 pm
https://drive.google.com/open?id=1X2p-NExZVjamjOi9GxGRDjnJZiELf9_D (https://drive.google.com/open?id=1X2p-NExZVjamjOi9GxGRDjnJZiELf9_D)

The concurrency of US 20 & NY 146 shows as unclinched, even though I have 100% of US 20 according to the stats on the right.

This is happening anywhere a clinched route is concurrent with a route I haven't entered into my .list.
Title: Re: Scrollable Mapview on tmtest
Post by: michih on May 25, 2020, 06:53:50 am
- Select user in start box? (https://github.com/TravelMapping/Web/issues/441)

- Highlight clinched routes (https://github.com/TravelMapping/Web/issues/440)

- Clinched and overall mileage for loaded segments only? (https://github.com/TravelMapping/Web/issues/442)
Title: Re: Scrollable Mapview on tmtest
Post by: Jim on May 25, 2020, 08:34:23 am
https://drive.google.com/open?id=1X2p-NExZVjamjOi9GxGRDjnJZiELf9_D (https://drive.google.com/open?id=1X2p-NExZVjamjOi9GxGRDjnJZiELf9_D)

The concurrency of US 20 & NY 146 shows as unclinched, even though I have 100% of US 20 according to the stats on the right.

This is happening anywhere a clinched route is concurrent with a route I haven't entered into my .list.

Thanks - quick fix is in.  It fixed the couple spots I checked.  Let me know if you see it cropping up elsewhere.
Title: Re: Scrollable Mapview on tmtest
Post by: mapcat on May 25, 2020, 08:50:33 am
Thanks - quick fix is in.  It fixed the couple spots I checked.  Let me know if you see it cropping up elsewhere.

Looks good now.
Title: Re: Scrollable Mapview on tmtest
Post by: yakra on May 25, 2020, 12:29:21 pm
Gotta wonder how that happened, as siteupdate takes care of marking concurrencies as clinched, and all that info makes it into the DB.
I couldn't satisfy my curiosity on GitHub, as the code's not there yet. Which makes sense, with it all still undergoing heavy revision.
Title: Re: Scrollable Mapview on tmtest
Post by: michih on May 25, 2020, 12:34:11 pm
I couldn't satisfy my curiosity on GitHub, as the code's not there yet. Which makes sense, with it all still undergoing heavy revision.

It is there: https://github.com/TravelMapping/Web/commit/5294e738d9792cb71ec926bc5ef36c30c653563a
Title: Re: Scrollable Mapview on tmtest
Post by: yakra on May 25, 2020, 12:57:42 pm
Found it:
https://github.com/TravelMapping/Web/tree/scrollmap
Title: Re: Scrollable Mapview on tmtest
Post by: Jim on May 25, 2020, 01:15:47 pm
Gotta wonder how that happened, as siteupdate takes care of marking concurrencies as clinched, and all that info makes it into the DB.
I couldn't satisfy my curiosity on GitHub, as the code's not there yet. Which makes sense, with it all still undergoing heavy revision.

As you found, the "scrolltest" branch has the latest.  I was indexing into an array to find out if the segment was clinched, but that array's indices had a different meaning.  Since no convenient array exists, I added a field to the connections so it was readily available when needed.
Title: Re: Scrollable Mapview on tmtest
Post by: Jim on May 29, 2020, 10:41:12 pm
There's a new version up on tmtest that has stats for both the overall route and the visible portion of the route in the routes table.  Looking for everyone's impressions of this change.
Title: Re: Scrollable Mapview on tmtest
Post by: si404 on May 30, 2020, 05:07:30 am
It's unsurprisingly slow-loading, but looks excellent.

Thanks for this.
Title: Re: Scrollable Mapview on tmtest
Post by: mapcat on May 30, 2020, 01:09:51 pm
I like the table enhancements. Unfortunately I can still break it by panning too quickly.

https://drive.google.com/file/d/1SmZTwLbO9Tk7Y-a2gfRH0HLii2AR9Jjm/view?usp=sharing (https://drive.google.com/file/d/1SmZTwLbO9Tk7Y-a2gfRH0HLii2AR9Jjm/view?usp=sharing)

I loaded an image centered on Pittsburgh, and the route table was correct. I zoomed out and panned west to Los Angeles without waiting for the route table to update. I didn't count how many times I clicked and dragged, but it must have been about 12-15. I zoomed in to the view shown in the image, and watched the route table slowly update with routes progressively farther west. It regenerated 10 times before the segments finally appeared, but never managed to show the routes actually in LA (in the image you can see that it quit after getting to Arizona). I left it alone while I uploaded the screenshot and it's now showing routes in Maryland and NYC, even though I never panned east after I loaded the Pittsburgh map (although I initially got to Pittsburgh by panning west from the mapview accessed by the link in the first post, centered at Siena).

Could you delay updating the map and route table by 1-2 seconds, to avoid loading any information while the user is still repositioning the map? Is that what you meant by "debouncing" in https://github.com/TravelMapping/Web/issues/423 (https://github.com/TravelMapping/Web/issues/423)?
Title: Re: Scrollable Mapview on tmtest
Post by: Jim on May 30, 2020, 02:36:27 pm
Yes, @mapcat, I believe the problem you describe will be addressed by debouncing.  I'm also looking into ways to speed the queries themselves, so more frequent reloads will not be so much of a problem.
Title: Re: Scrollable Mapview on tmtest
Post by: Jim on May 30, 2020, 10:39:24 pm
The version on tmtest now has the first attempt to use the debouncing idea to avoid multiple DB reloads and map updates while panning/zooming.  I've set it for now at a 1 second delay after each pan/zoom to see if any additional pan/zoom operations will occur before fetching the data from the DB.  Thoughts and observations welcome.
Title: Re: Scrollable Mapview on tmtest
Post by: michih on May 31, 2020, 03:04:23 am
Even loading the initial graph (and table) with default zoom takes a few seconds. It's more when panning/zooming. Is it possible to display a "Loading..." message?
Title: Re: Scrollable Mapview on tmtest
Post by: Jim on May 31, 2020, 08:19:39 am
Even loading the initial graph (and table) with default zoom takes a few seconds. It's more when panning/zooming. Is it possible to display a "Loading..." message?

Yes, I plan to look into that.

All DB queries will take 4-5 seconds, and that's after the 1 second delay to avoid multiple reloads, regardless of how much is on the map (it has to search all segments, globally).  Transfer of the query results, and getting things into the table and map once the DB queries are complete are very fast operations by comparison, but depend on the number of segments returned.

When panning/zooming if the 1 second delay passes and a DB query starts, and then you start to pan and zoom again, you will be waiting both for the first query to finish and its results to be displayed (the results of which might no longer be visible), then the second DB query and display.
Title: Re: Scrollable Mapview on tmtest
Post by: michih on May 31, 2020, 08:54:55 am
What takes so long, only getting DB info for the table? Or getting the graph too?
Title: Re: Scrollable Mapview on tmtest
Post by: Jim on May 31, 2020, 10:02:20 am
It doesn't load graphs.  Just segments from the DB.  The reason it's expensive (as far as I can tell) is that it needs to look at both endpoints of each of 874,000+ segments and see if either is within the visible area of the map, and that we need to join the segments with waypoints (twice) to get locations, and with clinched to get whether each segment is clinched for the traveler.  Even with all that, it's not perfect as a segment that clips the corner of the visible area but has neither endpoint visible would not be included.
Title: Re: Scrollable Mapview on tmtest
Post by: Jim on May 31, 2020, 10:52:32 am
I just made a change that speeds things up quite a bit on maps without too many segments visible.  It finds visible waypoints first, then gets segments based on that list.  Unfortunately, it's slower than the previous mechanism for large numbers of waypoints, so when over 500 (just a best guess) waypoints are found, it falls back to the original query to find segments.

In any case, for fairly close-in maps, this is a big improvement.  Most of the delay we see now in those cases is from the debouncing to avoid rapid reloads during panning/zooming.
Title: Re: Scrollable Mapview on tmtest
Post by: mapcat on May 31, 2020, 02:20:03 pm
Working great now.

When the route table is more than one page long, if I have scrolled down the table a page or two and then pan to a new location, the table refreshes at approximately the same place rather than the top. Is that by design?

Would it be possible to give users the option of loading a scrollable mapview at the country or state level? Example: loading http://tmtest.teresco.org/user/mapview.php?units=miles&u=mapcat&rg=CO includes routes in surrounding regions. Entering "colorado" as the initial location and choosing "far"for the zoom level centers the map close to the center of Colorado, but the far northern part of the state is cut off. For someplace larger than Colorado, there's no way to see the entire region without zooming out, which requires a great deal of finesse and/or luck if you want the map to be perfectly centered.
Title: Re: Scrollable Mapview on tmtest
Post by: Jim on May 31, 2020, 04:24:53 pm
Working great now.

Good to hear!

Quote
When the route table is more than one page long, if I have scrolled down the table a page or two and then pan to a new location, the table refreshes at approximately the same place rather than the top. Is that by design?

Not by design and I didn't even notice.  I am not sure why, but I think it probably makes most sense to force it back to the top if I can.

Quote
Would it be possible to give users the option of loading a scrollable mapview at the country or state level? Example: loading http://tmtest.teresco.org/user/mapview.php?units=miles&u=mapcat&rg=CO includes routes in surrounding regions. Entering "colorado" as the initial location and choosing "far"for the zoom level centers the map close to the center of Colorado, but the far northern part of the state is cut off. For someplace larger than Colorado, there's no way to see the entire region without zooming out, which requires a great deal of finesse and/or luck if you want the map to be perfectly centered.

Yes, that's something I'd like to do.  First, I would like to replicate existing mapview functionality with the new back-end code.  Then I'd like to add some controls, one of which would be to enable showing all routes in the visible map area at any time.  Other possibilities for the new controls would to be able to bring back up the initial popup to jump to a location, to show/hide segments that are clinched/unclinched, or maybe swap which are more opaque.
Title: Re: Scrollable Mapview on tmtest
Post by: yakra on May 31, 2020, 06:18:46 pm
Polylines do not appear to be stacked by tier.
Looking at my travels in Worcester MA, MA70 renders atop I-290.
Title: Re: Scrollable Mapview on tmtest
Post by: Jim on May 31, 2020, 06:41:56 pm
Polylines do not appear to be stacked by tier.
Looking at my travels in Worcester MA, MA70 renders atop I-290.

Already noted: https://github.com/TravelMapping/Web/issues/436

Title: Re: Scrollable Mapview on tmtest
Post by: Jim on May 31, 2020, 06:46:15 pm
It's not perfect, but I feel like the debouncing and the faster loading for relatively close-in views have made this usable.  It's now on the production site and in the master branch on GitHub.  I've also added links (temporarily) in the motd shown on the home page and (more permanently) at the top of user pages.  I also changed the title of the mapview page to "Mapview" from "Draft Map Overlay Viewer".

I do not believe any previous Mapview functionality is impacted.
Title: Re: Scrollable Mapview on tmtest
Post by: mapcat on May 31, 2020, 09:26:56 pm
Devel systems are showing up on the scrollable maps. I don't see them on pages without the &v parameter.
Title: Re: Scrollable Mapview on tmtest
Post by: Jim on May 31, 2020, 10:31:00 pm
Devel systems are showing up on the scrollable maps. I don't see them on pages without the &v parameter.

Thanks, I'll fix: https://github.com/TravelMapping/Web/issues/447
Title: Re: Scrollable Mapview on tmtest
Post by: compdude787 on May 31, 2020, 11:01:47 pm
I really like this! It's a great improvement over the old mapview as it shows all the systems in a particular area without having to type it into the URL. My thoughts for some improvements (sorry if these have already been mentioned):

-When you open the page, the first thing you see is something to enter in the lat/lon. Only after a few seconds of me looking at that and going "uhhh..." then I saw that I could enter in a city to go to. I think you should make this more prominent because nobody is going to know what lat/lon coordinates they want to start out at.

-Also, add an option to that screen to input username. It's kinda clunky to have to type that into the URL.

-When you have the route table open, and the route table doesn't take up the whole length of the screen, you can't drag the map if you have the mouse cursor in that area.

Other than that, I think this is a great feature that will add a lot to this site.
Title: Re: Scrollable Mapview on tmtest
Post by: yakra on June 01, 2020, 01:43:29 am
The reason it's expensive (as far as I can tell) is that it needs to look at both endpoints of each of 874,000+ segments and see if either is within the visible area of the map, and that we need to join the segments with waypoints (twice) to get locations, and with clinched to get whether each segment is clinched for the traveler.
Thoughts on including beginning/end latitude/longitude directly in the segments table and eliminating the JOINs for a potential speedup?
Title: Re: Scrollable Mapview on tmtest
Post by: michih on June 01, 2020, 03:21:13 am
-When you open the page, the first thing you see is something to enter in the lat/lon. Only after a few seconds of me looking at that and going "uhhh..." then I saw that I could enter in a city to go to. I think you should make this more prominent because nobody is going to know what lat/lon coordinates they want to start out at.

yep! I suggest moving "Find place" on top and hide the lon/lat (to be opened by "Extend").
And I like to have a button that my actual coordinates I directly loaded (well, only if the privacy settings of my device allows you to know my location)

It would be great to get any feedback that the location was found and that I need to press OK to load the map. It's confusing even after some attempts now.
edit: I realized now that there is a feedback. When the location was found, lon/lat is updated. There should be something more visible though (a check icon, OK button color change,...).


-Also, add an option to that screen to input username. It's kinda clunky to have to type that into the URL.

I reported this. It only happens when you open it from the motd link. I works when you open it from the user page. I suggest removing the link from the motd.
Title: Re: Scrollable Mapview on tmtest
Post by: yakra on June 01, 2020, 08:08:26 am
Putting the "Find place" box on top is fine.
But "Set Initial Location and Zoom Level" isn't much real estate to lose; hiding it would just serve to make things less usable: more clicking, a more convoluted interface...
If possible, maybe accept both lat & lon values in a single field, to facilitate pasting coords E.G. from popups from the HB or wptedit.

As for the functionality of OSM Nominatim itself, it thinks "Portland" is somewhere in the Pacific coast. Which we all know is factually incorrect. "Portland CT" maps to a road by that name in Great Yarmouth, Norfolk, and "Portland ME" maps to a local road in Hermosillo, Sonora. Oh what, I gawtta type out the full name theyah, Emm Eh Aye Enn Ee? That's a bit frickin' much bub.
Title: Re: Scrollable Mapview on tmtest
Post by: Jim on June 01, 2020, 08:38:04 am
-When you open the page, the first thing you see is something to enter in the lat/lon. Only after a few seconds of me looking at that and going "uhhh..." then I saw that I could enter in a city to go to. I think you should make this more prominent because nobody is going to know what lat/lon coordinates they want to start out at.

Definitely need to reorganize that.  Putting the Nominatim search field first as mentioned here and below makes a lot of sense.

Quote
-When you have the route table open, and the route table doesn't take up the whole length of the screen, you can't drag the map if you have the mouse cursor in that area.

That's been a longstanding issue with the table CSS we've been using to keep the table above the map and all of the overlays.  https://github.com/TravelMapping/Web/issues/314
Other than that, I think this is a great feature that will add a lot to this site.
[/quote]
Title: Re: Scrollable Mapview on tmtest
Post by: Jim on June 01, 2020, 08:41:01 am
The reason it's expensive (as far as I can tell) is that it needs to look at both endpoints of each of 874,000+ segments and see if either is within the visible area of the map, and that we need to join the segments with waypoints (twice) to get locations, and with clinched to get whether each segment is clinched for the traveler.
Thoughts on including beginning/end latitude/longitude directly in the segments table and eliminating the JOINs for a potential speedup?

Maybe.  Better might be to include a bounding box as an SQL GEOMETRY that would be more readily searchable.  I tried this on the waypoints table with just POINT values but it actually slowed things down.  For the smaller-sized queries, splitting out waypoint queries first then searching for segments sped things up enough that I stopped looking at the spatial functions in SQL.
Title: Re: Scrollable Mapview on tmtest
Post by: yakra on June 01, 2020, 01:18:54 pm
Quote
splitting out waypoint queries first then searching for segments
Got a link to where this is done in the new code?
Title: Re: Scrollable Mapview on tmtest
Post by: Jim on June 01, 2020, 01:46:37 pm
Quote
splitting out waypoint queries first then searching for segments
Got a link to where this is done in the new code?

https://github.com/TravelMapping/Web/blob/master/lib/getVisibleSegments.php
Title: Re: Scrollable Mapview on tmtest
Post by: vdeane on June 02, 2020, 01:00:43 pm
One weird thing I noticed: where state or US routes cross interstates, the state or US route draws on top of the interstate.  Overlaps are handled correctly, and this doesn't happen between US and state routes, so it's a little odd.  Regular mapview like we have for the regions doesn't do this.
Title: Re: Scrollable Mapview on tmtest
Post by: yakra on June 02, 2020, 01:23:19 pm
One weird thing I noticed: where state or US routes cross interstates, the state or US route draws on top of the interstate.  Overlaps are handled correctly, and this doesn't happen between US and state routes, so it's a little odd.  Regular mapview like we have for the regions doesn't do this.
Polylines do not appear to be stacked by tier.
Looking at my travels in Worcester MA, MA70 renders atop I-290.
Already noted: https://github.com/TravelMapping/Web/issues/436
Title: Re: Scrollable Mapview on tmtest
Post by: Jim on June 02, 2020, 01:57:22 pm
The tmtest version for scollable Mapview now has:

- rearranged and clarified search box.
- user and units selection, stored in cookies for persistence.

I'm going to see if I can knock off the stacking order before putting this live on the main site.
Title: Re: Scrollable Mapview on tmtest
Post by: Jim on June 02, 2020, 02:07:39 pm
Stacking order is good on tmtest now too.  I'm going to see if I can tackle any other scrollable Mapview problems I'm aware of before a 3:30 meeting.
Title: Re: Scrollable Mapview on tmtest
Post by: michih on June 02, 2020, 02:23:33 pm
The tmtest version for scollable Mapview now has:
- rearranged and clarified search box.

Much better now! I just don't like the look. E.g. the OK button is almost invisible...

New: Reopen start position popup (https://github.com/TravelMapping/Web/issues/453)
Title: Re: Scrollable Mapview on tmtest
Post by: Jim on June 02, 2020, 02:47:18 pm
Now live on the main site:

- rearranged and clarified search box
- user and units selection in search box
- stacking order of polylines honors tiers
- can click the map in the space below the routes table
Title: Re: Scrollable Mapview on tmtest
Post by: yakra on June 02, 2020, 02:49:02 pm
- can click the map in the space below the routes table
:D
Title: Re: Scrollable Mapview on tmtest
Post by: michih on June 02, 2020, 03:22:39 pm
Does anyone else want routes 100% clinched being indicated with a different backcolor similar to how traveled segments on the HB route table are indicated?
https://github.com/TravelMapping/Web/issues/440

(or a filter to "remove" all routes 100% clinched to ease seeing untraveled segments for planning trips?)
Title: Re: Scrollable Mapview on tmtest
Post by: Markkos1992 on June 02, 2020, 03:34:08 pm
Does anyone else want routes 100% clinched being indicated with a different backcolor similar to how traveled segments on the HB route table are indicated?
https://github.com/TravelMapping/Web/issues/440

(or a filter to "remove" all routes 100% clinched to ease seeing untraveled segments for planning trips?)

I would support both.
Title: Re: Scrollable Mapview on tmtest
Post by: Jim on June 02, 2020, 04:26:35 pm
Does anyone else want routes 100% clinched being indicated with a different backcolor similar to how traveled segments on the HB route table are indicated?
https://github.com/TravelMapping/Web/issues/440

(or a filter to "remove" all routes 100% clinched to ease seeing untraveled segments for planning trips?)

I would support both.

I like the idea of getting that information displayed, but is the Scrollable Mapview the best place for it?
Title: Re: Scrollable Mapview on tmtest
Post by: yakra on June 02, 2020, 04:38:33 pm
Does anyone else want routes 100% clinched being indicated with a different backcolor similar to how traveled segments on the HB route table are indicated?
https://github.com/TravelMapping/Web/issues/440
I quite liked the color gradient from 0% -> 100% that CHM used to have.

I like the idea of getting that information displayed, but is the Scrollable Mapview the best place for it?
region.php & system.php perhaps?
Title: Re: Scrollable Mapview on tmtest
Post by: Jim on June 02, 2020, 05:17:34 pm
Does anyone else want routes 100% clinched being indicated with a different backcolor similar to how traveled segments on the HB route table are indicated?
https://github.com/TravelMapping/Web/issues/440
I quite liked the color gradient from 0% -> 100% that CHM used to have.

It's been my goal to move in that direction site-wide where such shading makes sense.  I think it was something like a blue for 100%, down through the greens, yellows, oranges, to red for 0%.  Whatever it was, I liked it.

Quote from: yakra
I like the idea of getting that information displayed, but is the Scrollable Mapview the best place for it?
region.php & system.php perhaps?

That might be better.
Title: Re: Scrollable Mapview on tmtest
Post by: yakra on June 02, 2020, 05:22:13 pm
I think it was something like a blue for 100%, down through the greens, yellows, oranges, to red for 0%.  Whatever it was, I liked it.
My memory as well. You can see it on the Wayback Machine. Someone posted a link recently; maybe it was in the Top Stats thread?
Title: Re: Scrollable Mapview on tmtest
Post by: yakra on June 03, 2020, 12:25:56 am
http://travelmapping.net/user/mapview.php?units=miles&u=yakra&rte=A30&sys=deua shows me what I expect.
http://travelmapping.net/user/mapview.php?units=miles&u=yakra&rte=A-30&sys=deua (what am I looking for, a Quebec Autoroute?) takes me to the TM Scrollable Mapview setup dialog, even though I didn't specify the &v qs param.


In other news, wacky hijinx with devel-system routes showing up:
http://travelmapping.net/user/mapview.php?units=miles&u=yakra&rg=NS
(http://yakra.teresco.org/images/BedByp.png)
If I scroll down to the bottom the the route table, I see devel cannss routes, which all have the exact same "route trace".
Title: Re: Scrollable Mapview on tmtest
Post by: michih on June 03, 2020, 06:25:35 am
Does anyone else want routes 100% clinched being indicated with a different backcolor similar to how traveled segments on the HB route table are indicated?
https://github.com/TravelMapping/Web/issues/440
I quite liked the color gradient from 0% -> 100% that CHM used to have.

It's been my goal to move in that direction site-wide where such shading makes sense.  I think it was something like a blue for 100%, down through the greens, yellows, oranges, to red for 0%.  Whatever it was, I liked it.

Quote from: yakra
I like the idea of getting that information displayed, but is the Scrollable Mapview the best place for it?
region.php & system.php perhaps?

That might be better.

I'd like to see it the very same way all over the site. Why to omit it on mapview only? Any performance issue?
Title: Re: Scrollable Mapview on tmtest
Post by: Jim on June 03, 2020, 09:16:34 am
'd like to see it the very same way all over the site. Why to omit it on mapview only? Any performance issue?

Two different things.  I would want the shading of table entries based on % traveled everywhere it makes sense.

But the possibility of omitting 100% traveled routes, I don't think that belongs in Mapview.
Title: Re: Scrollable Mapview on tmtest
Post by: michih on June 03, 2020, 11:42:00 am
'd like to see it the very same way all over the site. Why to omit it on mapview only? Any performance issue?

Two different things.  I would want the shading of table entries based on % traveled everywhere it makes sense.

yep, including the table on mapview.

But the possibility of omitting 100% traveled routes, I don't think that belongs in Mapview.

I meant that I disagree to excluding the shading for the table on mapview.

Omitting 100% clinched routes was just an alternaitve suggestion if the shading would not work / not be simple to code.
Title: Re: Scrollable Mapview on tmtest
Post by: michih on June 03, 2020, 01:15:03 pm
I currently plan a little road trip for next weekend and I've realized that the reloading of the graph is not good. I always have to wait when I pan the map. Sure, it is necessary when I move "forward" but when I move back to the previous position, it is also reloaded. That's an disadvantage to the former mapview implementation. To be honest, I cannot plan my trip as before and need to use the old option now.
Title: Re: Scrollable Mapview on tmtest
Post by: Jim on June 03, 2020, 01:32:32 pm
I currently plan a little road trip for next weekend and I've realized that the reloading of the graph is not good. I always have to wait when I pan the map. Sure, it is necessary when I move "forward" but when I move back to the previous position, it is also reloaded. That's an disadvantage to the former mapview implementation. To be honest, I cannot plan my trip as before and need to use the old option now.

I don't think there's much I will be able to do about that.  There is no state maintained from one update to the next.  I could remember the old info but that would quickly lead to lots of memory being used.  Also, more computation on a reload to somehow integrate into the internal data structures when there's going to be overlap, and ensure the tables are only reflecting what's visible.

To me, the scrollable version is only useful if you're going to be at a fairly zoomed-in level, resulting in a few hundred waypoints on the screen at a time.  Given the work it needs to do on each pan/zoom for wider views, it's going to be slow unless I can work out a way to make the DB faster.  And even if we do, Leaflet itself becomes slow when so many overlays are added.
Title: Re: Scrollable Mapview on tmtest
Post by: michih on June 03, 2020, 01:42:14 pm
ok, I think that I asked before but I cannot remember what you answered... Will the "old" mapview stay in place or will it be replaced?

Maybe "old" mapview but INITIAL graph loading for the whole visible screen - as requested by @mapcat - but without any reloading?
Title: Re: Scrollable Mapview on tmtest
Post by: Jim on June 03, 2020, 01:59:57 pm
My next step when I have a big enough chunk of time to put into Mapview is to replicate the old functionality within the new code.  This should be faster than existing and will have all of the data for the region/system/route loaded in and you can pan and zoom around all you want with no reloads just like the existing version.  All it would be missing is the ability to turn on markers for waypoints, but I don't think anyone cares about that anyway.  But what that conversion will do is allow a check to say "switch to scrollable" or some better label, which then takes your current visible area as the starting point for scrollable mapview.  Going back the other way would be harder (scrollable to load a whole region, for example).
Title: Re: Scrollable Mapview on tmtest
Post by: mapcat on June 03, 2020, 05:13:28 pm
If the map area includes no routes at all, the route table shows one entry:
Albania Autoudhë (alba)
ALB A1Thu 0.00 of 1.78 (0.0%)0.00 of 8.23 (0.0%)
Title: Re: Scrollable Mapview on tmtest
Post by: Jim on June 03, 2020, 05:48:25 pm
If the map area includes no routes at all, the route table shows one entry:
Albania Autoudhë (alba)
ALB A1Thu 0.00 of 1.78 (0.0%)0.00 of 8.23 (0.0%)

I'll check it out.  https://github.com/TravelMapping/Web/issues/460