Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unify track style for various tracktypes #136

Closed
zdila opened this issue Aug 27, 2013 · 5 comments

Comments

Projects
None yet
5 participants
@zdila
Copy link

commented Aug 27, 2013

Current style for tracktype makes it difficult to determine grade visually. I've tuned the style for #tracks-notunnel-nobridge to feel the difference. Improvemets:

  • all tracktypes differs only by b/line-dasharray and line-width, but later is only to make outline look equally for all traktypes
  • grade1 has more clear outline so it is better visible in the forests
  • higher the grade is, the line has shorter dashes and longer spaces. It is evenly visually distributed from grade2 to grade5.
  • track without tracktype is the only composed of two different-long dashed what should represent "unknown grade - maybe lower, maybe higher"
  • if track of tracktype > grade1 is joining track of tracktype=grade1 it is not interrupted by outline of the first track (using comp-op magic)

Please check it and tell mie if you like it or if you have even better idea for improvements. But IMHO current tracktype visual representation is confusing and should be improved.

If accepted, the style should be distributed to all other related layers.

#tracks-notunnel-nobridge {
  comp-op: src-over; // to force flattering first
  [zoom >= 14] {
    line-width: 3;
    line-color: white;
    line-opacity: 0.4;
    line-join: round;
    line-cap: round;
    line-comp-op: dst-over; // to not to draw over "b/" lines of other tracks
    b/line-width: 1.5;
    b/line-color: #996600;
    b/line-dasharray: 5,4,2,4;
    b/line-cap: round;
    b/line-join: round;
    b/line-opacity: 0.8;
    [tracktype = 'grade1'] {
      b/line-dasharray: 100,0; /* i.e. none, see https://github.com/mapbox/carto/issues/214 */
    line-width: 4;
    }
    [tracktype = 'grade2'] {
      line-width: 3.5;
      b/line-dasharray: 5,3;
    }
    [tracktype = 'grade3'] {
      b/line-dasharray: 4,4;
    }
    [tracktype = 'grade4'] {
      b/line-dasharray: 3,5;
    }
    [tracktype = 'grade5'] {
      b/line-dasharray: 2,6;
    }
  }
}
@tyrasd

This comment has been minimized.

Copy link
Contributor

commented Aug 27, 2013

This sounds really promising. Do you have a quick example showcasing your proposal – maybe a comparison to the current tracktype rendering?

@zdila

This comment has been minimized.

Copy link
Author

commented Aug 28, 2013

Attaching the showcase:
Current: tracks-sample-current

Proposed: tracks-sample

@gravitystorm

This comment has been minimized.

Copy link
Owner

commented Aug 28, 2013

refs #14

@gravitystorm

This comment has been minimized.

Copy link
Owner

commented Sep 27, 2013

My apologies for not responding to this properly!

I created a side-by-side comparison for my SotM talk on openstreetmap-carto:

tracks-montage

I think the general approach is the correct one, but I think you can make more of a distinction between the grades e.g. grade 2 and 3 are very similar.

There has been some refactoring to the track rendering since you first worked on this, but I'd be happy to review a pull request based on v2.5.0 or later.

pnorman added a commit to pnorman/openstreetmap-carto that referenced this issue Sep 30, 2013

pnorman added a commit to pnorman/openstreetmap-carto that referenced this issue Sep 30, 2013

Tweak track styling and extend to bridges/tunnels
Fixes gravitystorm#14
Fixes gravitystorm#136

The previous tracktypes were very inconsistent with tracks appearing at
different zoom levels depending on if they were bridge or not.

This gives a consistent styling, based on gravitystorm#136.

On zooms 13-14 tracks are slightly smaller, instead of zoom 13 only
@matthijsmelissen

This comment has been minimized.

@pnorman pnorman self-assigned this Mar 29, 2014

pnorman added a commit to pnorman/openstreetmap-carto that referenced this issue Mar 29, 2014

matthijsmelissen added a commit to matthijsmelissen/openstreetmap-carto that referenced this issue May 3, 2014

matthijsmelissen added a commit to matthijsmelissen/openstreetmap-carto that referenced this issue May 22, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.