CartoCSS is a CSS-like language used in TileMill to style features.

learn more… | top users | synonyms

1
vote
1answer
30 views

CartoDB toggle buttons not working with my data?

We are taking CartoDB data for this Canadian election map -- http://cdb.io/1TabLyz -- to create a version that adds toggle buttons to filter by political party. However, the buttons only work ...
2
votes
1answer
524 views

Including chart based on fields in CartoDB infowindow?

I would like to make graphs, pie charts, etc based on fields in my table within my infowindows. Is there a way to accomplish this?
0
votes
1answer
21 views

How to alter labels in Mapbox Streets in Mapbox Studio

I am creating vector tiles in Mapbox Studio v5 based off of the MapBox Streets layer. I want to alter the labels that appear over buildings, parks, schools, churches etc. but I cannot find the code ...
-1
votes
1answer
24 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 ...
0
votes
1answer
315 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" ...
1
vote
1answer
95 views

CartoCSS: labels along inside of polygon boundary

I'm using CartoCSS to render maps that include large polygons (like national parks). At higher zoom levels I want labels along the inside of the polygon boundaries, like in OpenStreetMap: I ...
7
votes
1answer
115 views

What is the future of CartoCSS (i.e. does it have one)? [closed]

MapBox recently announced that they would be moving away from CartoCSS towards a completely visual interface. Apparently the new style sheets that underlay that UI will be JSON based, so despite the ...
1
vote
1answer
29 views

CartoCSS: building polygon by tag

I'm using MapBox Studio to create a personalized map for slums. In OSM we have many polygons representing buildings and I need to style them according to their "building" tag. For example, the ...
1
vote
2answers
214 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
vote
0answers
13 views

Tilemill: Render a raster only where a shape layer is underneath

I'd like to mask a raster to only those areas, where there is a shape layer underneath. To be more precise: I have a land layer and a hillshading on top and I only want my hillshading to appear on top ...
0
votes
1answer
29 views

CartoDB Torque: show severity by size of marker?

I have a dataset containing the cost of damage caused by individual floods over the past 100 years. I'd like to use TORQUE to display these events on a map over time, with their severity shown by the ...
1
vote
1answer
173 views

label placment in multipolygon with cartocss (Denmark, Greenland)

I am rendering an interactive world map with Tilemill and I have the problem that the country name for Denmark is placed onto Greenland. This is because Denmark is represented as a multipolygon with ...
0
votes
0answers
26 views

CartoCSS: raster custom transparency color value?

In QGIS (and probably other GIS tools) you can style a raster layer such that certain pixel color value(s) will be rendered as transparent. In QGIS 2.6, this can be set in Layer Properties -> ...
1
vote
1answer
39 views

What OSM information to use for low zoom levels to get a style similar to MapQuest

I am building an outdoor map of Europe. Everything looks pretty nice when zoomed in. But when I am zoomed out, my map looks pretty boring. Most parts are white. In low zoom levels I display polygons ...
1
vote
1answer
88 views

External font in CartoCSS

I want to use a non CartoDB-installed typeface (one from typography.com) for the place labels (closer than 14z) on the map at http://outgoingnyc.com. So far if I try to do it in the css, it fails ...
0
votes
1answer
32 views

Distance between waterway labels in CartoCSS

How can I manage distance between waterway labels (names of rivers) in cartoCSS?
1
vote
1answer
88 views

Custom icons for Torque Categories in CartoDB

We’re developing a project with CartoDB and we want to show the elements clustering by zone and showing the most used one (Mode). We're doing this with Torque Categories, and it works! :) The ...
0
votes
1answer
88 views

Rule -torque-frame-count not allowed for Map

I'm simply trying to recreate a map I've already made successfully but with an updated table. I added the table to CartoDB, selected "Map View," and then selected "Torque Cat." Aside from doing those ...
5
votes
2answers
158 views

How to use external CartoCSS/mss within JavaScript?

I am using CartoCSS to style features in a run-time CartoDB layer (as opposed to a pre-made visualization) but it gets messy doing this within JavaScript: sublayers: [{ cartocss: '#initvisitedfws ...
1
vote
1answer
695 views

How to use OSM Bright with Mapnik Renderd

I have set up an OSM tile server using instructions at this blog - http://seshagiriprabhu.wordpress.com/2013/07/21/building-an-openstreetmap-tile-server-on-ubuntu-12-04-lts/ The slippymap renders ...
27
votes
3answers
9k views

Is there a Carto CSS Gallery which also contains code?

I am currently exploring the usage of CartoCSS and TileMill in one of our projects. I have seen the impressive gallery available at http://www.mapbox.com/tilemill/gallery/ The gallery looks ...
1
vote
1answer
43 views

Torque map: dates by year; year in slider text

I would like to put the year in the slider text and for the data to be scrolled through via year. Apparently it was working until three weeks ago, and now doesn't. In particular the slider now ...
0
votes
0answers
113 views

Large road labels and roads on high zoom level

I am making small maps to print on small paper cards with the street people live in and the surroundings. The paper card has the dimensions of a printed photo, around 10x15cm. First, I made a ...
0
votes
2answers
172 views

How do I mask a raster in TileMill?

I've tried just about every single TileMill compositing operation on the vector and raster layers in question, and I have to admit that I can't figure it out: How the heck can I mask a raster with a ...
2
votes
1answer
119 views

Trying to Offset Overlapping Transit Lines/Routes - Is There a Way?

I am trying to create a bus route map in Los Angeles. I realize that it is shooting for the moon (perhaps it is impossible to do well) since there are so many overlapping routes, but I think I've gone ...
0
votes
1answer
102 views

CartoDB: How to I cluster by features? Is it even possible?

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
32 views

How to restrict the number of symbols in feature name in CartoCSS?

I make a tourist map with CartoCSS in TileMill. There are several zooms and I would like to show markers of the objects on 15 zoom and their labels (names) on 16 or 17 zoom. If the number of symbols ...
0
votes
0answers
39 views

Is it possible to include '#' in CartoCSS string values (in CartoDB)?

I have a few tables in CartoDB that come from an external source. There is a name column that contains a few values with # in them. I would like to style particular features in the table, so I use ...
0
votes
1answer
52 views

CartoCSS: Filter by json field

In a MapBox Studio project of mine, I have field values that are stored as JSON values. My features all have attributes like: id 48545756 meta {} relations [] tags ...
1
vote
3answers
78 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?
0
votes
1answer
81 views

In TileMill/CartoCSS how do show several markers for the same point?

I'm creating a custom map using TileMill to show local walks. I want to show Points Of Interest along the path. I've exported the points from Google Maps using KML and I want to show an icon on a ...
0
votes
1answer
266 views

Hover effects using CartoCSS: Is this possible?

I'm trying to make a simple map of parcels in TileMill. Right now when I hover over a parcel, the information for that parcel appears in a teaser. That's simple enough. However, when working with ...
1
vote
1answer
146 views

How are OSM tags mapped to fields in Mapbox Streets vector tiles?

I recently started experimenting with Mapbox Studio and have encountered some discrepancies between feature tags in OSM and the corresponding feature fields in the vector tiles from Mapbox Streets. ...
0
votes
1answer
26 views

Where can I find the SQL queries for use with OpenStreetMap-Carto?

I found the OpenStreetMap-carto stylesheets (.mssfiles) here. I also found an issue discussing a problem with a SQL query here. Does anyone know where I can find the SQL scripts to build the layers ...
0
votes
0answers
58 views

CartoCSS problem with zoom levels - polygons are turned off

Can someone help me where could be a problem with CartoCSS rule below? I'm not able to see "school" polygons at z11-13 though rule seems to be written correctly:>>> [zoom>=11][zoom<=15]. Polygons ...
0
votes
1answer
219 views

CartoDB adding custom legend to sublayer

Here's what I'm trying to do: I have a map with selectors that load data from the same table (using SQL) based on what you selected. This all works great (code below). What I want is for a legend to ...
0
votes
1answer
75 views

Dynamic rendering on a layer with a long SQL query

I have a question on dynamic rendering with the cartodb APIs. These APIs are new for me. Data is a big layer stored in cartoDB (about 30 000 polygons). In my application the default rendering of ...
1
vote
1answer
112 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
40 views

CartoDB map won't render at all with cartodb.js or display markers with embed

I've tried to load a visualization I've made using cartodb.js and it simply doesn't appear at all. If I look in the network call response, there's this rather cryptic error: ...
1
vote
1answer
209 views

Marker icons overlapping street names in Tilemill

I'm new to CartoCSS and I'm trying to properly add subway markers on a map using Tilemill and OSM data. My problem is that some street names stay behind my marker icons : I have add ...
0
votes
2answers
69 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: ...
1
vote
1answer
159 views

CartoCSS Expression for shield-name

Is there any way to use a regular expression to filter a string when using CartoCSS expressions? I have geojson of some ways and route relations I obtained using Overpass Turbo. When creating a new ...
1
vote
0answers
72 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 ...
0
votes
1answer
276 views

Is there a way to customize the zoom button and legend in cartodb js?

I am following this tutorial, http://docs.cartodb.com/tutorials/toggle_map_view.html, and have been successful in developing an application with similar functionality, currently I am working on ...
0
votes
1answer
43 views

MapBox Studio - Reverse Character Strings

I am working on a project in MapBox studio where I had to flip all the labels 180° that were on lines. Since its not possible to use text-orientation for labels on lines, I flipped the font file 180 ...
1
vote
1answer
544 views

CartoDB - How would I customize my legend to not be white and have blocks instead of bullets?

First off, CartoDB is amazing. I am trying to modify the look of my legend to look something like the one as seen on the "Elephant Movement in a Human Landscape" example on the CartoDB website. ...
1
vote
1answer
85 views

How to filter a Cluster Map at run time

I think I am a bit confused with CartoDB when doing maps at runtime. Let's say I have a Cluster Map that includes all my data. However, I want to filter by a field. I thought one could simply set ...
0
votes
1answer
166 views

how do i change my map's styling in mapbox using mapbox.js?

i really searched for it high and low but couldn't find it!! I am using mapbox.js for this. i am working on the project which requires to change the styling of map, eg: area,land and water colors on ...
0
votes
1answer
43 views

Reduce building size in tilemill

I am designing a map of very densely populated area in Tilemill. I am using OSM building data. Due to having a lot of buildings it is very difficult to differentiate one building to another. Is there ...
0
votes
1answer
182 views

Add MapBox sourced hillshade to MapBox Studio project

I am working on a MapBox studio project that was originally the pre-styled 'OSM Bright 2'. I have since made lots of edits and would now like to add some subtle hillshading. I can see hillshading is ...