Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Advanced CartoCSS Techniques

Advanced CartoCSS Techniques

CartoCSS is becoming an ever more popular – and ever more powerful – tool for cartographic and data styling. In this talk, Stamen designers and technologists will present some tips and tricks to make your next design sing. Tips and tricks covered include, but will not be limited to: pixelation, use of dingbat fonts for texture and markers, post-facto label adjustment, alternate uses for text symbolization, where to find and use entropy, blending, and geometry manipulation.

Seth Fitzsimmons

April 13, 2014
Tweet

More Decks by Seth Fitzsimmons

Other Decks in Design

Transcript

  1. Entropy and Labeling #place_label { text-orientation: [osm_id] % 3 -

    1.5; ! [osm_id<0] { text-orientation: ([osm_id] * -1) % 3 - 1.5; } }
  2. #water { ::shadow { polygon-fill: lighten(#444, 1%); } ! ::fill

    { polygon-fill: #fff; comp-op: soft-light; image-filters: agg-stack-blur(10,10); } ! ::background { polygon-pattern-file: url("images/bg.png"); comp-op: hard-light; } } Drop Shadows
  3. shield-unlock-image: true; shield-fill: #333; shield-text-dx: 0.1; shield-wrap-width: 48; shield-face-name: "Frutiger

    LT 45 Light Bold"; shield-file: url("images/ cafe_36x18px_buffer.svg"); ! shield-dx: -9; shield-size: 12; shield-text-dy: -14; ! marker-file: url("images/ cafe_36x18px_buffer.svg"); marker-transform: "translate(-9)”; ! Shields and Markers
  4. [type='Overlook'] { [orientation=15] { marker-file: url("images/ overlook2_36x18px_invert_buffer_15.svg"); } [orientation=45] {

    marker-file: url("images/ overlook2_36x18px_invert_buffer_45.svg"); } ... ! Marker Transformations
  5. display: none; // text text-name: ‘'; // will still populate

    the collision cache text-fill: transparent; ! // lines line-width: 0; ! // polygons polygon-opacity: 0; ! // markers marker-width: 0; !