Merge branch 'master' of github.com:mapbox/mess.js

This commit is contained in:
Tom MacWright 2011-02-07 11:06:37 -05:00
commit 5ab5d38a26
3 changed files with 117 additions and 34 deletions

View File

@ -30,7 +30,7 @@ tree.FontSet.prototype.toXML = function(env) {
+ this.name
+ '">\n'
+ this.fonts.map(function(f) {
return ' <Font face_name="' + f +'"/>';
return ' <Font face-name="' + f +'"/>';
}).join('\n')
+ '\n</FontSet>'
};

View File

@ -1,4 +1,50 @@
{
"style": {
"name": {
},
"filter-mode": {
}
},
"meta-writer": {
"name": {
},
"type": {
},
"file": {
},
"default-output": {
},
"output-empty": {
}
},
"font-set": {
"name": {
},
"font": {
"face-name": {
}
}
},
"layer" : {
"name": {
},
"srs": {
},
"status": {
},
"title": {
},
"abstract": {
},
"minzoom": {
},
"maxzoom": {
},
"queryable": {
},
"clear-label-cache": {
}
},
"symbolizers" : {
"map": {
"background-color": {
@ -12,6 +58,43 @@
"css": "background-image",
"type": "uri",
"description": "Map Background image"
},
"srs": {
"css": "srs",
"type": "string",
"description": "Map spatial reference (proj4 string)"
},
"buffer-size": {
"css": "buffer",
"api": "buffer-size",
"type": "uri",
"default-value": "0",
"default-meaning": "No buffer will be used",
"description": "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'."
},
"paths-from-xml": {
"css": "",
"api": "",
"default-value": "true",
"default-meaning": "Paths read from XML will be interpreted from the location of the XML",
"type": "boolean",
"doc": "value to control whether paths in the XML will be interpreted from the location of the XML or from the working directory of the program that calls load_map()"
},
"minimum-version": {
"css": "",
"api": "",
"default-value": "none",
"default-meaning": "Mapnik version will not be detected and no error will be thrown about compatibility",
"type": "string",
"doc": "The minumum Mapnik version (e.g. 0.7.2) needed to use certain functionality in the stylesheet"
},
"font-directory": {
"css": "font-directory",
"type": "uri",
"api": "",
"default-value": "none",
"default-meaning": "No fonts will be registered",
"doc": "Path to a directory which holds fonts which should be registered when the Map is loaded"
}
},
"polygon": {
@ -123,6 +206,16 @@
}
},
"markers": {
"file": {
"css": "marker-file",
"type": "uri"
},
"opacity": {
"css": "marker-opacity",
"default-value": 1,
"default-meaning": "opaque",
"type": "float"
},
"stroke": {
"css": "marker-line-color",
"type": "color"
@ -163,17 +256,7 @@
"css": "marker-fill",
"type": "color"
},
"opacity": {
"css": "marker-opacity",
"default-value": 1,
"default-meaning": "opaque",
"type": "float"
},
"file": {
"css": "marker-file",
"type": "uri"
},
"allow_overlap": {
"allow-overlap": {
"css": "marker-allow-overlap",
"type": "boolean",
"default-value": "false",
@ -184,7 +267,7 @@
"docs": "Space between repeated labels",
"type": "float"
},
"max_error": {
"max-error": {
"css": "marker-max-error",
"type": "float"
},
@ -210,7 +293,7 @@
"type": "none",
"required": true
},
"face_name": {
"face-name": {
"css": "shield-face-name",
"type": "string",
"validate": "font",
@ -227,7 +310,7 @@
"type": "color",
"doc": "The color of the shield text"
},
"minimum_distance": {
"minimum-distance": {
"css": "shield-min-distance",
"type": "float",
"default-value": 0,
@ -239,13 +322,13 @@
"default-value": 0,
"doc": "The spacing between repeated occurrences of the same shield on a line"
},
"character_spacing": {
"character-spacing": {
"css": "shield-spacing",
"type": "float",
"default-value": 0,
"doc": "Horizontal spacing between characters (in pixels). Currently works for point placement only, not line placement."
},
"line_spacing": {
"line-spacing": {
"css": "shield-line-spacing",
"doc": "Vertical spacing between lines of multiline labels (in pixels)",
"type": "float"
@ -309,13 +392,13 @@
"type": "string",
"default-value": ""
},
"shield_dx": {
"shield-dx": {
"css": "shield-dx",
"type": "float",
"doc": "Displace shield by fixed amount, in pixels, +/- along the X axis. A positive value will shift the shield right",
"default-value": 0
},
"shield_dx": {
"shield-dx": {
"css": "shield-dx",
"type": "float",
"doc": "Displace shield by fixed amount, in pixels, +/- along the Y axis. A positive value will shift the shield down",
@ -449,7 +532,7 @@
"default-meaning": "auto-detected",
"doc": "The type of image file, e.g. png"
},
"allow_overlap": {
"allow-overlap": {
"css": "point-allow-overlap",
"type": "boolean",
"default-value": "false",
@ -481,7 +564,7 @@
"type": "string",
"required": true
},
"face_name": {
"face-name": {
"css": "text-face-name",
"type": "string",
"validate": "font",
@ -500,7 +583,7 @@
"type": "float",
"type": "none"
},
"wrap_width": {
"wrap-width": {
"css": "text-wrap-width",
"doc": "Length of a chunk of text in characters before wrapping text",
"type": "float"
@ -510,23 +593,23 @@
"type": "float",
"doc": "Distance between repeated text labels on a line"
},
"character_spacing": {
"character-spacing": {
"css": "text-character-spacing",
"type": "float",
"default-value": 0,
"doc": "Horizontal spacing adjustment between characters in pixels"
},
"line_spacing": {
"line-spacing": {
"css": "text-line-spacing",
"default-value": 0,
"type": "float",
"doc": "Vertical spacing adjustment between lines in pixels"
},
"label_position_tolerance": {
"label-position-tolerance": {
"css": "text-label-position-tolerance",
"type": "float"
},
"max_char_angle_delta": {
"max-char-angle-delta": {
"css": "text-max-char-angle-delta",
"type": "float",
"default-value": "none",
@ -538,7 +621,7 @@
"default-value": "#000000",
"type": "color"
},
"halo_fill": {
"halo-fill": {
"css": "text-halo-fill",
"docs": "Color of the text halo",
"type": "color",
@ -546,7 +629,7 @@
"default-meaning": "white",
"doc": "Specifies the color of the halo around the text."
},
"halo_radius": {
"halo-radius": {
"css": "text-halo-radius",
"doc": "Specify the radius of the halo in pixels",
"default-value": 0,
@ -565,20 +648,20 @@
"doc": "Displace text by fixed amount, in pixels, +/- along the Y axis. A positive value will shift the text down",
"default-value": 0
},
"avoid_edges": {
"avoid-edges": {
"css": "text-avoid-edges",
"doc": "Tell positioning algorithm to avoid labeling near intersection edges.",
"type": "boolean"
},
"minimum_distance": {
"minimum-distance": {
"css": "text-min-distance",
"type": "float"
},
"minimum_padding": {
"minimum-padding": {
"css": "text-min-padding",
"type": "float"
},
"allow_overlap": {
"allow-overlap": {
"css": "text-allow-overlap",
"type": "boolean",
"default-value": "false",
@ -594,7 +677,7 @@
],
"default-value": "point"
},
"text_transform": {
"text-transform": {
"css": "text-transform",
"type": [
"none",

View File

@ -58,7 +58,7 @@ tree.Rule.prototype.toXML = function(env) {
return '';
} else if (tree.Reference.isFont(this.name) && this.value.value.length > 1) {
var f = tree._getFontSet(env, this.value.value);
return 'fontset_name="' + f.name + '"';
return 'fontset-name="' + f.name + '"';
} else {
return tree.Reference.selectorName(this.name) +
'="' +