Skip to content

Instantly share code, notes, and snippets.

@ramiroaznar
Last active November 12, 2016 20:15
Show Gist options
  • Save ramiroaznar/fac10cb11c3edc08f1fb9c6fc01931a5 to your computer and use it in GitHub Desktop.
Save ramiroaznar/fac10cb11c3edc08f1fb9c6fc01931a5 to your computer and use it in GitHub Desktop.
How to style Madrid metro lines using Turbo Carto
/* Style lines */
@l1: #01bff5;
@l10: #014ea5;
@l11: #01836b;
@l12: #849a01;
@l2: #fe1225;
@l3: #fed201;
@l4: #a75608;
@l5: #34c83a;
@l6: #949492;
@l7: #fe862d;
@l8: #fe82b0;
@l9: #b91a8d;
@ml1: #014ea5;
@ml2: #b91a8d;
@ml3: #fe1225;
@lr: #000000;
#layer {
line-width: 1;
line-color: ramp([name], (#01bff5, #014ea5, #01836b, #849a01, #fe1225, #fed201, #a75608, #34c83a, #949492, #fe862d, #fe82b0, #b91a8d, #014ea5, #b91a8d, #fe1225, #000000), category(16));
}
#layer [name = 'ML1']{
line-dasharray: 10, 4;
}
#layer [name = 'ML2']{
line-dasharray: 10, 4;
}
#layer [name = 'ML3']{
line-dasharray: 10, 4;
}
/* Style dots */
#layer {
marker-width: 5;
marker-fill: #5b3f95;
marker-fill-opacity: 0;
marker-allow-overlap: true;
marker-line-width: 1;
marker-line-color: #000000;
marker-line-opacity: 1;
}
@ramiroaznar
Copy link
Author

metromadrid

@ramiroaznar
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment