This is an example of zoom dependent Carto.
For this demo, we will style 2 tiles from the same dataset:
- Zoom level 6: https://vizzuality.cartodb.com/tiles/sql_statement/6/31/21.png
- Zoom level 8: https://vizzuality.cartodb.com/tiles/sql_statement/8/125/83.png
Our style will make the polygons default to blue, but at zoom level 8 the polygons will be yellow:
Our Carto stylesheet for this is:
#sql_statement{polygon-fill:#1F78B4;}
#sql_statement[zoom=8]{polygon-fill:#FEC44F;}
URL Encoded, this becomes:
%23sql_statement%7Bpolygon-fill%3A%231F78B4%3B%7D%23sql_statement%5Bzoom%3D8%5D%7Bpolygon-fill%3A%23FEC44F%3B%7D%0A
We append this to the tile urls to get: