Changes between Version 3 and Version 4 of Zh_CN:Help/Styles/MapCSSImplementation
- Timestamp:
- 2024-02-20T12:32:39+01:00 (17 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Zh_CN:Help/Styles/MapCSSImplementation
v3 v4 8 8 * [wikitr:/Help/Action/Search 搜索对话框] 9 9 10 考虑在 VS code中安装 [https://marketplace.visualstudio.com/items?itemName=whammo.mapcss-syntax MapCSS 语法高亮器],为 MapCSS 绘图和验证器语法添加可视化高亮。10 另外,可以在 VS code 中安装 [https://marketplace.visualstudio.com/items?itemName=whammo.mapcss-syntax MapCSS 语法高亮器],为 MapCSS 绘图和验证器语法添加可视化高亮。 11 11 12 12 … … 1163 1163 * In [wikitr:/Rules Validator rules] they must be prefixed by a `-`, e.g.: `-osmoseItemClassLevel: "1210/1/1";` 1164 1164 1165 === Property values explanations === #Propertyvaluesexplanations1165 === 属性值解释 === #属性值解释 1166 1166 '' '''Width''' '' 1167 1167 - 14.0 (any positive number) … … 1192 1192 1193 1193 1194 == Eval expressions ==#Evalexpressions1195 See[/doc/org/openstreetmap/josm/gui/mappaint/mapcss/Functions.html#method_summary Javadoc of Functions]for the up-to-date list of functions supported by JOSM'sMapCSSimplementation.1194 == 数值表达式 ==#数值表达式 1195 请参阅 [/doc/org/openstreetmap/josm/gui/mappaint/mapcss/Functions.html#method_summary Javadoc of Functions] 获取 JOSM 的 MapCSS 实现所支持函数的最新列表。 1196 1196 1197 1197 +, -, *, /:: … … 1361 1361 returns a list of primitive ids which match the key and value (if present) [''since r18829''] 1362 1362 1363 === Examples===1364 * circle symbol for house number with size depending of the number of digits1363 === 示例 === 1364 * 表示门牌号码的圆圈符号,大小取决于位数 1365 1365 {{{ 1366 1366 #!mapcss … … 1472 1472 1473 1473 === Kothic === 1474 * Kothic has support for eval, which probably differs from JOSM's eval.1475 * Kothic understands units, whereas JOSM always calculates in pixel.1476 * The extrusion features are not available in JOSM.1474 * Kothic 支持 eval,这可能与 JOSM 的 eval 不同。 1475 * Kothic 能理解单位,而 JOSM 总是以像素为单位计算。 1476 * JOSM 中没有挤出功能。 1477 1477 1478 1478 === Ceyx === 1479 * seems to have`[tunnel=1]`instead of`[tunnel=yes]`(Halcyon) or`[tunnel?]`(JOSM)1480 1481 1482 == Media queries (deprecated)==1479 * 似乎有 `[tunnel=1]`,而不是 `[tunnel=yes]`(Halcyon)或 `[tunnel?]`(JOSM)。 1480 1481 1482 == 媒体查询(已废弃) == 1483 1483 1484 1484 {{{#!td style="background-color: #faa" 1485 Note: media queries are deprecated. You should use@supportsrules instead (see above).1486 }}} 1487 Media queries are used to skip a section of the style under certain conditions. Typically you want to use a feature which is introduced in a newer version of JOSM, but like to have a fall back style for users of older JOSM clients. This feature came with r6970. Example: 1485 注意:媒体查询已被弃用。应使用 @supports 规则(见上文)。 1486 }}} 1487 媒体查询用于在特定条件下跳过样式的某个部分。通常情况下,你想使用较新版本的 JOSM 中引入的功能,但又希望为旧版本的 JOSM 客户端用户提供一种备用样式。此功能在 r6970 中出现。例如: 1488 1488 {{{ 1489 1489 #!mapcss … … 1507 1507 }}} 1508 1508 1509 The syntax closely matches the official[https://www.w3.org/TR/css3-mediaqueries/#syntax csssyntax]. The following conditions are supported:1509 该语法与官方[https://www.w3.org/TR/css3-mediaqueries/#syntax css 语法]非常吻合。支持以下条件: 1510 1510 1511 1511 {{{#!th … … 1537 1537 }}} 1538 1538 1539 Conditions can be combined with `and`: 1539 条件可以与 "和 "结合使用: 1540 1540 1541 1541 {{{ … … 1546 1546 }}} 1547 1547 1548 Multiple combined conditions can be chained with a comma (logical ''or''): 1548 多个组合条件可以用逗号(逻辑 "或")串联起来: 1549 1549 1550 1550 {{{ … … 1555 1555 }}} 1556 1556 1557 Since media queries are only supported inJOSM 6970and later, you should also specify this as minimum JOSM version in the meta selector:1557 由于媒体查询只支持 JOSM 6970 及更高版本,因此还应在元选择器中将其指定为最低 JOSM 版本: 1558 1558 1559 1559 {{{ … … 1567 1567 1568 1568 {{{#!comment 1569 There is also the `not` keyword (see the linked css doc for details). 1570 This is implemented, but probably not very useful. Feel free to add documentation. 1571 }}} 1569 还有`not`关键字(详见链接的 css 文档)。 1570 该功能已实现,但可能用处不大。欢迎添加文档。 1571 }}}