Skip to content

Commit 2de0929

Browse files
authored
Merge pull request #167 from dch0ph/v4.2.0-additions
V4.2.0 additions
2 parents e2ec376 + 9353902 commit 2de0929

2 files changed

Lines changed: 91 additions & 11 deletions

File tree

4.2.0/reference.json

Lines changed: 87 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "3.1.0",
2+
"version": "4.2.0",
33
"style": {
44
"filter-mode": {
55
"type": [
@@ -127,7 +127,7 @@
127127
"type":"string",
128128
"required" : true,
129129
"default-meaning": "No layer name has been provided",
130-
"doc": "The name of a layer. Can be anything you wish and is not strictly validated, but ideally unique in the map."
130+
"doc": "The name of a layer. Can be anything you wish and is not strictly validated, but ideally unique in the map."
131131
},
132132
"srs": {
133133
"css": "srs",
@@ -215,6 +215,58 @@
215215
"default-meaning": "Features are not cached between rendering multiple styles. The datasource is queried for each style.",
216216
"doc": "Setting this to `on` triggers Mapnik to attempt to cache features in memory for rendering when (and only when) a layer has multiple styles attached to it."
217217
}
218+
"comp-op": {
219+
"css": "comp-op",
220+
"default-value": "src-over",
221+
"default-meaning": "add the current layer on top of other layers",
222+
"doc": "Composite operation (added version 4). This defines how this layer should behave relative to layers atop or below it. See https://github.com/mapnik/mapnik/pull/3474.",
223+
"type": [
224+
"clear",
225+
"src",
226+
"dst",
227+
"src-over",
228+
"dst-over",
229+
"src-in",
230+
"dst-in",
231+
"src-out",
232+
"dst-out",
233+
"src-atop",
234+
"dst-atop",
235+
"xor",
236+
"plus",
237+
"minus",
238+
"multiply",
239+
"divide",
240+
"screen",
241+
"overlay",
242+
"darken",
243+
"lighten",
244+
"color-dodge",
245+
"color-burn",
246+
"linear-dodge",
247+
"linear-burn",
248+
"hard-light",
249+
"soft-light",
250+
"difference",
251+
"exclusion",
252+
"contrast",
253+
"invert",
254+
"invert-rgb",
255+
"grain-merge",
256+
"grain-extract",
257+
"hue",
258+
"saturation",
259+
"color",
260+
"value"
261+
]
262+
},
263+
"opacity": {
264+
"css": "opacity",
265+
"type": "float",
266+
"doc": "An alpha value for the layer (added version 4), which means an alpha applied to all features in separate buffer and then composited back to the overall buffer for the current layer or nested set of layers.",
267+
"default-value": 1.0,
268+
"default-meaning": "No separate buffer will be used and no alpha will be applied to the layer after rendering."
269+
}
218270
},
219271
"symbolizers" : {
220272
"map": {
@@ -625,6 +677,16 @@
625677
"range": "0-1",
626678
"doc": "Smooths out geometry angles. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries."
627679
},
680+
"smooth-algorithm": {
681+
"css": "line-smooth-algorithm",
682+
"type": ["basic",
683+
"adaptive"
684+
],
685+
"expression":true,
686+
"default-value": "basic",
687+
"default-meaning": "The geometry will be simplified using the original non-adaptive algorithm.",
688+
"doc": "Set the alogorithm used to smooth geometries (added version 4). `adaptive` will increase the number of interpolation points at sharper bends, leading to more realistic smoothing."
689+
},
628690
"offset": {
629691
"css": "line-offset",
630692
"type": "float",
@@ -707,7 +769,7 @@
707769
"expression":true
708770
}
709771
},
710-
"markers": {
772+
"marker": {
711773
"default": {
712774
"css": "marker",
713775
"type": [
@@ -772,12 +834,13 @@
772834
"line",
773835
"interior",
774836
"vertex-first",
775-
"vertex-last"
837+
"vertex-last",
838+
"angled-point"
776839
],
777840
"expression":true,
778841
"default-value": "point",
779842
"default-meaning": "Place markers at the center point (centroid) of the geometry.",
780-
"doc": "Attempt to place markers on a point, in the center of a polygon, or if markers-placement:line, then multiple times along a line. 'interior' placement can be used to ensure that points placed on polygons are forced to be inside the polygon interior. The 'vertex-first' and 'vertex-last' options can be used to place markers at the first or last vertex of lines or polygons."
843+
"doc": "'point' placement attempts to place a marker at the center point (centroid) of the geometry (i.e. halfway along line geometries). 'line' attempts multiple placements along a line. 'interior' placement ensures that a marker placed on a polygon will be inside the polygon interior. 'vertex-first' and 'vertex-last' place a marker at either the first or last vertex of lines or polygons. 'angled_point' (added version 4) behaves as 'point', but angles the marker to match the orientation of the (middle) segment it is placed on."
781844
},
782845
"multi-policy": {
783846
"css": "marker-multi-policy",
@@ -859,6 +922,15 @@
859922
"expression":true,
860923
"default-meaning": "In the case of marker-placement:line then draw a marker every 100 pixels along a line."
861924
},
925+
"spacing-offset": {
926+
"css": "marker-spacing-offset",
927+
"doc": "Offset used in `line` placement (added version 4). Markers will be offset from default starting position of half the `spacing` parameter. Note feature may be unstable on short lines, see https://github.com/mapnik/mapnik/issues/4214.",
928+
"default-value": 0.0,
929+
"type": "float",
930+
"expression":true,
931+
"default-meaning": "Markers will not be offset from normal positions with `line` placement."
932+
"status": "experimental"
933+
},
862934
"max-error": {
863935
"css": "marker-max-error",
864936
"type": "float",
@@ -1358,7 +1430,7 @@
13581430
},
13591431
"placement-type": {
13601432
"css": "shield-placement-type",
1361-
"doc": "Re-position and/or re-size shield to avoid overlaps. \"simple\" for basic algorithm (using shield-placements string,) \"dummy\" to turn this feature off.",
1433+
"doc": "Re-position and/or re-size shield to avoid overlaps. \"simple\" for basic algorithm (using shield-placements string,) \"dummy\" to turn this feature off. The `list` placement type is not supported by CartoCSS.",
13621434
"type": [
13631435
"dummy",
13641436
"simple",
@@ -2476,7 +2548,7 @@
24762548
},
24772549
"placement-type": {
24782550
"css": "text-placement-type",
2479-
"doc": "Re-position and/or re-size text to avoid overlaps. \"simple\" for basic algorithm (using text-placements string,) \"dummy\" to turn this feature off.",
2551+
"doc": "Re-position and/or re-size text to avoid overlaps. \"simple\" for basic algorithm (using text-placements string,) \"dummy\" to turn this feature off. The `list` placement type is not supported by CartoCSS.",
24802552
"type": [
24812553
"dummy",
24822554
"simple",
@@ -2667,6 +2739,14 @@
26672739
"default-meaning": "Default set of typographic features recommended by OpenType specification. Ligatures are turned off by default when `character-spacing` is greater than zero.",
26682740
"doc": "Comma separated list of OpenType typographic features. The syntax and semantics conforms to `font-feature-settings` from W3C CSS."
26692741
},
2742+
"lang": {
2743+
"css": "text-lang",
2744+
"type": "string",
2745+
"expression": true
2746+
"default-value": "",
2747+
"default-meaning": "No explicit shaping control of CJK characters.",
2748+
"doc": "Allows explicit shaping control of CJK characters by passing qualifiers such as `zh-Hant` (added version 4)."
2749+
},
26702750
"largest-bbox-only": {
26712751
"css": "text-largest-bbox-only",
26722752
"type": "boolean",

index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ var versions = [
2020
'3.0.6',
2121
'3.0.20',
2222
'3.0.22',
23-
'3.1.0'
23+
'4.2.0'
2424
];
2525

2626
// These older versions don't have the datasource info
@@ -99,9 +99,9 @@ var loadBrowser = function (version) {
9999
'ref': require('./3.0.22/reference.json'),
100100
'datasources': require('./3.0.22/datasources.json').datasources
101101
},
102-
'3.1.0': {
103-
'ref': require('./3.1.0/reference.json'),
104-
'datasources': require('./3.1.0/datasources.json').datasources
102+
'4.2.0': {
103+
'ref': require('./4.2.0/reference.json'),
104+
'datasources': require('./4.2.0/datasources.json').datasources
105105
}
106106
};
107107

0 commit comments

Comments
 (0)