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
3
votes
1answer
65 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 ...
0
votes
0answers
122 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 ...
2
votes
0answers
40 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
91 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
52 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
147 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
31 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
193 views

How to fill 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
35 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
43 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
105 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
186 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
1answer
63 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
58 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
4k 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
84 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
90 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
82 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
119 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
74 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
157 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
74 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
188 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
238 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
62 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
86 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
309 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
105 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
242 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
92 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
230 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
66 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
402 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
433 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
165 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
895 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
417 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
371 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
242 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
97 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
569 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
73 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
269 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 ...
1
vote
1answer
203 views

Marker-width determined by population in animated bubble map. CARTO Builder

I'm trying to put together an animated map of population data for two different species on five different islands. I would like the population of each to be displayed as a standard marker whose width ...
1
vote
1answer
79 views

Creating bubble graphs in Carto using UK local authorities and Regions as the “Admin Region”

The data I have is a list of projects for which I have the following geographic information: postcode longitude and latitude local authority region (or country, eg Wales) as well as other details ...
1
vote
1answer
75 views

CARTO Builder: show categorical data by no. of casualties

I have a categorical Carto map that shows the different types of industrial accidents, but I also want to differentiate the points based on the number of deaths i.e. the higher number of deaths, the ...
0
votes
1answer
59 views

How to automatically separate two pins when a map is scaled in Carto

I am building a map on Carto, i am mapping activities at building level in a city. Sometimes two activities occur in the same building, when the map is zoomed in (at building level) you can clearly ...
1
vote
1answer
109 views

Is it possible with mapnik/cartocss to draw transparent land?

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
1answer
181 views

how to combine chloropleth, bubble and cluster designs in CARTO?

To be concrete, I have a map of election results by precinct. As I do not have shapefiles for the precincts, I geocoded the polling places, but many precincts share polling places. I have the ...