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
0answers
20 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 ...
0
votes
0answers
26 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 ...
1
vote
1answer
23 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 ...
0
votes
1answer
24 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
15 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....
1
vote
1answer
79 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 ...
2
votes
1answer
93 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 ...
3
votes
1answer
79 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 ...
2
votes
0answers
45 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
3answers
160 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 ...
1
vote
2answers
67 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 ...
1
vote
1answer
276 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 ...
0
votes
1answer
46 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 ...
1
vote
1answer
248 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 ...
0
votes
1answer
40 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 ...
0
votes
1answer
49 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 ...
0
votes
1answer
199 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 ...
0
votes
1answer
231 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(` ...
0
votes
2answers
90 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 ...
0
votes
1answer
73 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: :...
2
votes
1answer
7k 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 ...
0
votes
1answer
105 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 ...
0
votes
1answer
106 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 ...
0
votes
1answer
99 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 ...
1
vote
1answer
138 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 ...
0
votes
1answer
92 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 ...
1
vote
1answer
186 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 ...
1
vote
1answer
94 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?
0
votes
1answer
236 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 ...
2
votes
1answer
289 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, ...
2
votes
1answer
64 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", ...
1
vote
0answers
94 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 ...
0
votes
1answer
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 ...
1
vote
1answer
407 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 = '...
0
votes
1answer
121 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 (...
-1
votes
1answer
284 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 ...
0
votes
2answers
96 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 ...
2
votes
0answers
261 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 ...
0
votes
1answer
83 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 ...
1
vote
1answer
473 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, ...
0
votes
1answer
510 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 ...
0
votes
1answer
193 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 ...
2
votes
0answers
986 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 ...
0
votes
1answer
479 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 ...
1
vote
1answer
414 views

Carto: Markers being offset or cut-off on polygon & marker map

I am seeing artifacts and markers are getting cut-off on my map. Zooming in and out can also leave an 'imprint' of what the map looked like before - either for a few seconds or until you refresh the ...
2
votes
0answers
257 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
107 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 ...
2
votes
1answer
622 views

Add PostGIS database information to XML generated by CartoDB

I have installed the latest Mapnik renderer following the information on their website and exported a .pbf file to a local PostGIS DB using this command: osm2pgsql --style ../openstreetmap-carto/...
3
votes
1answer
77 views

How to avoid multiple label in zoomin in tilemill

Now i am working on tilemill ,and i am facing a problem in a tilemill when i am styling zoomin a road layer that time display road layer label multiple times. How can avoid disply multiple road layer ...
2
votes
1answer
326 views

Mapnik/CartoCSS: make text labels overlap other layers (but not each other)

I'm using Mapnik 3.0.7 to render a basemap and a Shapefile layer that contains points. The labels for these points should overlap all the layers underneath, but not each other. Unfortunately, road ...