Author Topic: Overlay map color schemes  (Read 58746 times)

0 Members and 3 Guests are viewing this topic.

Offline Jim

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 2856
  • Last Login:Today at 08:50:39 am
Overlay map color schemes
« on: September 07, 2016, 10:31:07 pm »
There's some discussion in a different thread (http://tm.teresco.org/forum/index.php?topic=131.msg2294;topicseen#msg2294) about adding a new color entry for some of the newer "Tier 4" European systems.

I think this warrants a larger discussion of how the colors are determined for a given highway system, and what those colors should be.  As it stands, we have the color names like "blue", "red", "green", etc. in the systems.csv file.  Those names are only used to look up actual color codes in the mapping code, where a static array maps color names to the RGB codes to use for clinched and unclinched segments of routes in that system.  I don't remember when or how the color names got into systems.csv, but I don't think it makes a whole lot of sense to have the colors specified by name there.

Instead, would the ideas below make more sense?

1) Eliminate the color names altogether from the CSVs and base the colors strictly on the tier.

2) Come up with other names to include in the systems.csv like "primarynational", "secondarynational", "primarystate", "tourist", etc. that would instead be used to select colors.  This would allow things like the use of an alternate color for the European systems that sparked the discussion.  There would be nothing stopping us from assigning the same color to multiple categories like "secondarynational" and "secondarycontinental" might both correspond to the current "red".


Offline mapcat

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 1770
  • Last Login:Yesterday at 08:05:40 pm
Re: Overlay map color schemes
« Reply #1 on: September 08, 2016, 12:19:48 pm »
I agree with you that the current setup doesn't really work particularly well. IMO your first option doesn't quite solve the problem, since there seems to be a need for more colors than we have tiers in use, so unless you increase the number of tiers, I would prefer your second option or something closer to it.



Clinched:

Offline michih

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 4863
  • Last Login:Today at 12:15:33 pm
Re: Overlay map color schemes
« Reply #2 on: September 08, 2016, 02:08:08 pm »
We should consider that there might be a future "user defined color", see #10 or #21. For that reason, it makes sense to eliminate colors from systems.csv.

I would be fine with a strictly tier based color code but there might be some discussion... For instance, blue-teal-green-lightsalmon-brown would be my preferred European color code.

Tier 1 systems are currently blue but tier 2 is teal in Europe, red in Canada and green or red in USA (usaib/usaus). Tier 3 is teal, red, green or magenta.

I think alias names should remain in systems.csv but "primarynational" would be tier 1, "secondarynational" tier 2, "primarycontinental" tier 3.... and we would still have the same problem like strictly tier based. If we already had the user-specific colors, everyone could set his preferred colors once but we don't have it right now.

I don't like primarynationaleurope and primarynationalnorthamerica, primarynationalasia et cetera...

Maybe we should keep it as it is for the time being and only add lightsalmon...

Offline Jim

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 2856
  • Last Login:Today at 08:50:39 am
Re: Overlay map color schemes
« Reply #3 on: September 08, 2016, 02:44:54 pm »
No harm in adding the "lightsalmon" color for now while we discuss, so that's done and live on the site.  It's now available for systems.csv entries to use.

Offline bhemphill

  • Jr. Member
  • **
  • Posts: 89
  • Last Login:September 14, 2024, 11:07:54 am
Re: Overlay map color schemes
« Reply #4 on: September 21, 2016, 03:18:59 am »
I thought that the tiers were mostly for which roads are more important and therefore displayed as the layer on top when more important in a multiplex or road crossing.  Tying the colors to a layer could mean arguments about which tier some road set belongs to or adding more tiers to get the colors.  Having more of guidelines as to which colors indicate what is better, since the colors do kind of try to go with the road signs and finding a world where US Business Interstates are the same as a European E Road is just a little awkward.  I think the lightsalmon is close enough to the red of the US Numbered Highways and the magenta US Auxiliary Numbered Highways that we have gotten used to that it works.  US, Canada, Mexico, Europe, and Asia may match up fairly closely in what road systems are equivalent, but not quite exact for what is equal beyond tier 1.

Offline vdeane

  • Sr. Member
  • ****
  • Posts: 425
  • Gender: Female
  • Last Login:Yesterday at 09:59:24 pm
    • New York State Roads
Re: Overlay map color schemes
« Reply #5 on: October 11, 2016, 01:43:32 pm »
Perhaps something in between the idea of having classifications of "primarynational" (which are similar to tiers) and the current system would be to have a section of instead having those be groupings of systems that are similar to each other and have a defined color (for example, we could have "usastate" which would have a default color of brown); that would allow colors to be assigned for types of route (instead of by system) but doesn't run into the issues of how to deal with routes at the same tier that should have different colors (such as business interstates) or issues between different route classification schemes between the US and Europe.
Please note: All comments here represent my own personal opinion and do not reflect the official position of NYSDOT or its affiliates.

Offline michih

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 4863
  • Last Login:Today at 12:15:33 pm
Re: Overlay map color schemes
« Reply #6 on: October 11, 2016, 03:01:13 pm »
groupings of systems that are similar to each other (for example, we could have "usastate" which would have a default color of brown)

It's similar to before mentioned primarynationaleurope and primarynationalnorthamerica, primarynationalasia et cetera...

Offline vdeane

  • Sr. Member
  • ****
  • Posts: 425
  • Gender: Female
  • Last Login:Yesterday at 09:59:24 pm
    • New York State Roads
Re: Overlay map color schemes
« Reply #7 on: October 11, 2016, 06:05:51 pm »
I don't recall "primarynationaleurope" and "primarynationalnorthamerica", just "primarynational" (except in your post, where you mention not liking them without context).  In any case, I'm not sure what else would work better than what we have now.  At the very least, it would make it easier for users who like to define their own colors.
Please note: All comments here represent my own personal opinion and do not reflect the official position of NYSDOT or its affiliates.

Offline michih

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 4863
  • Last Login:Today at 12:15:33 pm
Re: Overlay map color schemes
« Reply #8 on: October 12, 2016, 11:19:05 am »
I don't recall "primarynationaleurope" and "primarynationalnorthamerica", just "primarynational" (except in your post, where you mention not liking them without context).

primarynational is like using tiers. But prefered colors are minimum different for North America and Europe. For that reason, I wrote that we would need primarynationaleurope et cetera.

In any case, I'm not sure what else would work better than what we have now.  At the very least, it would make it easier for users who like to define their own colors.

Once user would have a possibility to define own colors, I'd prefer defining it tier-related because the user can change it as desired!

Offline mapcat

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 1770
  • Last Login:Yesterday at 08:05:40 pm
Re: Overlay map color schemes
« Reply #9 on: October 12, 2016, 03:27:17 pm »
Once user would have a possibility to define own colors, I'd prefer defining it tier-related because the user can change it as desired!

I'd prefer something other than tier-related, since there are too many tier-4 systems in the US (usanp, usaush, and the various state systems) and users should be able to differentiate between them. If it were up to me, usanp & usaush should be brown (same color as their signs) and the state systems a different color (black or grey, possibly).
Clinched:

Offline Jim

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 2856
  • Last Login:Today at 08:50:39 am
Re: Overlay map color schemes
« Reply #10 on: October 12, 2016, 09:14:45 pm »
I'd like to have a relatively simple scheme for specifying default colors, but a lot of flexibility for users.  How about if users could specify colors by tier, but then override for specific systems?

Offline vdeane

  • Sr. Member
  • ****
  • Posts: 425
  • Gender: Female
  • Last Login:Yesterday at 09:59:24 pm
    • New York State Roads
Re: Overlay map color schemes
« Reply #11 on: October 12, 2016, 10:33:10 pm »
Once user would have a possibility to define own colors, I'd prefer defining it tier-related because the user can change it as desired!

I'd prefer something other than tier-related, since there are too many tier-4 systems in the US (usanp, usaush, and the various state systems) and users should be able to differentiate between them. If it were up to me, usanp & usaush should be brown (same color as their signs) and the state systems a different color (black or grey, possibly).
Personally, I'd rather not change the existing default color... what about that gold color that CHM used for the future interstates?
Please note: All comments here represent my own personal opinion and do not reflect the official position of NYSDOT or its affiliates.

Offline mapcat

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 1770
  • Last Login:Yesterday at 08:05:40 pm
Re: Overlay map color schemes
« Reply #12 on: October 13, 2016, 11:41:58 am »

I'd like to have a relatively simple scheme for specifying default colors, but a lot of flexibility for users.  How about if users could specify colors by tier, but then override for specific systems?
Works for me.

Personally, I'd rather not change the existing default color... what about that gold color that CHM used for the future interstates?
Ideally you could choose whatever colors you wanted...I was just pointing out how and why I would make an adjustment to how the maps would appear on my devices if given the ability to do so.
Clinched:

Offline michih

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 4863
  • Last Login:Today at 12:15:33 pm
Re: Overlay map color schemes
« Reply #13 on: January 03, 2021, 02:01:19 am »
Anyone remember the syntax for custom colors?

Search for "colors" to find examples. It was tier based, e.g.:

&colors=tier4:rgb(255,255,255):rgb(0,0,0)

I had a try and it doesn't work anymore :(

We have eight TM colors right now (blue, brown, red, yellow, teal, green, magenta and lightsalmon). The color codes can be found here: https://github.com/TravelMapping/Web/blob/master/lib/tmjsfuncs.js#L116

Offline Jim

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 2856
  • Last Login:Today at 08:50:39 am
Re: Overlay map color schemes
« Reply #14 on: January 03, 2021, 11:41:47 am »
The custom color syntax didn't get brought over with the new code for showroute and mapview.  I can add it back.

https://github.com/TravelMapping/Web/issues/577