carto/docs/2.0.1.md

1160 lines
22 KiB
Markdown
Raw Permalink Normal View History

2014-09-24 06:19:02 +08:00
# Carto documentation
2014-09-24 05:52:36 +08:00
The following is a list of properties provided in CartoCSS that you can apply to map elements.
## map
2014-09-24 06:54:19 +08:00
##### background-color `color`
2014-09-24 06:19:02 +08:00
2014-09-24 06:47:10 +08:00
2014-09-24 05:52:36 +08:00
Default Value: none
2014-09-24 06:19:02 +08:00
_(transparent)_
2014-09-24 05:52:36 +08:00
Map Background color
2014-09-24 06:52:24 +08:00
* * *
2014-09-24 05:52:36 +08:00
2014-09-24 06:54:19 +08:00
##### background-image `uri`
2014-09-24 06:19:02 +08:00
2014-09-24 06:47:10 +08:00
2014-09-24 05:52:36 +08:00
Default Value:
2014-09-24 06:19:02 +08:00
_(transparent)_
2014-09-24 05:52:36 +08:00
An image that is repeated below all features on a map as a background.
2014-09-24 06:52:24 +08:00
* * *
2014-09-24 05:52:36 +08:00
2014-09-24 06:54:19 +08:00
##### srs `string`
2014-09-24 06:19:02 +08:00
2014-09-24 06:47:10 +08:00
2014-09-24 05:52:36 +08:00
Default Value: +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs
2014-09-24 06:19:02 +08:00
_(The proj4 literal of EPSG:4326 is assumed to be the Map's spatial reference and all data from layers within this map will be plotted using this coordinate system. If any layers do not declare an srs value then they will be assumed to be in the same srs as the Map and not transformations will be needed to plot them in the Map's coordinate space)_
2014-09-24 05:52:36 +08:00
Map spatial reference (proj4 string)
2014-09-24 06:52:24 +08:00
* * *
2014-09-24 05:52:36 +08:00
2014-09-24 06:54:19 +08:00
##### buffer-size `float`
2014-09-24 06:19:02 +08:00
2014-09-24 06:47:10 +08:00
2014-09-24 05:52:36 +08:00
Default Value: 0
2014-09-24 06:19:02 +08:00
_(No buffer will be used)_
2014-09-24 05:52:36 +08:00
Extra tolerance around the map (in pixels) used to ensure labels crossing tile boundaries are equally rendered in each tile (e.g. cut in each tile). Not intended to be used in combination with "avoid-edges".
2014-09-24 06:52:24 +08:00
* * *
2014-09-24 05:52:36 +08:00
2014-09-24 06:54:19 +08:00
##### base `string`
2014-09-24 06:19:02 +08:00
2014-09-24 06:47:10 +08:00
2014-09-24 05:52:36 +08:00
Default Value:
2014-09-24 06:19:02 +08:00
_(This base path defaults to an empty string meaning that any relative paths to files referenced in styles or layers will be interpreted relative to the application process.)_
2014-09-24 05:52:36 +08:00
Any relative paths used to reference files will be understood as relative to this directory path if the map is loaded from an in memory object rather than from the filesystem. If the map is loaded from the filesystem and this option is not provided it will be set to the directory of the stylesheet.
2014-09-24 06:52:24 +08:00
* * *
2014-09-24 05:52:36 +08:00
2014-09-24 06:54:19 +08:00
##### font-directory `uri`
2014-09-24 06:19:02 +08:00
2014-09-24 06:47:10 +08:00
2014-09-24 05:52:36 +08:00
Default Value: none
2014-09-24 06:19:02 +08:00
_(No map-specific fonts will be registered)_
2014-09-24 05:52:36 +08:00
Path to a directory which holds fonts which should be registered when the Map is loaded (in addition to any fonts that may be automatically registered).
2014-09-24 06:52:24 +08:00
* * *
2014-09-24 05:52:36 +08:00
## polygon
2014-09-24 06:54:19 +08:00
##### polygon-fill `color`
2014-09-24 06:19:02 +08:00
2014-09-24 06:47:10 +08:00
2014-09-24 05:52:36 +08:00
Default Value: rgba(128,128,128,1)
2014-09-24 06:19:02 +08:00
_(gray and fully opaque (alpha = 1), same as rgb(128,128,128))_
2014-09-24 05:52:36 +08:00
Fill color to assign to a polygon
2014-09-24 06:52:24 +08:00
* * *
2014-09-24 05:52:36 +08:00
2014-09-24 06:54:19 +08:00
##### polygon-gamma `float`
2014-09-24 06:19:02 +08:00
2014-09-24 06:47:10 +08:00
2014-09-24 05:52:36 +08:00
Default Value: 1
2014-09-24 06:19:02 +08:00
_(fully antialiased)_
2014-09-24 05:52:36 +08:00
Range: 0-1
Level of antialiasing of polygon edges
2014-09-24 06:52:24 +08:00
* * *
2014-09-24 05:52:36 +08:00
2014-09-24 06:54:19 +08:00
##### polygon-opacity `float`
2014-09-24 06:19:02 +08:00
2014-09-24 06:47:10 +08:00
2014-09-24 05:52:36 +08:00
Default Value: 1
2014-09-24 06:19:02 +08:00
_(opaque)_
2014-09-24 05:52:36 +08:00
The opacity of the polygon
2014-09-24 06:52:24 +08:00
* * *
2014-09-24 05:52:36 +08:00
2014-09-24 06:54:19 +08:00
##### polygon-smooth `float`
2014-09-24 06:19:02 +08:00
2014-09-24 06:47:10 +08:00
2014-09-24 05:52:36 +08:00
Default Value: 0
2014-09-24 06:19:02 +08:00
_(no smoothing)_
2014-09-24 05:52:36 +08:00
Range: 0-1
Amount of smoothing applied
2014-09-24 06:52:24 +08:00
* * *
2014-09-24 05:52:36 +08:00
## line
2014-09-24 06:54:19 +08:00
##### line-color `color`
2014-09-24 06:19:02 +08:00
2014-09-24 06:47:10 +08:00
2014-09-24 05:52:36 +08:00
Default Value: rgba(0,0,0,1)
2014-09-24 06:19:02 +08:00
_(black and fully opaque (alpha = 1), same as rgb(0,0,0))_
2014-09-24 05:52:36 +08:00
The color of a drawn line
2014-09-24 06:52:24 +08:00
* * *
2014-09-24 05:52:36 +08:00
2014-09-24 06:54:19 +08:00
##### line-width `float`
2014-09-24 06:19:02 +08:00
2014-09-24 06:47:10 +08:00
2014-09-24 05:52:36 +08:00
Default Value: 1
The width of a line in pixels
2014-09-24 06:52:24 +08:00
* * *
2014-09-24 05:52:36 +08:00
2014-09-24 06:54:19 +08:00
##### line-opacity `float`
2014-09-24 06:19:02 +08:00
2014-09-24 06:47:10 +08:00
2014-09-24 05:52:36 +08:00
Default Value: 1
2014-09-24 06:19:02 +08:00
_(opaque)_
2014-09-24 05:52:36 +08:00
The opacity of a line
2014-09-24 06:52:24 +08:00
* * *
2014-09-24 05:52:36 +08:00
2014-09-24 06:54:19 +08:00
##### line-join `keyword`
2014-09-24 05:52:36 +08:00
`miter``round``bevel`
2014-09-24 06:47:10 +08:00
2014-09-24 05:52:36 +08:00
Default Value: miter
The behavior of lines when joining
2014-09-24 06:52:24 +08:00
* * *
2014-09-24 05:52:36 +08:00
2014-09-24 06:54:19 +08:00
##### line-cap `keyword`
2014-09-24 05:52:36 +08:00
`butt``round``square`
2014-09-24 06:47:10 +08:00
2014-09-24 05:52:36 +08:00
Default Value: butt
The display of line endings
2014-09-24 06:52:24 +08:00
* * *
2014-09-24 05:52:36 +08:00
2014-09-24 06:54:19 +08:00
##### line-gamma `float`
2014-09-24 06:19:02 +08:00
2014-09-24 06:47:10 +08:00
2014-09-24 05:52:36 +08:00
Default Value: 1
2014-09-24 06:19:02 +08:00
_(fully antialiased)_
2014-09-24 05:52:36 +08:00
Range: 0-1
Level of antialiasing of stroke line
2014-09-24 06:52:24 +08:00
* * *
2014-09-24 05:52:36 +08:00
2014-09-24 06:54:19 +08:00
##### line-dasharray `numbers`
2014-09-24 06:19:02 +08:00
2014-09-24 06:47:10 +08:00
2014-09-24 05:52:36 +08:00
Default Value: none
2014-09-24 06:19:02 +08:00
_(solid line)_
2014-09-24 05:52:36 +08:00
A pair of length values [a,b], where (a) is the dash length and (b) is the gap length respectively. More than two values are supported for more complex patterns.
2014-09-24 06:52:24 +08:00
* * *
2014-09-24 05:52:36 +08:00
2014-09-24 06:54:19 +08:00
##### line-dash-offset `numbers`
2014-09-24 06:19:02 +08:00
2014-09-24 06:47:10 +08:00
2014-09-24 05:52:36 +08:00
Default Value: none
2014-09-24 06:19:02 +08:00
_(solid line)_
2014-09-24 05:52:36 +08:00
valid parameter but not currently used in renderers
2014-09-24 06:52:24 +08:00
* * *
2014-09-24 05:52:36 +08:00
2014-09-24 06:54:19 +08:00
##### line-rasterizer `keyword`
2014-09-24 05:52:36 +08:00
`full``fast`
2014-09-24 06:47:10 +08:00
2014-09-24 05:52:36 +08:00
Default Value: full
Exposes an alternate AGG rendering method that sacrifices some accuracy for speed.
2014-09-24 06:52:24 +08:00
* * *
2014-09-24 05:52:36 +08:00
## markers
2014-09-24 06:54:19 +08:00
##### marker-file `uri`
2014-09-24 06:19:02 +08:00
2014-09-24 06:47:10 +08:00
2014-09-24 05:52:36 +08:00
Default Value:
2014-09-24 06:19:02 +08:00
_(An ellipse or circle, if width equals height)_
2014-09-24 05:52:36 +08:00
An SVG file that this marker shows at each placement. If no file is given, the marker will show an ellipse.
2014-09-24 06:52:24 +08:00
* * *
2014-09-24 05:52:36 +08:00
2014-09-24 06:54:19 +08:00
##### marker-opacity `float`
2014-09-24 06:19:02 +08:00
2014-09-24 06:47:10 +08:00
2014-09-24 05:52:36 +08:00
Default Value: 1
2014-09-24 06:19:02 +08:00
_(opaque)_
2014-09-24 05:52:36 +08:00
The overall opacity of the marker
2014-09-24 06:52:24 +08:00
* * *
2014-09-24 05:52:36 +08:00
2014-09-24 06:54:19 +08:00
##### marker-line-color `color`
2014-09-24 06:19:02 +08:00
2014-09-24 06:47:10 +08:00
2014-09-24 05:52:36 +08:00
Default Value: black
The color of the stroke around a marker shape.
2014-09-24 06:52:24 +08:00
* * *
2014-09-24 05:52:36 +08:00
2014-09-24 06:54:19 +08:00
##### marker-line-width `float`
2014-09-24 06:19:02 +08:00
2014-09-24 06:47:10 +08:00
2014-09-24 05:52:36 +08:00
Default Value: undefined
The width of the stroke around a marker shape, in pixels. This is positioned on the boundary, so high values can cover the area itself.
2014-09-24 06:52:24 +08:00
* * *
2014-09-24 05:52:36 +08:00
2014-09-24 06:54:19 +08:00
##### marker-line-opacity `float`
2014-09-24 06:19:02 +08:00
2014-09-24 06:47:10 +08:00
2014-09-24 05:52:36 +08:00
Default Value: 1
2014-09-24 06:19:02 +08:00
_(opaque)_
2014-09-24 05:52:36 +08:00
The opacity of a line
2014-09-24 06:52:24 +08:00
* * *
2014-09-24 05:52:36 +08:00
2014-09-24 06:54:19 +08:00
##### marker-placement `keyword`
2014-09-24 05:52:36 +08:00
`point``line`
2014-09-24 06:47:10 +08:00
2014-09-24 05:52:36 +08:00
Default Value: line
Attempt to place markers on a point once or on a line repeatedly
2014-09-24 06:52:24 +08:00
* * *
2014-09-24 05:52:36 +08:00
2014-09-24 06:54:19 +08:00
##### marker-type `keyword`
2014-09-24 05:52:36 +08:00
`arrow``ellipse`
2014-09-24 06:47:10 +08:00
2014-09-24 05:52:36 +08:00
Default Value: ellipse
The default marker-type. If a SVG file is not given as the marker-file parameter, the renderer provides either an arrow or an ellipse (a circle if height is equal to width)
2014-09-24 06:52:24 +08:00
* * *
2014-09-24 05:52:36 +08:00
2014-09-24 06:54:19 +08:00
##### marker-width `float`
2014-09-24 06:19:02 +08:00
2014-09-24 06:47:10 +08:00
2014-09-24 05:52:36 +08:00
Default Value: 10
The width of the marker, if using one of the default types.
2014-09-24 06:52:24 +08:00
* * *
2014-09-24 05:52:36 +08:00
2014-09-24 06:54:19 +08:00
##### marker-height `float`
2014-09-24 06:19:02 +08:00
2014-09-24 06:47:10 +08:00
2014-09-24 05:52:36 +08:00
Default Value: 10
The height of the marker, if using one of the default types.
2014-09-24 06:52:24 +08:00
* * *
2014-09-24 05:52:36 +08:00
2014-09-24 06:54:19 +08:00
##### marker-fill `color`
2014-09-24 06:19:02 +08:00
2014-09-24 06:47:10 +08:00
2014-09-24 05:52:36 +08:00
Default Value: blue
The color of the area of the marker.
2014-09-24 06:52:24 +08:00
* * *
2014-09-24 05:52:36 +08:00
2014-09-24 06:54:19 +08:00
##### marker-allow-overlap `boolean`
2014-09-24 06:19:02 +08:00
2014-09-24 06:47:10 +08:00
2014-09-24 05:52:36 +08:00
Default Value: false
2014-09-24 06:19:02 +08:00
_(Do not allow makers to overlap with each other - overlapping markers will not be shown.)_
2014-09-24 05:52:36 +08:00
Control whether overlapping markers are shown or hidden.
2014-09-24 06:52:24 +08:00
* * *
2014-09-24 05:52:36 +08:00
2014-09-24 06:54:19 +08:00
##### marker-ignore-placement `boolean`
2014-09-24 06:19:02 +08:00
2014-09-24 06:47:10 +08:00
2014-09-24 05:52:36 +08:00
Default Value: false
2014-09-24 06:19:02 +08:00
_(do not store the bbox of this geometry in the collision detector cache)_
2014-09-24 05:52:36 +08:00
value to control whether the placement of the feature will prevent the placement of other features
2014-09-24 06:52:24 +08:00
* * *
2014-09-24 05:52:36 +08:00
2014-09-24 06:54:19 +08:00
##### marker-spacing `float`
2014-09-24 06:19:02 +08:00
2014-09-24 06:47:10 +08:00
2014-09-24 05:52:36 +08:00
Default Value: 100
Space between repeated labels
2014-09-24 06:52:24 +08:00
* * *
2014-09-24 05:52:36 +08:00
2014-09-24 06:54:19 +08:00
##### marker-max-error `float`
2014-09-24 06:19:02 +08:00
2014-09-24 06:47:10 +08:00
2014-09-24 05:52:36 +08:00
Default Value: 0.2
The maximum difference between actual marker placement and the marker-spacing parameter. Setting a high value can allow the renderer to try to resolve placement conflicts with other symbolizers.
2014-09-24 06:52:24 +08:00
* * *
2014-09-24 05:52:36 +08:00
2014-09-24 06:54:19 +08:00
##### marker-transform `string`
2014-09-24 06:19:02 +08:00
2014-09-24 06:47:10 +08:00
2014-09-24 05:52:36 +08:00
Default Value:
2014-09-24 06:19:02 +08:00
_(no transformation)_
2014-09-24 05:52:36 +08:00
An SVG transformation definition
2014-09-24 06:52:24 +08:00
* * *
2014-09-24 05:52:36 +08:00
## shield
2014-09-24 06:54:19 +08:00
##### shield-name `string`
2014-09-24 06:19:02 +08:00
2014-09-24 06:47:10 +08:00
2014-09-24 05:52:36 +08:00
Default Value: undefined
Value to use for a shield"s text label. Data columns are specified using brackets like [column_name]
2014-09-24 06:52:24 +08:00
* * *
2014-09-24 05:52:36 +08:00
2014-09-24 06:54:19 +08:00
##### shield-face-name `string`
2014-09-24 06:19:02 +08:00
2014-09-24 06:47:10 +08:00
2014-09-24 05:52:36 +08:00
Default Value:
Font name and style to use for the shield text
2014-09-24 06:52:24 +08:00
* * *
2014-09-24 05:52:36 +08:00
2014-09-24 06:54:19 +08:00
##### shield-unlock-image `boolean`
2014-09-24 06:19:02 +08:00
2014-09-24 06:47:10 +08:00
2014-09-24 05:52:36 +08:00
Default Value: false
2014-09-24 06:19:02 +08:00
_(text alignment relative to the shield image uses the center of the image as the anchor for text positioning.)_
2014-09-24 05:52:36 +08:00
This parameter should be set to true if you are trying to position text beside rather than on top of the shield image
2014-09-24 06:52:24 +08:00
* * *
2014-09-24 05:52:36 +08:00
2014-09-24 06:54:19 +08:00
##### shield-size `float`
2014-09-24 06:19:02 +08:00
2014-09-24 06:47:10 +08:00
2014-09-24 05:52:36 +08:00
Default Value: undefined
The size of the shield text in pixels
2014-09-24 06:52:24 +08:00
* * *
2014-09-24 05:52:36 +08:00
2014-09-24 06:54:19 +08:00
##### shield-fill `color`
2014-09-24 06:19:02 +08:00
2014-09-24 06:47:10 +08:00
2014-09-24 05:52:36 +08:00
Default Value: undefined
The color of the shield text
2014-09-24 06:52:24 +08:00
* * *
2014-09-24 05:52:36 +08:00
2014-09-24 06:54:19 +08:00
##### shield-placement `keyword`
2014-09-24 05:52:36 +08:00
`point``line``vertex``interior`
2014-09-24 06:47:10 +08:00
2014-09-24 05:52:36 +08:00
Default Value: point
How this shield should be placed. Point placement attempts to place it on top of points, line places along lines multiple times per feature, vertex places on the vertexes of polygons, and interior attempts to place inside of polygons.
2014-09-24 06:52:24 +08:00
* * *
2014-09-24 05:52:36 +08:00
2014-09-24 06:54:19 +08:00
##### shield-avoid-edges `boolean`
2014-09-24 06:19:02 +08:00
2014-09-24 06:47:10 +08:00
2014-09-24 05:52:36 +08:00
Default Value: false
Tell positioning algorithm to avoid labeling near intersection edges.
2014-09-24 06:52:24 +08:00
* * *
2014-09-24 05:52:36 +08:00
2014-09-24 06:54:19 +08:00
##### shield-min-distance `float`
2014-09-24 06:19:02 +08:00
2014-09-24 06:47:10 +08:00
2014-09-24 05:52:36 +08:00
Default Value: 0
Minimum distance to the next shield symbol, not necessarily the same shield.
2014-09-24 06:52:24 +08:00
* * *
2014-09-24 05:52:36 +08:00
2014-09-24 06:54:19 +08:00
##### shield-spacing `float`
2014-09-24 06:19:02 +08:00
2014-09-24 06:47:10 +08:00
2014-09-24 05:52:36 +08:00
Default Value: 0
The spacing between repeated occurrences of the same shield on a line
2014-09-24 06:52:24 +08:00
* * *
2014-09-24 05:52:36 +08:00
2014-09-24 06:54:19 +08:00
##### shield-min-padding `float`
2014-09-24 06:19:02 +08:00
2014-09-24 06:47:10 +08:00
2014-09-24 05:52:36 +08:00
Default Value: 0
Determines the minimum amount of padding that a shield gets relative to other shields
2014-09-24 06:52:24 +08:00
* * *
2014-09-24 05:52:36 +08:00
2014-09-24 06:54:19 +08:00
##### shield-wrap-width `float`
2014-09-24 06:19:02 +08:00
2014-09-24 06:47:10 +08:00
2014-09-24 05:52:36 +08:00
Default Value: 0
Length before wrapping long names.
2014-09-24 06:52:24 +08:00
* * *
2014-09-24 05:52:36 +08:00
2014-09-24 06:54:19 +08:00
##### shield-wrap-character `string`
2014-09-24 06:19:02 +08:00
2014-09-24 06:47:10 +08:00
2014-09-24 05:52:36 +08:00
Default Value:
Use this character instead of a space to wrap long names.
2014-09-24 06:52:24 +08:00
* * *
2014-09-24 05:52:36 +08:00
2014-09-24 06:54:19 +08:00
##### shield-halo-fill `color`
2014-09-24 06:19:02 +08:00
2014-09-24 06:47:10 +08:00
2014-09-24 05:52:36 +08:00
Default Value: #FFFFFF
2014-09-24 06:19:02 +08:00
_(white)_
2014-09-24 05:52:36 +08:00
Specifies the color of the halo around the text.
2014-09-24 06:52:24 +08:00
* * *
2014-09-24 05:52:36 +08:00
2014-09-24 06:54:19 +08:00
##### shield-halo-radius `float`
2014-09-24 06:19:02 +08:00
2014-09-24 06:47:10 +08:00
2014-09-24 05:52:36 +08:00
Default Value: 0
2014-09-24 06:19:02 +08:00
_(no halo)_
2014-09-24 05:52:36 +08:00
Specify the radius of the halo in pixels
2014-09-24 06:52:24 +08:00
* * *
2014-09-24 05:52:36 +08:00
2014-09-24 06:54:19 +08:00
##### shield-character-spacing `float`
2014-09-24 06:19:02 +08:00
2014-09-24 06:47:10 +08:00
2014-09-24 05:52:36 +08:00
Default Value: 0
Horizontal spacing between characters (in pixels). Currently works for point placement only, not line placement.
2014-09-24 06:52:24 +08:00
* * *
2014-09-24 05:52:36 +08:00
2014-09-24 06:54:19 +08:00
##### shield-line-spacing `float`
2014-09-24 06:19:02 +08:00
2014-09-24 06:47:10 +08:00
2014-09-24 05:52:36 +08:00
Default Value: undefined
Vertical spacing between lines of multiline labels (in pixels)
2014-09-24 06:52:24 +08:00
* * *
2014-09-24 05:52:36 +08:00
2014-09-24 06:54:19 +08:00
##### shield-file `uri`
2014-09-24 06:19:02 +08:00
2014-09-24 06:47:10 +08:00
2014-09-24 05:52:36 +08:00
Default Value: none
Image file to render behind the shield text
2014-09-24 06:52:24 +08:00
* * *
2014-09-24 05:52:36 +08:00
2014-09-24 06:54:19 +08:00
##### shield-text-dx `float`
2014-09-24 06:19:02 +08:00
2014-09-24 06:47:10 +08:00
2014-09-24 05:52:36 +08:00
Default Value: 0
Displace text within shield by fixed amount, in pixels, +/- along the X axis. A positive value will shift the text right
2014-09-24 06:52:24 +08:00
* * *
2014-09-24 05:52:36 +08:00
2014-09-24 06:54:19 +08:00
##### shield-text-dy `float`
2014-09-24 06:19:02 +08:00
2014-09-24 06:47:10 +08:00
2014-09-24 05:52:36 +08:00
Default Value: 0
Displace text within shield by fixed amount, in pixels, +/- along the Y axis. A positive value will shift the text down
2014-09-24 06:52:24 +08:00
* * *
2014-09-24 05:52:36 +08:00
2014-09-24 06:54:19 +08:00
##### shield-dx `float`
2014-09-24 06:19:02 +08:00
2014-09-24 06:47:10 +08:00
2014-09-24 05:52:36 +08:00
Default Value: 0
Displace shield by fixed amount, in pixels, +/- along the X axis. A positive value will shift the text right
2014-09-24 06:52:24 +08:00
* * *
2014-09-24 05:52:36 +08:00
2014-09-24 06:54:19 +08:00
##### shield-dy `float`
2014-09-24 06:19:02 +08:00
2014-09-24 06:47:10 +08:00
2014-09-24 05:52:36 +08:00
Default Value: 0
Displace shield by fixed amount, in pixels, +/- along the Y axis. A positive value will shift the text down
2014-09-24 06:52:24 +08:00
* * *
2014-09-24 05:52:36 +08:00
2014-09-24 06:54:19 +08:00
##### shield-opacity `float`
2014-09-24 06:19:02 +08:00
2014-09-24 06:47:10 +08:00
2014-09-24 05:52:36 +08:00
Default Value: 1
(Default 1.0) - opacity of the image used for the shield
2014-09-24 06:52:24 +08:00
* * *
2014-09-24 05:52:36 +08:00
2014-09-24 06:54:19 +08:00
##### shield-text-opacity `float`
2014-09-24 06:19:02 +08:00
2014-09-24 06:47:10 +08:00
2014-09-24 05:52:36 +08:00
Default Value: 1
(Default 1.0) - opacity of the text placed on top of the shield
2014-09-24 06:52:24 +08:00
* * *
2014-09-24 05:52:36 +08:00
2014-09-24 06:54:19 +08:00
##### shield-horizontal-alignment `keyword`
2014-09-24 05:52:36 +08:00
`left``middle``right``auto`
2014-09-24 06:47:10 +08:00
2014-09-24 05:52:36 +08:00
Default Value: middle
The shield's horizontal alignment from its centerpoint
2014-09-24 06:52:24 +08:00
* * *
2014-09-24 05:52:36 +08:00
2014-09-24 06:54:19 +08:00
##### shield-text-transform `keyword`
2014-09-24 05:52:36 +08:00
`none``uppercase``lowercase``capitalize`
2014-09-24 06:47:10 +08:00
2014-09-24 05:52:36 +08:00
Default Value: none
Transform the case of the characters
2014-09-24 06:52:24 +08:00
* * *
2014-09-24 05:52:36 +08:00
2014-09-24 06:54:19 +08:00
##### shield-no-text `boolean`
2014-09-24 06:19:02 +08:00
2014-09-24 06:47:10 +08:00
2014-09-24 05:52:36 +08:00
Default Value: false
Whether the shield should make room for a text label.
2014-09-24 06:52:24 +08:00
* * *
2014-09-24 05:52:36 +08:00
2014-09-24 06:54:19 +08:00
##### shield-justify-alignment `string`
2014-09-24 06:19:02 +08:00
2014-09-24 06:47:10 +08:00
2014-09-24 05:52:36 +08:00
Default Value: middle
Define how text in a shield's label is justified
2014-09-24 06:52:24 +08:00
* * *
2014-09-24 05:52:36 +08:00
## line-pattern
2014-09-24 06:54:19 +08:00
##### line-pattern-file `uri`
2014-09-24 06:19:02 +08:00
2014-09-24 06:47:10 +08:00
2014-09-24 05:52:36 +08:00
Default Value: none
An image file to be repeated and warped along a line
2014-09-24 06:52:24 +08:00
* * *
2014-09-24 05:52:36 +08:00
## polygon-pattern
2014-09-24 06:54:19 +08:00
##### polygon-pattern-file `uri`
2014-09-24 06:19:02 +08:00
2014-09-24 06:47:10 +08:00
2014-09-24 05:52:36 +08:00
Default Value: none
Image to use as a repeated pattern fill within a polygon
2014-09-24 06:52:24 +08:00
* * *
2014-09-24 05:52:36 +08:00
2014-09-24 06:54:19 +08:00
##### polygon-pattern-alignment `keyword`
2014-09-24 05:52:36 +08:00
`local``global`
2014-09-24 06:47:10 +08:00
2014-09-24 05:52:36 +08:00
Default Value: local
Specify whether to align pattern fills to the layer or to the map.
2014-09-24 06:52:24 +08:00
* * *
2014-09-24 05:52:36 +08:00
2014-09-24 06:54:19 +08:00
##### polygon-pattern-gamma `float`
2014-09-24 06:19:02 +08:00
2014-09-24 06:47:10 +08:00
2014-09-24 05:52:36 +08:00
Default Value: 1
2014-09-24 06:19:02 +08:00
_(fully antialiased)_
2014-09-24 05:52:36 +08:00
Range: 0-1
Level of antialiasing of polygon pattern edges
2014-09-24 06:52:24 +08:00
* * *
2014-09-24 05:52:36 +08:00
## raster
2014-09-24 06:54:19 +08:00
##### raster-opacity `float`
2014-09-24 06:19:02 +08:00
2014-09-24 06:47:10 +08:00
2014-09-24 05:52:36 +08:00
Default Value: 1
2014-09-24 06:19:02 +08:00
_(opaque)_
2014-09-24 05:52:36 +08:00
The opacity of the raster symbolizer on top of other symbolizers.
2014-09-24 06:52:24 +08:00
* * *
2014-09-24 05:52:36 +08:00
2014-09-24 06:54:19 +08:00
##### raster-mode `keyword`
2014-09-24 05:52:36 +08:00
`normal``grain_merge``grain_merge2``multiply``multiply2``divide``divide2``screen``hard_light`
2014-09-24 06:47:10 +08:00
2014-09-24 05:52:36 +08:00
Default Value: normal
The blending technique used to overlay this raster image on the layer below. Normal simply covers the layer. Grain merge adds the two layers together and subtracts 128 from the value, making the resulting area sometimes high-contrast. Screen often gives a lighter, washed-out appearance. Multiply multiplies the pixels, giving a high-contrast result. Divide divides the upper layer by the lower layer, making a lighter version.
2014-09-24 06:52:24 +08:00
* * *
2014-09-24 05:52:36 +08:00
2014-09-24 06:54:19 +08:00
##### raster-filter-factor `float`
2014-09-24 06:19:02 +08:00
2014-09-24 06:47:10 +08:00
2014-09-24 05:52:36 +08:00
Default Value: -1
2014-09-24 06:19:02 +08:00
_(Allow the datasource to choose appropriate downscaling.)_
2014-09-24 05:52:36 +08:00
This is used by the Raster or Gdal datasources to pre-downscale images using overviews. Higher numbers can sometimes cause much better scaled image output, at the cost of speed.
2014-09-24 06:52:24 +08:00
* * *
2014-09-24 05:52:36 +08:00
2014-09-24 06:54:19 +08:00
##### raster-scaling `keyword`
2014-09-24 05:52:36 +08:00
`fast``bilinear``bilinear8``bicubic``spline16``gaussian``lanczos`
2014-09-24 06:47:10 +08:00
2014-09-24 05:52:36 +08:00
Default Value: fast
The scaling algorithm used to making different resolution versions of this raster layer. Bilinear is a good compromise between speed and accuracy, while lanczos gives the highest quality.
2014-09-24 06:52:24 +08:00
* * *
2014-09-24 05:52:36 +08:00
2014-09-24 06:54:19 +08:00
##### raster-mesh-size `integer`
2014-09-24 06:19:02 +08:00
2014-09-24 06:47:10 +08:00
2014-09-24 05:52:36 +08:00
Default Value: 16
2014-09-24 06:19:02 +08:00
_(Reprojection mesh will be 1/16 of the resolution of the source image)_
2014-09-24 05:52:36 +08:00
A reduced resolution mesh is used for raster reprojection, and the total image size is divided by the mesh-size to determine the quality of that mesh. Values for mesh-size larger than the default will result in faster reprojection but might lead to distortion.
2014-09-24 06:52:24 +08:00
* * *
2014-09-24 05:52:36 +08:00
## point
2014-09-24 06:54:19 +08:00
##### point-file `uri`
2014-09-24 06:19:02 +08:00
2014-09-24 06:47:10 +08:00
2014-09-24 05:52:36 +08:00
Default Value: none
Image file to represent a point
2014-09-24 06:52:24 +08:00
* * *
2014-09-24 05:52:36 +08:00
2014-09-24 06:54:19 +08:00
##### point-allow-overlap `boolean`
2014-09-24 06:19:02 +08:00
2014-09-24 06:47:10 +08:00
2014-09-24 05:52:36 +08:00
Default Value: false
2014-09-24 06:19:02 +08:00
_(Do not allow points to overlap with each other - overlapping markers will not be shown.)_
2014-09-24 05:52:36 +08:00
Control whether overlapping points are shown or hidden.
2014-09-24 06:52:24 +08:00
* * *
2014-09-24 05:52:36 +08:00
2014-09-24 06:54:19 +08:00
##### point-ignore-placement `boolean`
2014-09-24 06:19:02 +08:00
2014-09-24 06:47:10 +08:00
2014-09-24 05:52:36 +08:00
Default Value: false
2014-09-24 06:19:02 +08:00
_(do not store the bbox of this geometry in the collision detector cache)_
2014-09-24 05:52:36 +08:00
value to control whether the placement of the feature will prevent the placement of other features
2014-09-24 06:52:24 +08:00
* * *
2014-09-24 05:52:36 +08:00
2014-09-24 06:54:19 +08:00
##### point-opacity `float`
2014-09-24 06:19:02 +08:00
2014-09-24 06:47:10 +08:00
2014-09-24 05:52:36 +08:00
Default Value: 1
2014-09-24 06:19:02 +08:00
_(Fully opaque)_
2014-09-24 05:52:36 +08:00
A value from 0 to 1 to control the opacity of the point
2014-09-24 06:52:24 +08:00
* * *
2014-09-24 05:52:36 +08:00
2014-09-24 06:54:19 +08:00
##### point-placement `keyword`
2014-09-24 05:52:36 +08:00
`centroid``interior`
2014-09-24 06:47:10 +08:00
2014-09-24 05:52:36 +08:00
Default Value: centroid
How this point should be placed. Centroid calculates the geometric center of a polygon, which can be outside of it, while interior always places inside of a polygon.
2014-09-24 06:52:24 +08:00
* * *
2014-09-24 05:52:36 +08:00
2014-09-24 06:54:19 +08:00
##### point-transform `string`
2014-09-24 06:19:02 +08:00
2014-09-24 06:47:10 +08:00
2014-09-24 05:52:36 +08:00
Default Value:
2014-09-24 06:19:02 +08:00
_(No transformation)_
2014-09-24 05:52:36 +08:00
SVG transformation definition
2014-09-24 06:52:24 +08:00
* * *
2014-09-24 05:52:36 +08:00
## text
2014-09-24 06:54:19 +08:00
##### text-name `string`
2014-09-24 06:19:02 +08:00
2014-09-24 06:47:10 +08:00
2014-09-24 05:52:36 +08:00
Default Value:
Value to use for a text label. Data columns are specified using brackets like [column_name]
2014-09-24 06:52:24 +08:00
* * *
2014-09-24 05:52:36 +08:00
2014-09-24 06:54:19 +08:00
##### text-face-name `string`
2014-09-24 06:19:02 +08:00
2014-09-24 06:47:10 +08:00
2014-09-24 05:52:36 +08:00
Default Value: undefined
Font name and style to render a label in
2014-09-24 06:52:24 +08:00
* * *
2014-09-24 05:52:36 +08:00
2014-09-24 06:54:19 +08:00
##### text-size `float`
2014-09-24 06:19:02 +08:00
2014-09-24 06:47:10 +08:00
2014-09-24 05:52:36 +08:00
Default Value: 10
Text size in pixels
2014-09-24 06:52:24 +08:00
* * *
2014-09-24 05:52:36 +08:00
2014-09-24 06:54:19 +08:00
##### text-ratio `float`
2014-09-24 06:19:02 +08:00
2014-09-24 06:47:10 +08:00
2014-09-24 05:52:36 +08:00
Default Value: 0
Define the amount of text (of the total) present on successive lines when wrapping occurs
2014-09-24 06:52:24 +08:00
* * *
2014-09-24 05:52:36 +08:00
2014-09-24 06:54:19 +08:00
##### text-wrap-width `float`
2014-09-24 06:19:02 +08:00
2014-09-24 06:47:10 +08:00
2014-09-24 05:52:36 +08:00
Default Value: 0
Length of a chunk of text in characters before wrapping text
2014-09-24 06:52:24 +08:00
* * *
2014-09-24 05:52:36 +08:00
2014-09-24 06:54:19 +08:00
##### text-wrap-character `string`
2014-09-24 06:19:02 +08:00
2014-09-24 06:47:10 +08:00
2014-09-24 05:52:36 +08:00
Default Value:
Use this character instead of a space to wrap long text.
2014-09-24 06:52:24 +08:00
* * *
2014-09-24 05:52:36 +08:00
2014-09-24 06:54:19 +08:00
##### text-spacing `float`
2014-09-24 06:19:02 +08:00
2014-09-24 06:47:10 +08:00
2014-09-24 05:52:36 +08:00
Default Value: undefined
Distance between repeated text labels on a line
2014-09-24 06:52:24 +08:00
* * *
2014-09-24 05:52:36 +08:00
2014-09-24 06:54:19 +08:00
##### text-character-spacing `float`
2014-09-24 06:19:02 +08:00
2014-09-24 06:47:10 +08:00
2014-09-24 05:52:36 +08:00
Default Value: 0
Horizontal spacing adjustment between characters in pixels
2014-09-24 06:52:24 +08:00
* * *
2014-09-24 05:52:36 +08:00
2014-09-24 06:54:19 +08:00
##### text-line-spacing `float`
2014-09-24 06:19:02 +08:00
2014-09-24 06:47:10 +08:00
2014-09-24 05:52:36 +08:00
Default Value: 0
Vertical spacing adjustment between lines in pixels
2014-09-24 06:52:24 +08:00
* * *
2014-09-24 05:52:36 +08:00
2014-09-24 06:54:19 +08:00
##### text-label-position-tolerance `float`
2014-09-24 06:19:02 +08:00
2014-09-24 06:47:10 +08:00
2014-09-24 05:52:36 +08:00
Default Value: 0
Allows the label to be displaced from its ideal position by a number of pixels
2014-09-24 06:52:24 +08:00
* * *
2014-09-24 05:52:36 +08:00
2014-09-24 06:54:19 +08:00
##### text-max-char-angle-delta `float`
2014-09-24 06:19:02 +08:00
2014-09-24 06:47:10 +08:00
2014-09-24 05:52:36 +08:00
Default Value: none
If present, the maximum angle change, in degrees, allowed between adjacent characters in a label. This will stop label placement around sharp corners.
2014-09-24 06:52:24 +08:00
* * *
2014-09-24 05:52:36 +08:00
2014-09-24 06:54:19 +08:00
##### text-fill `color`
2014-09-24 06:19:02 +08:00
2014-09-24 06:47:10 +08:00
2014-09-24 05:52:36 +08:00
Default Value: #000000
Specifies the color for the text
2014-09-24 06:52:24 +08:00
* * *
2014-09-24 05:52:36 +08:00
2014-09-24 06:54:19 +08:00
##### text-opacity `float`
2014-09-24 06:19:02 +08:00
2014-09-24 06:47:10 +08:00
2014-09-24 05:52:36 +08:00
Default Value: 1
2014-09-24 06:19:02 +08:00
_(Fully opaque)_
2014-09-24 05:52:36 +08:00
A number from 0 to 1 specifying the opacity for the text
2014-09-24 06:52:24 +08:00
* * *
2014-09-24 05:52:36 +08:00
2014-09-24 06:54:19 +08:00
##### text-halo-fill `color`
2014-09-24 06:19:02 +08:00
2014-09-24 06:47:10 +08:00
2014-09-24 05:52:36 +08:00
Default Value: #FFFFFF
2014-09-24 06:19:02 +08:00
_(white)_
2014-09-24 05:52:36 +08:00
Specifies the color of the halo around the text.
2014-09-24 06:52:24 +08:00
* * *
2014-09-24 05:52:36 +08:00
2014-09-24 06:54:19 +08:00
##### text-halo-radius `float`
2014-09-24 06:19:02 +08:00
2014-09-24 06:47:10 +08:00
2014-09-24 05:52:36 +08:00
Default Value: 0
2014-09-24 06:19:02 +08:00
_(no halo)_
2014-09-24 05:52:36 +08:00
Specify the radius of the halo in pixels
2014-09-24 06:52:24 +08:00
* * *
2014-09-24 05:52:36 +08:00
2014-09-24 06:54:19 +08:00
##### text-dx `float`
2014-09-24 06:19:02 +08:00
2014-09-24 06:47:10 +08:00
2014-09-24 05:52:36 +08:00
Default Value: 0
Displace text by fixed amount, in pixels, +/- along the X axis. A positive value will shift the text right
2014-09-24 06:52:24 +08:00
* * *
2014-09-24 05:52:36 +08:00
2014-09-24 06:54:19 +08:00
##### text-dy `float`
2014-09-24 06:19:02 +08:00
2014-09-24 06:47:10 +08:00
2014-09-24 05:52:36 +08:00
Default Value: 0
Displace text by fixed amount, in pixels, +/- along the Y axis. A positive value will shift the text down
2014-09-24 06:52:24 +08:00
* * *
2014-09-24 05:52:36 +08:00
2014-09-24 06:54:19 +08:00
##### text-vertical-alignment `keyword`
2014-09-24 05:52:36 +08:00
`top``middle``bottom`
2014-09-24 06:47:10 +08:00
2014-09-24 05:52:36 +08:00
Default Value: middle
2014-09-24 06:19:02 +08:00
_(Default affected by value of dy; "bottom" for dy>0, "top" for dy<0.)_
2014-09-24 05:52:36 +08:00
Position of label relative to point position.
2014-09-24 06:52:24 +08:00
* * *
2014-09-24 05:52:36 +08:00
2014-09-24 06:54:19 +08:00
##### text-avoid-edges `boolean`
2014-09-24 06:19:02 +08:00
2014-09-24 06:47:10 +08:00
2014-09-24 05:52:36 +08:00
Default Value: false
Tell positioning algorithm to avoid labeling near intersection edges.
2014-09-24 06:52:24 +08:00
* * *
2014-09-24 05:52:36 +08:00
2014-09-24 06:54:19 +08:00
##### text-min-distance `float`
2014-09-24 06:19:02 +08:00
2014-09-24 06:47:10 +08:00
2014-09-24 05:52:36 +08:00
Default Value: undefined
Minimum permitted distance to the next text symbolizer.
2014-09-24 06:52:24 +08:00
* * *
2014-09-24 05:52:36 +08:00
2014-09-24 06:54:19 +08:00
##### text-min-padding `float`
2014-09-24 06:19:02 +08:00
2014-09-24 06:47:10 +08:00
2014-09-24 05:52:36 +08:00
Default Value: undefined
Determines the minimum amount of padding that a text symbolizer gets relative to other text
2014-09-24 06:52:24 +08:00
* * *
2014-09-24 05:52:36 +08:00
2014-09-24 06:54:19 +08:00
##### text-min-path-length `float`
2014-09-24 06:19:02 +08:00
2014-09-24 06:47:10 +08:00
2014-09-24 05:52:36 +08:00
Default Value: 0
2014-09-24 06:19:02 +08:00
_(place labels on all paths)_
2014-09-24 05:52:36 +08:00
Place labels only on paths longer than this value.
2014-09-24 06:52:24 +08:00
* * *
2014-09-24 05:52:36 +08:00
2014-09-24 06:54:19 +08:00
##### text-allow-overlap `boolean`
2014-09-24 06:19:02 +08:00
2014-09-24 06:47:10 +08:00
2014-09-24 05:52:36 +08:00
Default Value: false
2014-09-24 06:19:02 +08:00
_(Do not allow text to overlap with other text - overlapping markers will not be shown.)_
2014-09-24 05:52:36 +08:00
Control whether overlapping text is shown or hidden.
2014-09-24 06:52:24 +08:00
* * *
2014-09-24 05:52:36 +08:00
2014-09-24 06:54:19 +08:00
##### text-orientation `float`
2014-09-24 06:19:02 +08:00
2014-09-24 06:47:10 +08:00
2014-09-24 05:52:36 +08:00
Default Value: undefined
Rotate the text.
2014-09-24 06:52:24 +08:00
* * *
2014-09-24 05:52:36 +08:00
2014-09-24 06:54:19 +08:00
##### text-placement `keyword`
2014-09-24 05:52:36 +08:00
`point``line``vertex``interior`
2014-09-24 06:47:10 +08:00
2014-09-24 05:52:36 +08:00
Default Value: point
Control the style of placement of a point versus the geometry it is attached to.
2014-09-24 06:52:24 +08:00
* * *
2014-09-24 05:52:36 +08:00
2014-09-24 06:54:19 +08:00
##### text-placement-type `keyword`
2014-09-24 05:52:36 +08:00
`dummy``simple`
2014-09-24 06:47:10 +08:00
2014-09-24 05:52:36 +08:00
Default Value: dummy
Re-position and/or re-size text to avoid overlaps. "simple" for basic algorithm (using text-placements string,) "dummy" to turn this feature off.
2014-09-24 06:52:24 +08:00
* * *
2014-09-24 05:52:36 +08:00
2014-09-24 06:54:19 +08:00
##### text-placements `string`
2014-09-24 06:19:02 +08:00
2014-09-24 06:47:10 +08:00
2014-09-24 05:52:36 +08:00
Default Value:
If "placement-type" is set to "simple", use this "POSITIONS,[SIZES]" string. See TextSymbolizer docs for format.
2014-09-24 06:52:24 +08:00
* * *
2014-09-24 05:52:36 +08:00
2014-09-24 06:54:19 +08:00
##### text-transform `keyword`
2014-09-24 05:52:36 +08:00
`none``uppercase``lowercase``capitalize`
2014-09-24 06:47:10 +08:00
2014-09-24 05:52:36 +08:00
Default Value: none
Transform the case of the characters
2014-09-24 06:52:24 +08:00
* * *
2014-09-24 05:52:36 +08:00
2014-09-24 06:54:19 +08:00
##### text-horizontal-alignment `keyword`
2014-09-24 05:52:36 +08:00
`left``middle``right``auto`
2014-09-24 06:47:10 +08:00
2014-09-24 05:52:36 +08:00
Default Value: middle
The text's horizontal alignment from its centerpoint
2014-09-24 06:52:24 +08:00
* * *
2014-09-24 05:52:36 +08:00
2014-09-24 06:54:19 +08:00
##### text-align `keyword`
2014-09-24 05:52:36 +08:00
`left``right``center`
2014-09-24 06:47:10 +08:00
2014-09-24 05:52:36 +08:00
Default Value: center
Set the text alignment.
2014-09-24 06:52:24 +08:00
* * *
2014-09-24 05:52:36 +08:00
## building
2014-09-24 06:54:19 +08:00
##### building-fill `color`
2014-09-24 06:19:02 +08:00
2014-09-24 06:47:10 +08:00
2014-09-24 05:52:36 +08:00
Default Value: #FFFFFF
The color of the buildings walls.
2014-09-24 06:52:24 +08:00
* * *
2014-09-24 05:52:36 +08:00
2014-09-24 06:54:19 +08:00
##### building-fill-opacity `float`
2014-09-24 06:19:02 +08:00
2014-09-24 06:47:10 +08:00
2014-09-24 05:52:36 +08:00
Default Value: 1
The opacity of the building as a whole, including all walls.
2014-09-24 06:52:24 +08:00
* * *
2014-09-24 05:52:36 +08:00
2014-09-24 06:54:19 +08:00
##### building-height `float`
2014-09-24 06:19:02 +08:00
2014-09-24 06:47:10 +08:00
2014-09-24 05:52:36 +08:00
Default Value: 0
The height of the building in pixels.
2014-09-24 06:52:24 +08:00
* * *
2014-09-24 05:52:36 +08:00
2014-09-26 00:24:01 +08:00
2014-09-24 05:52:36 +08:00
### Values
Below is a list of values and an explanation of any expression that can be applied to properties in CartCSS.
### Color
CartoCSS accepts a variety of syntaxes for colors - HTML-style hex values, rgb, rgba, hsl, and hsla. It also supports the predefined HTML colors names, like `yellow` and `blue`.
``` css
#line {
line-color: #ff0;
line-color: #ffff00;
line-color: rgb(255, 255, 0);
line-color: rgba(255, 255, 0, 1);
line-color: hsl(100, 50%, 50%);
line-color: hsla(100, 50%, 50%, 1);
line-color: yellow;
}
```
Especially of note is the support for hsl, which can be [easier to reason about than rgb()](http://mothereffinghsl.com/). Carto also includes several color functions [borrowed from less](http://lesscss.org/#-color-functions):
``` css
// lighten and darken colors
lighten(#ace, 10%);
darken(#ace, 10%);
// saturate and desaturate
saturate(#550000, 10%);
desaturate(#00ff00, 10%);
// increase or decrease the opacity of a color
fadein(#fafafa, 10%);
fadeout(#fefefe, 14%);
// spin rotates a color around the color wheel by degrees
spin(#ff00ff, 10);
// mix generates a color in between two other colors.
mix(#fff, #000, 50%);
```
These functions all take arguments which can be color variables, literal colors, or the results of other functions operating on colors.
### Float
Float is a fancy way of saying 'number'. In CartoCSS, you specify _just a number_ - unlike CSS, there are no units, but everything is specified in pixels.
``` css
#line {
line-width: 2;
}
```
It's also possible to do simple math with number values:
``` css
#line {
line-width: 4 / 2; // division
line-width: 4 + 2; // addition
line-width: 4 - 2; // subtraction
line-width: 4 * 2; // multiplication
line-width: 4 % 2; // modulus
}
```
### URI
URI is a fancy way of saying URL. When an argument is a URI, you use the same kind of `url('place.png')` notation that you would with HTML. Quotes around the URL aren't required, but are highly recommended. URIs can be paths to places on your computer, or on the internet.
```css
#markers {
marker-file: url('marker.png');
}
```
### String
A string is basically just text. In the case of CartoCSS, you're going to put it in quotes. Strings can be anything, though pay attention to the cases of `text-name` and `shield-name` - they actually will refer to features, which you refer to by putting them in brackets, as seen in the example below.
```css
#labels {
text-name: "[MY_FIELD]";
}
```
### Boolean
Boolean means yes or no, so it accepts the values `true` or `false`.
```css
#markers {
marker-allow-overlap:true;
}
```
### Expressions
Expressions are statements that can include fields, numbers, and other types in a really flexible way. You have run into expressions before, in the realm of 'fields', where you'd specify `"[FIELD]"`, but expressions allow you to drop the quotes and also do quick addition, division, multiplication, and concatenation from within Carto syntax.
```css
#buildings {
building-height: [HEIGHT_FIELD] * 10;
}
```
### Numbers
Numbers are comma-separated lists of one or more number in a specific order. They're used in line dash arrays, in which the numbers specify intervals of line, break, and line again.
```css
#disputedboundary {
line-dasharray: 1, 4, 2;
}
```
### Percentages
In Carto, the percentage symbol, `%` universally means `value/100`. It's meant to be used with ratio-related properties, like opacity rules.
_You should not use percentages as widths, heights, or other properties - unlike CSS, percentages are not relative to cascaded classes or page size, they're, as stated, simply the value divided by one hundred._
```css
#world {
// this syntax
polygon-opacity: 50%;
// is equivalent to
polygon-opacity: 0.5;
}
```
### Functions
Functions are comma-separated lists of one or more functions. For instance, transforms use the `functions` type to allow for transforms within Carto, which are optionally chainable.
```css
#point {
point-transform: scale(2, 2);
}
```