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

learn more… | top users | synonyms

2
votes
0answers
12 views

CartoCSS: Don't show border between adjacent polygons

In OSM, riverbeds are created as multiple adjacent or even overlapping polygons. When styling these polygons in CartoCSS with a border, the overlapping can be seen: I'd like to hide that line ...
0
votes
0answers
19 views

Tilemill/CartoCSS: how to center label in a polygon

For some reason, labels are always placed in the bottom right of a polygon. I want them in the center of a polygon. I tried these: text-horizontal-alignment: middle; text-vertical-alignment: middle; ...
0
votes
1answer
35 views

Draw icons and lables only for certain entities in Tilemill

I've recently started to use mapbox' TileMill2 to play around with vector tiles. It's pretty nice and, in comparison to Tilemill(1), much more faster. Exactly what I was searching for. Now I'm trying ...
1
vote
1answer
19 views

Styling of label on a line in Tilemill [duplicate]

I currently have a line that I want to but a label onto in Tilemill. It currently looks like this: But what I would prefer is something like this: where the line isn't rendered around (and ...
1
vote
2answers
45 views

Carto-CSS/ Mapnik XML Text background color

I want to add a background color to my labels. How do I do that with Carto-CSS in Tilemill or with Mapnik? Carto-CSS #marker_labels { text-name: "[name]"; text-face-name:@sans; text-size: 20; ...
1
vote
1answer
35 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
2answers
33 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 ...
0
votes
1answer
27 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 ...
0
votes
1answer
33 views

TileMill: Can't use both background-color and background-image?

Very new to TileMill and am working on my first project. I'm using a pattern image to enhance some areas on the map, water being an example. I've added the pattern to the water areas on my layers, ...
1
vote
1answer
61 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 ...
0
votes
1answer
20 views

CartoDB Density View

Is the Density View for CartoDB no longer working? I have looked at three datasets on multiple accounts, and none of them are working correctly. They show only 1 bucket color, no matter the density. ...
0
votes
0answers
27 views

CartoCSS Performance Considerations?

Just wondering if anyone knows how many lines of code CartoCSS can handle before it starts to affect performance? I'm currently using CartoDB and have around 400 lines of code, but haven't noticed ...
3
votes
1answer
74 views

How to render overlapping bus trips as one route from OSM?

I would like to create bus map for my city from OSM data. I imported data into Postgresql with osm2psql and I can render routes with Mapnik. But the problem is that same route ref is shown multiple ...
1
vote
1answer
55 views

Drawing text and line-dasharray

Is it possible with TileMills and CartoCSS?
0
votes
2answers
43 views

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 - ...
1
vote
1answer
62 views

Can you use nested properties to style features in CartoCSS

I've imported a GeoJSON layer into TileMill and am having trouble styling based on the properties in the features. The features' properties objects have objects nested within them, and I haven't found ...
1
vote
1answer
44 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
1answer
71 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
2answers
55 views

TileMIll FileGDB Annotations

Now that TileMill (specifically TileMill-v0.10.1-291-g31027ed) supports FileGDB https://www.mapbox.com/blog/tilemill-adds-support-for-esri-filegdb-format/ ...Is it possible to add label annotations ...
0
votes
1answer
59 views

Carto CSS variables

Does anyone know whether it's possible to use a variable within an attribute selector. For example I define my variable at the top of the file: @lowZoomMax: 9; And then reference it as follows: ...
0
votes
1answer
50 views

Videos (as headers) in CartoDB Infowindows

I need to know how to embed a video (YouTube or Vimeo) into an infowindow in CartoDB in the same way that an image appears as an image header. Potentially more complicated, when there is no video link ...
0
votes
0answers
11 views

Videos in CartoDB Infowindows [duplicate]

I need to know how to embed a video (YouTube or Vimeo) into an infowindow in CartoDB in the same way that an image appears as an image header. Potentially more complicated, when there is no video link ...
0
votes
1answer
29 views

Styling based on hex color codes within table?

I have a table of polygons named 'testtable'. Within it is a column 'color', which has hex codes. I want to style the polygons based on the hexcode values.. is this possible? I was trying something ...
0
votes
1answer
108 views

Superimposition of label in CartoDB

I'm currently doing a carte with CartoDB where I use CSS in order to show label but my issue is that I have entities which are very close and their label are difficult to read because of their ...
0
votes
0answers
46 views

torque cartodb heatmap at higer zoom levels

I am trying to use cartodb torque to display overtime location data using Cartodb Torque. Vizualization works great at zoom level 9, but when i zoom in further to level 13 instead of the intensity i ...
0
votes
1answer
59 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" ...
0
votes
1answer
63 views

CartoCSS detect odd vs even for use in labeling conditional

I liked the part in the advanced label styling about randomly asigning a 0 or 1 to control label placement and then using as a conditional #labels { text-name: "[name]"; text-face-name: ...
0
votes
1answer
141 views

Labeling in TileMill with CartoCSS - Add line break between variables

I am labeling some points in TileMill using CartoCSS. The labels are a composite of two variables text-name: [NAME]+' '+[TYPE]; The rule above inserts a space between the two variables. How can I ...
0
votes
1answer
26 views

How can I assign multiple classes to a layer in TileMill?

In my TileMill project, I have my-class that is assigned to most of my layers. I also have my-other-class that I want to assign to just a few of those layers. I tried assigning 2 classes using a ...
1
vote
1answer
101 views

TileMill: How to access geojson properties with CartoCSS

When trying to display a geojson layer in TileMill, is it possible to access the 'properties' of each feature? My geojson looks like this: "type": "Feature", "geometry": { ...
0
votes
1answer
70 views

Styling/Selecting based on a hstore column in TileMill?

I have added an OpenStreetMap dump file to PostGIS using osm2pgsql --hstore (and the default osm2pgsql style file). I have added and opened up this to TileMill. Is there anyway to style the map based ...
1
vote
2answers
92 views

How can I create a hexbin layer using the SQL and CartoCSS parameters in cartodb.js?

CartoDB has a great hexbin visualization wizard baked into the client dashboard: However, I like using cartodb.js to customize events and interactions; in particular, I'd like to make styles ...
0
votes
1answer
93 views

Targeting capital cities only in Tilemill/CartoCSS

At a specific zoom level in my Tilemill map, I want to only show capital cities, and hide all other cities. What data set could I use which will provide me with information oh whether a city is a ...
1
vote
1answer
80 views

Flip labels 180° with CartoCSS

How can I flip labels on my lines upside down? I am styling some OSM data and the cartocss is currently #streets{ text-size: 14; text-name: [NAME]; text-face-name: 'ATRotSemSanLigIta Regular'; ...
1
vote
2answers
412 views

Make new Tilemill map match default Mapbox label styles

I want to make a map in tilemill that matches the way that labels are displayed in this example, down to the countries that get labels at each zoom level, which country gets abbrev. vs. full title, ...
2
votes
1answer
106 views

Leaflet.js and CartoDB.js event conflict

Little problem here. I’ve got a layer from a CartoDB viz that I’m listening to the featureclick event. When a feature is clicked I highlight it by applying cartoCss. However, I want to unhighlight it ...
2
votes
1answer
101 views

Drawing 2 points at the beginning and the end of the LineString

I have LineStrings in a GeoJSON files, in example: ...
0
votes
1answer
102 views

Tilemill: set max extent for export

Is it possible to set map extent to be displayed on mapbox ? If so could you pls send mss example ? Regards, Jorge Vidinha
3
votes
1answer
103 views

Difficult style for the map

There is a task before me of generating images as shown below. The main problem is the signs which must be placed outside the polygon (if they do not fit in it), and the lines should connect the sign ...
1
vote
1answer
114 views

CartoCSS different background colors of Map element

I tried to change the background color of a map in zoomlevels greater than 11, but Map{ background-color:@water; [zoom>11]{background-color:@water*1.05;} } had no effect. Is there an other ...
1
vote
1answer
181 views

Is it possible to convert QGIS QLM to SLD (w/ New Symbology)?

I have a QGIS project where I have created some nice styles using New Symbology. I would like to convert this to either SLD for use in GeoServer or CartoCSS for use in TileMill. I have tried saving ...
-1
votes
1answer
101 views

Tilemill + metro.teczno.com

I downloaded the Milan shape files from metro.teczno.com and I imported these into tilemill. Exist any cartocss file to define all layers created by shape file? Or need to be created from scratch ?
25
votes
3answers
4k 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 ...
3
votes
0answers
290 views

How do I convert from SLD to Carto CSS?

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 ...
4
votes
1answer
392 views

Refer to zoom level in TileMill expressions

Is it possible to do something like this: #ways[highway="trunk"] { line-color:#c99; line-width:@zoom/10; } Obviously that example doesn't work. Is there another way to do arithmetic expressions ...
1
vote
1answer
497 views

Where is the reference for functions available in CartoCSS

I'm playing with Tilemill and i see that for some properties, like marker-transform, i can use functions. I want to use rotate() which takes 3 arguments (i learned this by inputing just one so it ...