CartoCSS is a CSS-like language used in TileMill and Mapbox Studio Classic to style features.

learn more… | top users | synonyms

1
vote
1answer
16 views

Switching from “layer selector” to buttons to toggle between layers in CartoDB

As of now, we have a map that you can toggle between layers using the "layer selector". We want to instead have buttons on the map that, by clicking on one, you can switch between layers. In our's, ...
1
vote
2answers
24 views

Change Carto basemap font size?

I'm using the CartoDB static Maps API. I need to change the font size of the street names. E.g. in the image below the street name "Stanhope Road" needs to be bigger. Here's what my Json config ...
1
vote
1answer
416 views

How do I make my Cartodb info windows wider?

According to my read of andrewxhill (more readable version) I should be able to change the info window size by adding CSS, like so: <div class="cartodb-popup header with-image" data-cover="true"&...
0
votes
2answers
136 views

How to chose which line goes on top of the other line

I am trying to do something very simple, but apparently impossible. Overlay two lines with different size and color signing same route different direction. Like this one: http://www.indianatrails.org/...
1
vote
1answer
13 views

How to modify mapnik's buffer-size by kosmtik's localconfig.json/.js?

I want to override mapnik's buffer-size in kosmtik. How to override it in localconfig.json/.js?
0
votes
1answer
260 views

How to I cluster by features in CartoDB?

I have a set of points for a number of buildings in NYC. I would like to group those points into clusters per their respective neighborhood (ex: Chelsea, Upper East Side etc.). Each of my points have ...
0
votes
1answer
15 views

Retaining custom CSS parts when editing using CartoDB GUI?

I have set a bunch of zoom-level settings in a cartdb map layer, i change opacity, line thickness, etc. however, when i go into the web GUI and do something simple like change the colour of a line, ...
1
vote
2answers
89 views

Creating weighted lines on map in CartoDB

I am trying to illustrate global trade flows within CartoDb. Flows are visualized by a line connecting two lat/long points on a map. The size of the flow would be represented by the width of the line. ...
2
votes
1answer
87 views

Sunlight layer into CartoDB

I have a list of tweets on a torque map made with CartoDB. I want to add an additional layer that shows the sunlight around the world at certain times, similar to the Twitter #sunrise map found here. ...
2
votes
1answer
23 views

What is the :: notation in CartoCSS?

I've been designing some tilesets in Mapbox Studio Classic and I keep seeing the :: notation in styles that Mapbox has created. What does that mean? Are there only specific values that can be put ...
1
vote
0answers
45 views

Creating Legends in CartoDB?

I'm trying to add a legend to a simple choropleth map using the ui for custom legends. But I'm not sure where to put it in my code, if it should be within the createLayer function, or outside of it, ...
0
votes
1answer
21 views

Create Choropleth Style Map in CartoDB programmatically

I am trying to create a choropleth map for a school project I am working on. Based off user input, I will create a csv file that I will then upload to CartoDB using their Import API. By setting the ...
0
votes
1answer
43 views

Transform scale of polygon pattern fills with Carto/Mapnik

In CartoCSS you can specify an SVG pattern fill for a polygon as so: #layer { polygon-pattern-file: url(images/fill.svg); } However, the size of the fill is too big at small scales and too ...
0
votes
1answer
26 views

CartoDB - random points being added to map

I'm working on a tool that allows users to draw geometries on a Leaflet map, which are then sent to CartoDB. However, I've noticed an odd behavior... after a polygon has been added, a varying number ...
0
votes
0answers
7 views

How might I change the symbology of a certain points in a layer based on an SQL statement?

I have been playing with toggling layers in CartoDB--pressing buttons and changing the subset of the data being displayed. Now I want to do something a little different. Rather than change the entire ...
1
vote
1answer
44 views

How to turn off caching of fill patterns in TileMill?

I'm using CartoCSS in TileMill and png files on disk for filling polygon symbols with patterns. polygon-pattern-file: url('sprites/yard.png'); The display is ok the first time, but when I change the ...
2
votes
2answers
196 views

How to generate 512x512 map tiles (2x resolution for retina displays)

I'm looking for a method to produce 512x512 pixels map tiles using CartoCSS and Mapnik, for example exactly as CardoDB does for its base maps (here below a 256x256 map tile vs its correspondent ...
0
votes
1answer
30 views

Can I have two variables in CartoCSS?

Within CartoDB my CartoCSS looks something like #table_copy_1 [ lease_rate <= 55.15] { marker-width: 35.0; marker-fill: #081B47 } Can I add another variable (size) so that the display ...
0
votes
2answers
443 views

Error while building OSMBright

Error while building OSMBright when i run the make.py the following error is coming Traceback (most recent call last): File "./make.py", line 123, in <module> build() File "./make.py",...
0
votes
0answers
18 views

CartoCSS: labels below road when road east-west

In styling major road text labels along paths, I am attempting to force the labels beneath the road path, especially for roads with east-west direction (i.e., horizontal). My application of text-dy ...
0
votes
1answer
43 views

Creating a runtime visualization with CartoDb

I am trying to create a runtime visualization for a CartoDB map and I am quite the trouble with doing it. I have gone over the documentation and cannot get the code to work correctly at all unless it ...
0
votes
1answer
33 views

Creating conditional style using CartoCSS on a CartoDB view

I’m generating a view using the query like this in CartoDB SELECT table1.cartodb_id, table2.data_count, table2.event, table1.the_geom_webmercator FROM table1 JOIN table2 ON table1....
2
votes
1answer
81 views

What do cartocss attachments along filters mean?

I'm exploring openstreetmap-carto style and I wonder what does such syntax mean: [natural = 'water']::natural, [landuse = 'reservoir']::landuse, [waterway = 'riverbank']::waterway Is this ...
2
votes
1answer
40 views

Why are point-files cut at tiles-borders?

I'm placing a SVG in Tilemill via a point with lat and long. So far that works great but when the tile the point is located in ends, the image is not rendered. Is this a bug? Can I do something ...
0
votes
1answer
26 views

Show one label per shape in CartoCSS

I'm working in Mapbox Studio (Classic) and want to prevent labels from rendering more than once. I'm using text-repeat-distance to prevent labels from showing more than once: #Admin_level3_Boundary {...
1
vote
1answer
38 views

What's the meaning of marker-fill-opacity: 0.1*[value]?

I'm using heatmaps in CartoDB and I would like to modify CartoCSS to reflect the value of a column. I have noticed this line in CartoCSS: marker-fill-opacity: 0.1*[value]; I don't understand ...
1
vote
1answer
49 views

Can you use variables in URI field in cartodb CSS?

I am wanting to use a different marker-file based on a value returned via SQL in cartodb. I am wanting todo something like marker-file: url('[icon]'); Where the value in [icon] is a full URL to a ...
0
votes
1answer
241 views

Placing label on map once in TileMill?

I am trying to create a basemap in tilemill. Very new to this software. When I add the label styling for the roads, it adds the name several times. Is there a way to have it only place the label on ...
3
votes
1answer
353 views

How to render tm2 projects

What are the options for rendering tm2 projects? As far as I know the open source Mapbox tm2 projects have proprietary data sources (like OSM Bright 2), thus they are of little use, but some other ...
0
votes
0answers
13 views

CartoCSS: alpha blending with comp-op

Using CartoCSS/Tilemill, I have one layer for the land polygons and one for urban areas, as follows: #zoomed-polygons[zoom>7] { polygon-fill: white; } #urban[zoom>=4] { polygon-fill: #...
0
votes
1answer
56 views

Adding a border on hover to a CartoDB map

I have created a map of pedestrian collisions in Toronto in CartoDB. I would like the border of each neighbourhood to be outlined in a dark colour on hover. Is it possible to modify the CSS to achieve ...
0
votes
0answers
44 views

Cartodb: Linking social data to road color scheme

I am recreating this "smelly maps" project on cartodb. I'd like to create symbology on roads (IE: color roads red,blue,green,yellow) based on the information I am receiving on social media. View ...
2
votes
1answer
35 views

TileMill : set minzoom to layers?

i found in this post: CartoCSS layer visibility a solution to set a layer not visible for some zoom levels. But in https://github.com/gravitystorm/openstreetmap-carto it seems that a minzoom ...
1
vote
1answer
43 views

CartoDB – How can I place labels from one layer on top of an overlapping layer?

I have two overlapping polygon layers and I'd like to display the labels from the bottom layer on top of both layers so they're easily visible. Is there a way to do this with CartoCSS? Some sort of z-...
0
votes
1answer
56 views

Tilemill/openstreetmap-carto, how to remove unwanted road lines

I am using Tilemill and the openstreetmap-carto style. The latest versions of each. I was curious to why these Center-lines are showing up in my highways and roads, and I am unable to get rid of them. ...
0
votes
1answer
66 views

CSS Styling Torque in CartoDB

I am trying to make a map that would show the total load of a bus. I have plotted the route and set up the time constraints. The ellipse is moving and seems to work fine, but when I try to style the ...
1
vote
2answers
293 views

Bring marker on same layer to front in CartoDB

I'm using a category map showing markers based on the value of one column. They can be one of two values. One is for customer location and the other for store location. I'd like to have it so that ...
0
votes
0answers
21 views

Thousands separator for numeric value labels with CartoCSS

Is there any way to style labels with a thousands separator in CartoCSS without re-creating the column as a string?
15
votes
0answers
821 views

Converting from SLD to Carto CSS? [closed]

I have a bunch of layers and corresponding SLD's running a WMS service. I was exploring the possibility of shifting to a TileMill's tile based TMS service. For this, I would like if it were possible ...
0
votes
0answers
67 views

Cartodb map style changes when clearing view

I'm losing the custom settings of my map when I perform simple filtering analysis and "Create Dataset from Query". Here's what I'm doing: I've created a map where I've specified my color scheme, ...
2
votes
2answers
329 views

How to style ways with CartoCSS depending on a relation property (OSM)

I'm using CartoCSS together with an OSM Postgres DB (hstore on). I want to set the line color depending on the operator tag of relations (routes). How can I do that? Update Thanks to Paul Norman for ...
-1
votes
1answer
68 views

Marker line in CartoCSS

I'm trying to symbolize a line layer in CartoDB using CartoCSS. I need my line to be a series of diagonal lines, something like this -> ///////////// In QGIS I would do this as a marker line with a ...
1
vote
3answers
133 views

Is there a way to add a 'home extent' to a cartodb map?

Within the zoom bar, is there a way to include a home extent button that the user could click to zoom to the same extent as the initial extent of the map?
1
vote
1answer
148 views

Flow direction CartoCSS

I'm working on a TileMill project essentially displaying freight routes. The original shapefile contains a origin city and a destination city (and a path between both cities). When I apply a marker-...
2
votes
2answers
105 views

Mapbox Natural earth map disappears on zooms 0 & 1

As the title says, I'm currently using mapbox to create a little atlas app the issue is whenever I zoom out to anything lower than zoom level 2, the map dissappears with the map background being the ...
0
votes
0answers
10 views

Raster layer underneath others

I have a TileMill project going. It's my first one ever. I have a raster layer in my map which I got from here. Unfortunately, it covers/hides all my labels. Is it possible to order layers? So that ...
0
votes
0answers
37 views

Mapbox Cartocss: Associating field values to building-fill fails to apply

I have uploaded a shapefile with buildings with a field names [height] and [color], values stored are for height 1 to 4 and for color 1 to 10. I want to color based on that colors, code starts ...
1
vote
1answer
307 views

osm2pgsql vs imposm rendering performance

Is there any difference in rendering performance between using a osm2pgsql vs imposm imported PostGIS DB in Mapnik? Or asking it differently, is there any downside of using imposm if I only want to ...
0
votes
0answers
37 views

Tilemill styling with openstreetmap data - labeling boundaries

I have UK county boundaries (boundary=ceremonial) and want to give them labels that periodically run along the boundaries on the inside of the county. Just like polygon shapes do - eg, you can give a ...
0
votes
0answers
16 views

How to allow-text-overlap for one layer in Tilemill

I have a map that displays Countour-Lines including height labels. Those labels should be treaded as "background". So f.e. a village label should appear on top of on of those labels. If I set the flag ...