Skip to content

Instantly share code, notes, and snippets.

@ramiroaznar
Created February 17, 2017 14:55
Show Gist options
  • Save ramiroaznar/accabf8657c8d00a0cea113c443d4d6b to your computer and use it in GitHub Desktop.
Save ramiroaznar/accabf8657c8d00a0cea113c443d4d6b to your computer and use it in GitHub Desktop.
Stacking chips + zoom based styling
Map{
buffer-size:2048px;
}
@w: 8;
@h: 8;
#layer {
marker-fill: ramp([abv], (#f7f7f7, #cccccc, #969696, #636363, #252525), quantiles);
marker-fill-opacity: 0.9;
marker-line-color: #424141;
marker-line-width: 0.6;
marker-line-opacity: 1;
marker-placement: point;
marker-type: ellipse;
marker-width: @w;
marker-height: @h;
marker-allow-overlap: true;
marker-transform: translate(0, -2*([p]-1));
[zoom > 3] {
marker-width: @w+5;
marker-height: @h+5;
}
[zoom > 5] {
marker-width: @w+10;
marker-height: @h+10;
}
[zoom > 7] {
marker-width: @w+15;
marker-height: @h+15;
}
[zoom > 9] {
marker-width: @w+20;
marker-height: @h+20;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment