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

Carto Pop-up info window header color using html

Using Carto i am attempting to edit the header color of the info window specific for each variable. Currently i am portraying top and bottom 10% of deprivation by red and blue. I would like the header ...
user avatar
0 votes
0 answers
14 views

Carto CSS styling - showing top 10% and bottom 10% of data

I am trying to explore the IMD dataset on Carto and would like to portray the top 10% of IMD Score and the bottom 10% of IMD Score in an attempt to identify the most and least deprived areas and ...
user avatar
0 votes
1 answer
23 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 ...
user avatar
2 votes
0 answers
21 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 ...
user avatar
  • 121
2 votes
0 answers
139 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-...
user avatar
2 votes
1 answer
118 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 ...
user avatar
2 votes
1 answer
122 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 ...
user avatar
1 vote
0 answers
58 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 ...
user avatar
1 vote
0 answers
110 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 ...
user avatar
  • 11
1 vote
1 answer
58 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 ...
user avatar
0 votes
1 answer
65 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-...
user avatar
0 votes
0 answers
31 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....
user avatar
1 vote
1 answer
106 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 ...
user avatar
2 votes
1 answer
280 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 ...
user avatar
  • 271
3 votes
1 answer
128 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 ...
user avatar
2 votes
0 answers
69 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 ...
user avatar
  • 171
3 votes
3 answers
345 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 ...
user avatar
  • 31
1 vote
2 answers
86 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 ...
user avatar
  • 113
3 votes
1 answer
708 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 ...
user avatar
0 votes
1 answer
82 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 ...
user avatar
1 vote
1 answer
443 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 ...
user avatar
0 votes
1 answer
55 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 ...
user avatar
  • 143
0 votes
1 answer
57 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 ...
user avatar
0 votes
1 answer
705 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 ...
user avatar
  • 574
0 votes
1 answer
314 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(` ...
user avatar
  • 451
0 votes
2 answers
141 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 ...
user avatar
  • 459
0 votes
1 answer
96 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: :...
user avatar
8 votes
2 answers
22k 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 ...
user avatar
0 votes
1 answer
149 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 ...
user avatar
  • 475
0 votes
1 answer
146 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 ...
user avatar
0 votes
1 answer
169 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 ...
user avatar
1 vote
1 answer
251 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 ...
user avatar
0 votes
1 answer
142 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 ...
user avatar
  • 11
1 vote
1 answer
236 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 ...
user avatar
1 vote
1 answer
143 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?
user avatar
  • 11
0 votes
1 answer
318 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 ...
user avatar
2 votes
1 answer
501 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, ...
user avatar
2 votes
1 answer
83 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", ...
user avatar
1 vote
0 answers
114 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 ...
user avatar
  • 11
0 votes
1 answer
73 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 ...
user avatar
1 vote
1 answer
538 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 = '...
user avatar
0 votes
1 answer
198 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 (...
user avatar
-1 votes
1 answer
357 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 ...
user avatar
0 votes
2 answers
125 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 ...
user avatar
  • 113
3 votes
0 answers
335 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 ...
user avatar
0 votes
1 answer
111 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
  • 191
1 vote
1 answer
598 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, ...
user avatar
0 votes
1 answer
637 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 ...
user avatar
  • 123
0 votes
1 answer
240 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 ...
user avatar
  • 2,659
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 ...
user avatar
  • 713