Author Topic: Please test new mapview page  (Read 3007 times)

0 Members and 1 Guest are viewing this topic.

Offline Jim

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 2732
  • Last Login:Today at 02:09:10 pm
Please test new mapview page
« on: June 10, 2016, 09:09:25 pm »
I've made a lot of headway on the revamp of the mapview page.  I'm sure there are still problems, but I wanted to put it out there for testing as I turn my attention to a couple other things.  It's only on the tmtest site for now.  You could navigate your way there from your user stats page or jump right there with a URL like:

http://tmtest.teresco.org/user/mapview.php?rg=NY

Much of the work was behind the scenes on code reorganization and refactoring.  The highlights of the user-visible changes:

  • The map is given nearly the whole window, all except the small menu of links across the top.
  • The "Show/Hide Routes" button has been replaced with a drop-down that can also bring up a map options table.
  • The map options table allows you to select a different user, a different set of regions, and/or a different set of systems to view.  Region and system lists allow multiple selection.

Note: I have not yet worked through user/region.php or user/system.php, so if you follow a link on tmtest to those pages, there is a good chance something won't work.  They're next on the list.

Offline michih

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 4555
  • Last Login:Today at 04:44:01 pm
Re: Please test new mapview page
« Reply #1 on: June 11, 2016, 11:44:34 am »
Thanks, great feature! :)

Automatically created links contain [ and ], for instance: http://tmtest.teresco.org/user/mapview.php?u=michih&rg[]=DNK
If one selects two regions, the link looks like: http://tmtest.teresco.org/user/mapview.php?u=michih&rg[]=DEU&rg[]=DNK but should be comma separated only: http://tmtest.teresco.org/user/mapview.php?u=michih&rg=DEU,DNK

Selecting "Switzerland" region and "Austrian Schnellstraßen" system displays the Pacific Ocean with a link like: http://tmtest.teresco.org/user/mapview.php?u=michih&rg[]=CHE&sys[]=auts

I've replaced %5B%5D manually by [] which broke the links in this post.

The order of regions and systems displayed seems to be according the region / system short name which is odd, for instance:
Code: [Select]
Zhejiang
Hong Kong
Taiwan
Cyprus
Czechia
Germany
Denmark
Spain
Estonia
Aland Islands
Finland
France

In addition, I think the "Select Map Options" box should be larger because it's hard to navigate.

Maybe the "[none selected]" option should be a check box instead of first entry but I generally prefer parallel list boxes with available and selected regions/systems like:

Once the script crashed.

Offline si404

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 1948
  • Last Login:Today at 01:42:46 pm
Re: Please test new mapview page
« Reply #2 on: June 11, 2016, 03:18:18 pm »
The vertical scroll bar doesn't disappear when you select 'Map only', and that covers the zoom/pegman controls.

Offline sipes23

  • Newbie
  • *
  • Posts: 29
  • Last Login:August 19, 2019, 12:44:31 am
Re: Please test new mapview page
« Reply #3 on: June 11, 2016, 07:09:51 pm »
One change that would be useful is to have only the systems available for a certain region be available when looking at one region. For example, I was looking at Mississippi, but the system box had Wisconsin State Highways available as an option. When I clicked the update button, I got a blue ocean page.

This is otherwise a very cool feature.

Offline Jim

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 2732
  • Last Login:Today at 02:09:10 pm
Re: Please test new mapview page
« Reply #4 on: June 11, 2016, 08:55:21 pm »
Thanks for the suggestions so far.

A few quick responses:

  • The brackets in the URL are needed to support the way I am getting multiple selections from the lists.  Both the old comma-separated format and new format (and I think even combinations) should work, so I don't think there's any problem with the way it does this.
  • Yes, any combination of region(s) and system(s) that result in no routes will give the empty ocean map.  I should check for a case where 0 routes match and just print a message instead but I'm not sure how best to make that happen in a way that works well with all of the pages that share some of the map JS code just yet.
  • I agree that ordering of region names and systems is not great.  It's low priority for now to look at ways to improve that.  Same for only showing systems applicable to selected regions or vice versa.
  • No idea why that scroll bar stays put.  I also noticed the headings on the routes table sometimes don't size nicely or move appropriately for scrolling, but I also have no idea why they're doing that.
  • I'm not aware of an HTML element for the "parallel list boxes".  I know the GUI component you're talking about and it might be nice here, but I don't think there's a convenient way to implement it.  I'd be happy to be shown I'm wrong.