Questions tagged [cartocss]

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

20 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
3
votes
0answers
119 views

CartoCSS : Style a road using a road_label rule

The parisian ring road (and probably others) usually looks a bit off (especially at low zoom levels), because in OSM it has been created as two independant 'main' roads, instead of one 'highway'. ...
3
votes
0answers
200 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 ...
2
votes
0answers
41 views

Adjusting the admin_level of countries in osm-bright style?

I'm using OSM Bright style Unfortunately, this style favours more admin_level=3 countries than admin_level=2, for instance, on the map below, Transnistria is labelled instead of Moldavia. How to ...
2
votes
0answers
247 views

CartoCSS to MapboxGL

I have some old styles in CartoCSS and some I have found online. However obviously with the update of mapbox studio it uses Mapbox GL styling and the two are different. I can't see a way of ...
2
votes
0answers
254 views

CARTO weighted heatmap with variable range per point

I'm trying to do a Heatmap with carto but seems that torque considers each point equal in covered range but my data consists in values from antennas that cover different ranges (and i need that ...
2
votes
0answers
101 views

Prioritising labels in Tilemill?

I made a map using tilemill and osm data. This map is indented for print, so it will be exported to pdf, so no zoom levels used in mss files. I need to prioritise labels used on this map but can't ...
1
vote
1answer
211 views

Filling polygons with patterns in Carto using polygon-pattern-file?

I'm trying to create a layer in Carto with three categories of transparent hatching of different colors. I understand how to use the polygon-pattern-file Carto CSS style but am wondering where I can ...
1
vote
0answers
92 views

OSM only label internal boundaries with Carto and Mapnik

Using the OSM workflow on switch2osm.org, we want to label all internal country boundaries but not external ones (coastlines). There are 3 ways we could think of: Is there any way to not show ...
1
vote
1answer
121 views

Draw transparent land with Mapnik/CartoCSS?

I've tried to put a transparent background, but then, the seas are transparent too, and i don't want that. I just want transparent land, and blue seas ...
1
vote
0answers
436 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, ...
1
vote
0answers
80 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 ...
1
vote
1answer
844 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
0answers
11 views

Using CSS clip property with CARTO layers in CARTO js (v4)?

Trying to build a very similar application to this one here, this example was built using CARTO js (v3, the old version). With the new CARTO js it will not let me apply the clip property to the style ...
0
votes
1answer
16 views

Using features of CARTO Builder to dynamically calculate the average of selected columns

I am trying to find a simple way to calculate the average of selected columns (avg per row) dynamically in CARTO, using only the pre implemented features of CARTO Builder so that it is as user-...
0
votes
0answers
12 views

Creating subLayers using CARTO JS v4.1.8

I created a simple map with multiple layers using the below code. this.cartoSource = new carto.source.SQL(sql); this.layerStyle = new carto.style.CartoCSS(layerStyle); this.layer = new carto.layer....
0
votes
0answers
158 views

Correct way of setting up OSM tile server with custom styling

I have managed to set up an OSM tile server (Ubuntu 18.04), by using this docker image: https://hub.docker.com/r/overv/openstreetmap-tile-server/ Everything works fine while generating tiles with ...
0
votes
1answer
66 views

Torque.js error creating layertorque: Missing closing ] of filter

I've been trying to create a cartodb map with a torque layer as indicated in the Torque.js documentation, but I keep getting the same error: cartodb.js:14 MAP: error creating layertorque Error: :...
0
votes
1answer
85 views

CartoCSS & change colours on road-colors.yaml

I am looking at just having one shading of colours for OSM roads like red. When I update the hue values to something like 10-45. I try the generate the generate_road_colours.mss file. But this ...
0
votes
0answers
94 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, ...
-1
votes
1answer
170 views

CartoCSS files for Metro Extracts

I downloaded the Milan shapefiles from Metro Extracts and I imported these into TileMill. Do any CartoCSS files exist to define all layers in the shapefile, or do they need to be created from scratch?...