The Stack Overflow podcast is back! Listen to an interview with our new CEO.

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

Using pattern styled polygons in Tilemill

I'm just learning CartoCSS with Tilemill. I've got a really simple requirement for styling a polygon but cannot find any hint nowhere. What is the code for styling simple polygon fills? For example,...
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
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: :...
2
votes
1answer
625 views

Leaflet.js and CartoDB.js giving event conflict

I have a layer from a CartoDB viz that I’m listening to the featureclick event. When a feature is clicked I highlight it by applying cartoCss. However, I want to unhighlight it when I click on an area ...
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
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 ...
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-...
2
votes
1answer
56 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 ...
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
1answer
85 views

Reduce building size in tilemill?

I am designing a map of very densely populated area in Tilemill. I am using OSM building data. Due to having a lot of buildings it is very difficult to differentiate one building to another. Is ...
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....
1
vote
1answer
68 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 ...
-1
votes
1answer
2k views

Changing map styling in mapbox using mapbox.js?

I am using mapbox.js for this. i am working on the project which requires to change the styling of map, eg: area,land and water colors on click of certain button. one possible way is, i use ...
1
vote
2answers
1k views

CartoCSS layer visibility

I am working in TileMill and I have a number of layers in two different levels of detail. I have assigned classes to the layers "highdetail" and "lowdetail", and I know how to use the zoom selector - ...
4
votes
1answer
985 views

Rendering tm2 projects? [closed]

What are the options for rendering tm2 projects? As far as I know the open source Mapbox tm2 projects have proprietary data sources (like OSM Bright 2), thus they are of little use, but some other ...
3
votes
1answer
74 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 ...
1
vote
1answer
712 views

Marker icons overlapping street names in Tilemill?

I'm new to CartoCSS and I'm trying to properly add subway markers on a map using Tilemill and OSM data. My problem is that some street names stay behind my marker icons : I have add "text-allow-...
0
votes
1answer
261 views

Using videos (as headers) in CartoDB Infowindows? [closed]

I need to know how to embed a video (YouTube or Vimeo) into an infowindow in CartoDB in the same way that an image appears as an image header. Potentially more complicated, when there is no video link ...
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 ...
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
1answer
259 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, ...
1
vote
2answers
56 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 ...
2
votes
3answers
119 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
1answer
210 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
37 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 ...
0
votes
1answer
37 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 ...
1
vote
1answer
126 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
150 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
46 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
216 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(` ...
1
vote
1answer
67 views

Buttons that toggle different column visualizations?

I have a census data table in Carto and I want the end user to be able to toggle through several different demographic visualizations via buttons on the map. For example one button shows median age, ...
0
votes
1answer
95 views

CartoDB Density View

Is the Density View for CartoDB no longer working? I have looked at three datasets on multiple accounts, and none of them are working correctly. They show only 1 bucket color, no matter the density. ...
0
votes
1answer
79 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 ...
1
vote
1answer
225 views

CartoDB – How can I place labels from one layer on top of an overlapping layer?

I have two overlapping polygon layers and I'd like to display the labels from the bottom layer on top of both layers so they're easily visible. Is there a way to do this with CartoCSS? Some sort of z-...
0
votes
1answer
265 views

CSS Styling Torque in CartoDB

I am trying to make a map that would show the total load of a bus. I have plotted the route and set up the time constraints. The ellipse is moving and seems to work fine, but when I try to style the ...
2
votes
1answer
6k 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
325 views

Tilemill/openstreetmap-carto, how to remove unwanted road lines

I am using Tilemill and the openstreetmap-carto style. The latest versions of each. I was curious to why these Center-lines are showing up in my highways and roads, and I am unable to get rid of them. ...
0
votes
1answer
96 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
100 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 ...
2
votes
1answer
598 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/...
2
votes
1answer
229 views

TileMill: How to mask layer without losing background

I have a large geotiff with elevation gradient which I want to use to colour my map. However, the coastal line of the geotiff doesn't exactly match my shapefile so I want to mask it. The problem is ...
0
votes
1answer
280 views

Dynamic rendering on a layer with a long SQL query

I have a question on dynamic rendering with the CartoDB APIs. These APIs are new for me. Data is a big layer stored in CartoDB (about 30 000 polygons). In my application the default rendering of ...
0
votes
1answer
91 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
179 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
261 views

Custom icons for Torque Categories in CartoDB

We’re developing a project with CartoDB and we want to show the elements clustering by zone and showing the most used one (Mode). We're doing this with Torque Categories, and it works! :) The ...
1
vote
1answer
892 views

Switching from “layer selector” to buttons to toggle between layers in CartoDB

As of now, we have a map that you can toggle between layers using the "layer selector". We want to instead have buttons on the map that, by clicking on one, you can switch between layers. In our's, ...
1
vote
1answer
84 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
216 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 ...
0
votes
1answer
532 views

How do I cluster by features in CartoDB?

I have a set of points for a number of buildings in NYC. I would like to group those points into clusters per their respective neighborhood (ex: Chelsea, Upper East Side etc.). Each of my points have ...