diff --git a/TextSymbolizer.md b/TextSymbolizer.md index e752a73..0fa7d35 100644 --- a/TextSymbolizer.md +++ b/TextSymbolizer.md @@ -84,8 +84,11 @@ The first parameter is the field name of a database field, or from a shape file, You must load the needed fonts first, otherwise you'll get a run time error. But you can load as many true type fonts as you like. Mapnik is coming with a couple of fonts in "mapnik/fonts". I recommend to load all of this fonts, regardless if you need them or not. ## Placements -In Mapnik 2 the possibility to try different placements if the text can't be placed at the intended position is introduced. Currently only one algorithm ("simple") is implemented. +In Mapnik 2 the possibility to try different placements if the text can't be placed at the intended position is introduced. +Algorithms: +### Simple +(This is the only algorithm supported in Mapnik 2.0) It expects a string to specify which positions and size should be used. The format is POSITIONS,[SIZES]. POSITIONS is any combination of N, E, S, W, NE, SE, NW, SW (direction) and X (exact position as give by "displacement") (separated by commas, may not be empty). @@ -115,8 +118,21 @@ An XML example might look like: />[label] ``` +### List +Here a list of styles is defined and tried one by one till a valid position is found. Each style inherits from the previous one. + +It is defined in XML by: +```xml +[name] + + [abbreviated_name] + [nr] + +``` +(Note [abbreviated_name] and [nr] have to be supplied by the data source!) + ## New syntax -Starting with r3354 Mapnik2 supports a new syntax: +Starting with Mapnik 2.0 a new syntax is used: ```xml