Modify ↓
#17120 closed enhancement (fixed)
[RFC][PATCH] Include shop=gas in the presets
Reported by: | naoliv | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | 18.12 |
Component: | Internal preset | Version: | |
Keywords: | Cc: | GerdP |
Description
Include shop=gas
-
data/defaultpresets.xml
diff --git a/data/defaultpresets.xml b/data/defaultpresets.xml index 9a369d809..8f0814ef7 100644
a b 9880 9880 <reference ref="name_operator_oh_wheelchair" /> 9881 9881 <reference ref="link_contact_address_payment" /> 9882 9882 </item> <!-- Paint --> 9883 <item name="Gas" icon="presets/shop/gas.svg" type="node,closedway,multipolygon" preset_name_label="true"> 9884 <link href="https://wiki.openstreetmap.org/wiki/Tag:shop=gas" 9885 cs.href="https://wiki.openstreetmap.org/wiki/Cs:Tag:shop=gas" 9886 de.href="https://wiki.openstreetmap.org/wiki/DE:Tag:shop=gas" 9887 es.href="https://wiki.openstreetmap.org/wiki/ES:Tag:shop=gas" 9888 ja.href="https://wiki.openstreetmap.org/wiki/JA:Tag:shop=gas" 9889 pl.href="https://wiki.openstreetmap.org/wiki/Pl:Tag:shop=gas" 9890 pt.href="https://wiki.openstreetmap.org/wiki/Pt:Tag:shop=gas" 9891 ru.href="https://wiki.openstreetmap.org/wiki/RU:Tag:shop=gas" /> 9892 <space /> 9893 <key key="shop" value="gas" /> 9894 <reference ref="name_operator_oh_wheelchair" /> 9895 <reference ref="link_contact_address_payment" /> 9896 </item> <!-- Gas --> 9883 9897 <separator/> 9884 9898 <item name="Travel Agency" icon="presets/shop/travel_agency.svg" type="node,closedway,multipolygon" preset_name_label="true"> 9885 9899 <link href="https://wiki.openstreetmap.org/wiki/Tag:shop=travel_agency" -
styles/standard/elemstyles.mapcss
diff --git a/styles/standard/elemstyles.mapcss b/styles/standard/elemstyles.mapcss index ec8555515..a365d2c65 100644
a b node[shop=frame] { 2117 2117 icon-image: "presets/shop/frame.svg"; 2118 2118 set icon_z17; 2119 2119 } 2120 node[shop=gas] { 2121 icon-image: "presets/shop/gas.svg"; 2122 set icon_z17; 2123 } 2120 2124 node[shop=gift] { 2121 2125 icon-image: "presets/shop/present.svg"; 2122 2126 set icon_z17;
SVG is attached and was sketched out by me (so you can consider it CC0 and/or PD, choose what's best and modify as needded).
Attachments (2)
Change History (10)
by , 5 years ago
comment:1 by , 5 years ago
Milestone: | → 18.12 |
---|
comment:2 by , 5 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:3 by , 5 years ago
Thanks for the patch! Some small things I changed:
- added the rendering for areas
- changed floating viewbox values of the icon to integer numbers (causes resizing and therefore unsharp icons, see wiki:/DevelopersGuide/DefaultPresets)
- changed the size from 16x16 to 16x11
- pixelaligned back the upper part as it became unsharp by the viewbox values fix.
Here are the adjustment steps of the icon:
by , 5 years ago
comment:6 by , 5 years ago
Wait, we considered "gas" to be a mispelled value?
/** * Check for misspelled value. * @throws IOException if any I/O error occurs */ @Test public void testShortValNotInPreset2() throws IOException { final List<TestError> errors = test(OsmUtils.createPrimitive("node shop=gas")); assertEquals(1, errors.size()); assertEquals("Presets do not contain property value", errors.get(0).getMessage()); assertEquals("Value 'gas' for key 'shop' not in presets.", errors.get(0).getDescription()); assertEquals(Severity.OTHER, errors.get(0).getSeverity()); assertFalse(errors.get(0).isFixable()); }
Note:
See TracTickets
for help on using tickets.
In 14575/josm: