Changes between Version 8 and Version 9 of Help/Styles/MapCSSTutorial
- Timestamp:
- 2016-02-07T17:10:18+01:00 (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Help/Styles/MapCSSTutorial
v8 v9 76 76 In the first part of the declarations, we define a dash pattern of gray and green. Leave out the {{{dashes-background-color}}} to display a broken line with no color in between the dashes. 77 77 78 In the second part, the name of the street ('''{{{text: "name";}}}''') will be displayed along the line ('''{{{text-position: line;}}}''') with a nvertical offset of 9 px. An offset of 0 would render the text on top of the line.78 In the second part, the name of the street ('''{{{text: "name";}}}''') will be displayed along the line ('''{{{text-position: line;}}}''') with a vertical offset of 9 px. An offset of 0 would render the text on top of the line. 79 79 80 80 === Example 4 === … … 95 95 }}} 96 96 97 The '''{{{area}}}''' type selector acts on ways and multipolygon relations. The condition '''{{{[building]}}}''' applies to all objects that have the key {{{building}}} set to any value. Note that the outline of the building is painted as well, although we haven't specified any line properties. This is because JOSM will alway draw at least one line element for each way. If no line properties are found, a default line element is generated.97 The '''{{{area}}}''' type selector acts on ways and multipolygon relations. The condition '''{{{[building]}}}''' applies to all objects that have the key {{{building}}} set to any value. Note that the outline of the building is painted as well, although we haven't specified any line properties. This is because JOSM will always draw at least one line element for each way. If no line properties are found, a default line element is generated. 98 98 99 99 === Example 5 === … … 119 119 }}} 120 120 121 This shows, how you can list multiple selectors for one rule. We fill the area with a pattern, if it is tagged {{{landuse=forest}}} or {{{natural=wood}}}. The opacity is set to 0.8, where 1.0 means opaque and 0.0 is fully transparent. You can set opacity, whenever a color or an image is defined. E.g. {{{icon-opacity}}} for {{{icon-image}}} and {{{opacity}}} for {{{color}}}. A label for the object is placed in the thecenter of the area.121 This shows, how you can list multiple selectors for one rule. We fill the area with a pattern, if it is tagged {{{landuse=forest}}} or {{{natural=wood}}}. The opacity is set to 0.8, where 1.0 means opaque and 0.0 is fully transparent. You can set opacity, whenever a color or an image is defined. E.g. {{{icon-opacity}}} for {{{icon-image}}} and {{{opacity}}} for {{{color}}}. A label for the object is placed in the center of the area. 122 122 123 123 ----