Web Design Discussion > General Web Design Discussion

New HB showroute implementation

(1/12) > >>

Jim:
Now for your enjoyment and testing on tmtest: a new Highway Browser implementation to view chopped and connected route data, to replace the old functionality of /hb/index.php when r= was specified to load a route.


* The big new feature is to be able to show an entire connected route at once.  When a connected route is displayed, labels in popups on the map include the .list name for easy selection of endpoints for the new 6-field .list entries that will be announced soon.
* When viewing a chopped route, there's a link below the .list name label to load the whole connected route (question: should this be there for connected routes consisting of just one chopped route?)
* When viewing a connected route with more than a single chopped route, you can link to individual chopped routes through the rows in the Route Stats table.
* Shading to indicate which segments are traveled in the Waypoints table now starts and ends in the middle of the rows corresponding to the endpoints of the travel.  To me this is more accurate and intuitive, but I can put it back if there's an outcry against it.
* A single marker contains labels for both chopped routes where they meet at region boundaries.
* Much of this is a reimplementation for efficiency (no more dependency for the HB on waypoints.js.php!).  It should also use somewhat less memory as some redundant or unused data is no longer created and stored.
* The Zoom to Fit link has been replaced with a button that just fits the existing data onto the screen, and does not require a reload.
* This reimplementation has been done with an eye toward future (long-requested) functionality to generate .list file lines by selecting points and segments on the map and in the waypoint table.  That will be much more feasible with this simplified implementation.
Route selection using the big, ugly tables is unchanged so far, and still uses the /hb/index.php mechanisms for now, but links to routes will go right to the new showroute.php.  Better search functionality is a project for another day.

I am sure I have some bugs, as this is several hundred lines of new or significantly reorganized or relocated code.  Please report problems here or in GitHub Issues.

yakra:

--- Quote ---Shading to indicate which segments are traveled in the Waypoints table now starts and ends in the middle of the rows corresponding to the endpoints of the travel.
--- End quote ---
Nicely done. I like it.

Intersecting/Concurrent Routes:

When browsing a ConnectedRoute, clicking a link under Intersecting/Concurrent Routes links to the intersecting chopped, rather than connected, route.

Replacing the links in the popup with javascript:showRouteWithCurrentView('me.i095') is a step backwards IMO.
Those actual links to the HB were useful for copying link addresses to paste into the forum or GitHub or open in another browser window, and especially to right-click & open in a new tab, which I do frequently.
Was there something in particular that made the use of the javascript function desirable? In any case, we still need to query the DB and load all the new route's info...

Jim:

--- Quote from: yakra on June 20, 2020, 07:31:15 pm ---When browsing a ConnectedRoute, clicking a link under Intersecting/Concurrent Routes links to the intersecting chopped, rather than connected, route.

--- End quote ---

I can change it if that's the preferred functionality.


--- Quote ---Replacing the links in the popup with javascript:showRouteWithCurrentView('me.i095') is a step backwards IMO.
Those actual links to the HB were useful for copying link addresses to paste into the forum or GitHub or open in another browser window, and especially to right-click & open in a new tab, which I do frequently.
Was there something in particular that made the use of the javascript function desirable? In any case, we still need to query the DB and load all the new route's info...

--- End quote ---

Yes, I wanted to get the popups entirely created at startup time so I wouldn't need to store additional info to create them, but I don't know what the coordinates and zoom level will be when someone clicks, so instead I pass through to that JS function.

yakra:

--- Quote from: Jim on June 20, 2020, 07:47:53 pm ---I can change it if that's the preferred functionality.

--- End quote ---
Seems most intuitive to continue browsing in the same mode.
OTOH, switching back to &cr mode is just one click away.
What will most travelers find more intuitive & useful?


--- Quote from: Jim on June 20, 2020, 07:47:53 pm ---Yes, I wanted to get the popups entirely created at startup time so I wouldn't need to store additional info to create them, but I don't know what the coordinates and zoom level will be when someone clicks, so instead I pass through to that JS function.

--- End quote ---
It's been a while since first implemented and I'm a little rusty, but I believe the bones of each popup was created at startup. Clicking on a waypoint marker or on the table would trigger some javascript to rewrite the innerHTML of the popup in question.
https://github.com/TravelMapping/Web/commit/701837f08c3bf7a861acfc3d69cd24de3e3d9c8a
If all popups are stored at startup, I can't see what additional info needs to be stored.
I'd love to be able to continue to copy links from the popup & especially open links in a new tab.

Jim:

--- Quote from: yakra on June 20, 2020, 09:26:03 pm ---It's been a while since first implemented and I'm a little rusty, but I believe the bones of each popup was created at startup. Clicking on a waypoint marker or on the table would trigger some javascript to rewrite the innerHTML of the popup in question.
https://github.com/TravelMapping/Web/commit/701837f08c3bf7a861acfc3d69cd24de3e3d9c8a
If all popups are stored at startup, I can't see what additional info needs to be stored.
I'd love to be able to continue to copy links from the popup & especially open links in a new tab.

--- End quote ---

Yes, the main text was created at the start with an element whose contents would be replaced by the actual intersecting route links including the lat/lon/zoom.

I just changed the JS so it will open in a new window/tab.  Maybe that's a good middle ground?

Navigation

[0] Message Index

[#] Next page

Go to full version