Tuesday, 1 October 2019

tilemill - CartoCSS layer visibility


I am working in TileMill and I have a number of layers in two different levels of detail. I have assigned classes to the layers "highdetail" and "lowdetail", and I know how to use the zoom selector - now how can I hide all the low detail layers when zoomed in past e.g. zoom level 6? The layers are a mix of polygon/raster/line.



Answer



You can use opacity instead of display:none;


#idToHide[zoom=6] {

polygon-opacity: 0;
raster-opacity: 0;
line-opacity: 0;

text-opacity: 0;

}

source: https://www.mapbox.com/carto/api/2.3.0


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...