| | 1 | |
| | 2 | == MinMaxNodes |
| | 3 | |
| | 4 | This is a simple mapstyle to enable minimal (min) or maximal (max) node sizes, compared to the default size defined by JOSM. |
| | 5 | |
| | 6 | |
| | 7 | == Use cases |
| | 8 | |
| | 9 | - **Max** nodes are handy when eg the mouse cursor is hard to control. It is now easier to grab the node to move it or do otherwise. |
| | 10 | - **Min** nodes are ideal when it is desirable to make them less visible. Eg to get a more clean overview of a large group of closely located buildings. |
| | 11 | |
| | 12 | == Usage |
| | 13 | |
| | 14 | Right click the paintstyle in the Map Paint Styles listing. There are 2 options: |
| | 15 | |
| | 16 | - **Min** |
| | 17 | - **Max** |
| | 18 | |
| | 19 | When both options are selected at the same time the default node size is enabled. |
| | 20 | |
| | 21 | {{{ |
| | 22 | #!style type="mapcss"` |
| | 23 | meta { |
| | 24 | title: "MinMaxNodes"; |
| | 25 | description: "A simple mapstyle to enable minimal (min) or maximal (max) node sizes, compared to the default size defined by JOSM"; |
| | 26 | version: "0.1.[[revision]]_[[date]]"; |
| | 27 | author: "Martien, osm username martien-176 (formerly martien-vdg)"; |
| | 28 | link: "https://josm.openstreetmap.de/wiki/Styles/MinMaxNodes"; |
| | 29 | } |
| | 30 | |
| | 31 | settings::node_width_group { |
| | 32 | label: Both options en/disabled = default width; |
| | 33 | } |
| | 34 | |
| | 35 | setting::bigger_node_width { |
| | 36 | type: boolean; |
| | 37 | label: tr("Max"); |
| | 38 | default: true; |
| | 39 | group: "node_width_group"; |
| | 40 | } |
| | 41 | |
| | 42 | setting::smaller_node_width { |
| | 43 | type: boolean; |
| | 44 | label: tr("Min"); |
| | 45 | default: true; |
| | 46 | group: "node_width_group"; |
| | 47 | } |
| | 48 | |
| | 49 | node { |
| | 50 | symbol-shape: eval( |
| | 51 | (setting("bigger_node_width") && setting("smaller_node_width")) || (!setting("bigger_node_width") && !setting("smaller_node_width")) ? |
| | 52 | square : |
| | 53 | circle |
| | 54 | ); |
| | 55 | |
| | 56 | symbol-size: eval( |
| | 57 | setting("bigger_node_width") && !setting("smaller_node_width") ? 20 : |
| | 58 | !setting("bigger_node_width") && setting("smaller_node_width") ? 0.1 : |
| | 59 | 3 |
| | 60 | ); |
| | 61 | } |
| | 62 | |
| | 63 | |
| | 64 | }}} |