Changes between Version 103 and Version 104 of Help/Styles/MapCSSImplementation
- Timestamp:
- 2015-12-29T00:20:26+01:00 (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Help/Styles/MapCSSImplementation
v103 v104 890 890 == Style settings == 891 891 892 [[Help/Dialog/MapPaint #Stylesettings|Styles settings]] are used to provide the user settings to customize a mappaint style. The user can use them in the MapPaint dialog. Style settings are availible since r7450. The internal style provides style settings since r7454. Note that there are plans to extend the implementation of style settings (currently there are only boolean values supported), so the mapcss syntax for style settings could change in the future (see #10435).892 [[Help/Dialog/MapPaint/StyleSettings|Styles settings]] are used to provide the user settings to customize a mappaint style. The user can use them in the MapPaint dialog. Style settings are availible since r7450. The internal style provides style settings since r7454. Note that there are plans to extend the implementation of style settings (currently there are only boolean values supported), so the mapcss syntax for style settings could change in the future (see #10435). 893 893 894 894 create a setting: … … 1167 1167 Get value from the JOSM advanced preferences. This way you can offer certain options to the user and make the style customizable. It works with strings, numbers, colors and boolean values. [[br]][This function exists since version 3856, but with some restrictions. `JOSM_pref` always returns a string, but in version 7237 and earlier, the automatic conversion of string to boolean and color was not working. You can use the following workarounds for boolean values and color in version 7237 and earlier: `cond(JOSM_pref("myprefkey", "true")="true", "X", "O")` and `html2color(JOSM_pref("mycolor", "#FF345611"))`. These explicit conversions should be no longer necessary in version 7238 and later. Automatic conversion to a number works in any version.] 1168 1168 setting() [''since 7450'']:: 1169 to use a [[Help/Styles/MapCSSImplementation #Stylesettings|style setting]]1169 to use a [[Help/Styles/MapCSSImplementation/StyleSettings|style setting]] 1170 1170 degree_to_radians() [''since 8260'']:: 1171 1171 returns a in degree given direction in radians