Questions tagged [cartocss]

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

Filter by
Sorted by
Tagged with
0 votes
0 answers
22 views

Where can I find CartoCSS?

I am using Carto Builder, and I want to use Carto CSS to vary marker size depending on zoom level. But on Carto Builder I can't see the option for Carto CSS.
Simran Bhake's user avatar
0 votes
1 answer
28 views

Compositing Operations in CARTO VL

Is there any way to do (or emulate) the compositing operations that can be done in CartoCSS with CARTO VL? The closest I've been able to find (which hasn't been that close) is the ways to change the ...
Matthew Law's user avatar
3 votes
0 answers
33 views

Roads overwrite railways in deep tunnels

I'm trying to set up a tileserver to deliver a custom map of London's railway system using CartoCSS and Mapnik. London has overground lines, underground lines, a light railway and a tram system. I ...
amaca's user avatar
  • 131
2 votes
0 answers
268 views

Tilemill MBTiles SQLite database schema

I'm trying to resolve the inability to load a raster MBTiles map on a GPS that added support for the format. Maps created using QGIS or CalTopo will work. The SQLite database only contains two tables-...
CA Trail Map's user avatar
2 votes
1 answer
215 views

Zoomable world map with small countries highlighted

I'd like to create a zoomable world map where countries/territories are color-coded. This is a pretty standard request and Carto has a nice example. However, in standard maps like this, small ...
lambshaanxy's user avatar
2 votes
1 answer
199 views

Styling a contour line to indicate the direction of elevation

I've just got a slippy map set-up using Mapnik to render OpenStreetMap data. I've loaded SRTM elevation data following the PostGIS steps here and can now see contour lines on the map. I'm trying to ...
algorhythm's user avatar
1 vote
0 answers
136 views

Night \ Dark theme

I'm using OSM by the switch2osm guide. All works well, now im looking for a night mode or dark map design. I tried to install the osm-bright (ee have a fork called osm-night) OSM bright have a broken ...
David Shuhami's user avatar
3 votes
1 answer
179 views

How to simulate way_pixels rules in GeoServer like in Mapnik?

Openstreetmap-carto project.mml have a queries like this: way_area/NULLIF(POW(!scale_denominator!*0.001*0.28,2),0) AS way_pixels Do I understand correctly that way_pixels just shows how many times ...
cub4d's user avatar
  • 31
1 vote
1 answer
71 views

TurboCARTO ramps do not work with CartoCSS user conditional filters

If you want to define manual class breaks with the ramp() function it seems you're out of luck; as far as I can tell this is not working as intended. For example, here I try to supply different colors ...
cvricella_sbu's user avatar
0 votes
1 answer
74 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-...
jgerrit's user avatar
0 votes
0 answers
43 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....
user146810's user avatar
2 votes
1 answer
136 views

What is difference between carto.js and cartoDB?

I am exploring how to use carto.js map in a web application. I had seen couple of samples where carto.JS is used and some of them used cartoDB by including a supporting js file in the document. What ...
user146810's user avatar
2 votes
1 answer
437 views

Prerendering OSM tiles with CartoCSS?

I've set up a PostGIS database and imported my map data. Then I ran render_list to render my tiles. Serving them through mod-tile works just fine. However, the files on my HDD are *.meta files and ...
Fang's user avatar
  • 301
3 votes
1 answer
149 views

TileMill Issue with Null values

I have this original image But when i open it in TileMill, it converts image like this. White areas are transparent in the image This is more like, it removes all no data values i.e. 255 in my ...
Ahsan Mukhtar's user avatar
2 votes
0 answers
92 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 ...
Defozo's user avatar
  • 181
3 votes
3 answers
468 views

How do you create buffers around points based on individual point values in CARTO?

I am very new to CARTO and have very limited coding skills. I have a data set of points representing the centroid of zip codes. Each point has an associated average commute time. It is relatively ...
John R's user avatar
  • 31
1 vote
2 answers
88 views

CARTO not styling 36 total representatives

I'm extremely new to CARTO and I'm still learning the ropes. I currently have this territory map where the colors represent a representative in a county. However, it isn't shading the 36 total ...
ltd9938's user avatar
  • 113
3 votes
1 answer
965 views

Working CartoCSS editor?

I set up my own tile server starting with the switch2osm tutorial to which I added contour lines and hillshading. It is based on openstreetmap-carto which is obviously CartoCSS, but when I tried to ...
janosrusiczki's user avatar
0 votes
1 answer
145 views

Carto zoom to areas in "link second layer"

I have a Carto map with two layers which I have linked using Carto's "Link Second Layer" analysis. I added a widget which lets me select the name of polygons and through this link, the map returns ...
atlasofcoffee's user avatar
1 vote
1 answer
542 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 ...
Eva Phillips's user avatar
0 votes
1 answer
89 views

Do not display specific map feature with CartoCSS

I have built an OpenStreetMap tile server following this guide and everything seems to work fine. Now I want to customize the look of the generated tiles, and I started with something I tought it was ...
sblandin's user avatar
  • 143
0 votes
1 answer
72 views

Wide borders look weird for small polygons in Mapnik

I am experiencing this kind of visual defects for small polygons in Mapnik. These, in particular, are the small islands in the Pacific. As you see, instead of being uniform and nice, the borders have ...
tasOvted's user avatar
0 votes
1 answer
1k views

Reload renderd after updating style

I have set up an instance of OSM on my computer, using this tutorial. I also installed kosmtik and when I make changes in the styles, kosmtik does take them into account. Now, I'd like to see my ...
Tim Autin's user avatar
  • 584
0 votes
1 answer
374 views

Add labels to layer in CARTO.js (v4)

Does anyone know how to add labels (using a feature column such as "state") to a CARTO.js layer? This is how I have added the layer to my map: const boundariesDataset = new carto.source.Dataset(` ...
JohnGIS's user avatar
  • 485
0 votes
2 answers
188 views

Format date in CartoCSS infowindow

I have a date feild in my data and when I add it to an info window, it shows in zulu time (2017-11-06T00:00:00.000). Is there a way to format the cartoCSS and HTML so that only the date, and not the ...
JMers's user avatar
  • 477
0 votes
1 answer
102 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: :...
Juan Salvatore's user avatar
12 votes
2 answers
32k views

How to add CSS styling in Mapbox GL Popup?

I am aware this is similar to many other questions, but I have been unable to determine how to add the correct code to style my popups in mapbox-gl. I'm very new to CSS, Mapbox-gl, and coding in ...
StupidQuestionGuy's user avatar
0 votes
1 answer
212 views

Carto, CartoCSS : style point by hex value stored in table

I have a table of points. Each row has a string hex field that stores a color code in hex format: #000000. I want to style my map so that each point displays with the color assigned to it. But ...
CaitlinW's user avatar
  • 505
0 votes
1 answer
181 views

CartoCSS Bubble map Jitter/Non-overlapping points

I am new to CartoCSS and web mapping in general. I am working on a project with different sized points that represent populations in different locations around cities. What I want to do is have it ...
StupidQuestionGuy's user avatar
0 votes
1 answer
215 views

carto /cartocss : is there a function for "contains"?

I know how to set a specific color for a specific value (here specific_string) of a specific field (here field1) #mydataset[field1="specific_string"] { marker-fill: #000000; But what if I want to ...
Nicolas Fonty's user avatar
1 vote
1 answer
283 views

Why isn't CartoCSS picking my conditional values a carto animated layer?

I am making an animated layer and the values I want to map range are from 0-1, as a percentage (e.g. 0.33333). I'm trying to change the color and eventually size based on the value. I tried adding ...
weatherpattern's user avatar
0 votes
1 answer
198 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 ...
Jon's user avatar
  • 11
2 votes
1 answer
270 views

How to rotate a marker based on a value

I wanted to know if it is possible to make a turn for a point with a defined image (arrow example) depending on the attribute of a field that reflects the angle in degrees. I want to represent the ...
Ruben Cejudo's user avatar
1 vote
1 answer
227 views

marker (map pin shape) transform-origin

How can i move the center/origin of my marker image(map pin), so that my marker pin points always on the same point (in CSS transform-origin: center bottom;) how can i achieve this in CARTO CSS?
spencer's user avatar
  • 11
0 votes
1 answer
409 views

Adjusting Polygon Visibility with CartoCSS

I am attempting to adjust the visibility of a polygon layer in Carto by zoom level. To keep it simple for now I am looking to have the opacity of 1 from zoom 0-7 and opacity 0 from zoom 8+. I am ...
Samantha B's user avatar
2 votes
1 answer
588 views

Creating custom legend to map to custom css torque heatmap

I'm hoping someone can help me with html to create a legend that maps to a custom heatmap I made using the style CSS. When I try using the default legend, it neither maps to the right custom colors, ...
Lauren Smith's user avatar
2 votes
1 answer
113 views

Priority of street labels over amenity icons

OK, so I have a CartoCSS project. These are all of the stylesheets used (as described in my project.mml): "Stylesheet": [ "palette.mss", "base.mss", "roads.mss", "labels.mss", ...
Dr.Kameleon's user avatar
2 votes
0 answers
147 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 ...
elande's user avatar
  • 21
0 votes
1 answer
79 views

Can't create named map containing complex CSS condition using cURL

I'd like to style contour lines so that they show differently at varying levels of zoom. When zoomed right out, only the 200m, 400m, 600m, etc. lines should show. When zoomed in a bit further, the ...
OutstandingBill's user avatar
2 votes
1 answer
663 views

Show both label and icon for amenities using Carto CSS

I'm trying to style, e.g. museums, so that both their icon and their name shows up. However, there seems to be some conflict. Here's my - related - code: .points { ::tourism { [tourism = '...
Dr.Kameleon's user avatar
0 votes
1 answer
237 views

Post-processing CartoCSS layer by custom graphic algorithm

My goal: Inspired by Watercolor map created by Stamen Design I'm trying to create custom OSM based map tiles. In the article the Stamen Design guys describe the way of post-processing their tiles (...
Michal Vician's user avatar
-1 votes
1 answer
386 views

how cartodb.createLayer function works

i am using cartodb.createLayer() function to prepare my web application. I have tried to pass vizjson url and metadata method both to get my layers from my carto account which has total of 8 layers in ...
Jayant Tyagi's user avatar
0 votes
2 answers
140 views

How CARTO (or other GIS-software) decides where labels are located

I´m calculating the distances between different places in my region/country. I don´t know where I can find a database of all the towns/cities already geolocated, so I have a question for considering ...
Mika Ike's user avatar
  • 113
3 votes
0 answers
407 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 ...
RedCrusador's user avatar
0 votes
1 answer
157 views

show all points of carto-point-layer at low zoom-level

I have a Leaflet-map with a carto-layer(points), using the createLayer-method. It seems that Carto is doing something internally, that not all points are shown at low zoom-levels. Each time zooming ...
user avatar
1 vote
1 answer
641 views

Making legends in Carto Builder reflect custom class breaks for graduated symbols?

I am trying to build a map using Carto Builder that compares the average price of single family housing and multi-family housing by neighborhood. The data are offset centroids for each neighborhood, ...
Matt Stevenson's user avatar
0 votes
1 answer
689 views

Setting a polygon-fill ramp to have minimum and maximum values

Using the Carto web-tool I've set up a map to fill polygons based on the value of one of its attributes. However, due to outliers in the data the attributes range in values from 0 to >600, where as I ...
Azwok's user avatar
  • 123
0 votes
1 answer
261 views

What functions and operations are available for CartoCSS?

Where can I find a reference for the functions available for CartoCSS styling on carto.com? The documentation only gives a few examples and nowhere can I find the set of mathematical operations that ...
Logan Byers's user avatar
  • 2,839
2 votes
0 answers
2k views

How to style markers so they dynamically offset if overlapping at different zoom levels? [closed]

I have created a map using Carto. The map has bespoke images as icon markers. I would like to style the map so that, if the icons overlap, they both render in an offset position so that the full ...
ProudGIS's user avatar
  • 743
0 votes
1 answer
759 views

Carto: How to set pop-up (hover) to display differently according to layers and zoom level

I'm working in Carto.com but I'm still new with this, therefore my question might be somewhat banal. I have tried to generate a map of US with two layers: one layer reffering to the state and the ...
Carmen's user avatar
  • 3