Opened 18 months ago

Closed 18 months ago

Last modified 17 months ago

#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


Include shop=gas

  • data/defaultpresets.xml

    diff --git a/data/defaultpresets.xml b/data/defaultpresets.xml
    index 9a369d809..8f0814ef7 100644
    a b  
    98809880            <reference ref="name_operator_oh_wheelchair" />
    98819881            <reference ref="link_contact_address_payment" />
    98829882        </item> <!-- Paint -->
     9883        <item name="Gas" icon="presets/shop/gas.svg" type="node,closedway,multipolygon" preset_name_label="true">
     9884            <link href=""
     9885                  cs.href=""
     9886                  de.href=""
     9887                  es.href=""
     9888                  ja.href=""
     9889                  pl.href=""
     9890                  pt.href=""
     9891                  ru.href="" />
     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 -->
    98839897        <separator/>
    98849898        <item name="Travel Agency" icon="presets/shop/travel_agency.svg" type="node,closedway,multipolygon" preset_name_label="true">
    98859899            <link href=""
  • 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] { 
    21172117    icon-image: "presets/shop/frame.svg";
    21182118    set icon_z17;
     2120node[shop=gas] {
     2121    icon-image: "presets/shop/gas.svg";
     2122    set icon_z17;
    21202124node[shop=gift] {
    21212125    icon-image: "presets/shop/present.svg";
    21222126    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)

gas.svg (2.3 KB) - added by naoliv 18 months ago.
03.gif (644 bytes) - added by Klumbumbus 18 months ago.

Download all attachments as: .zip

Change History (10)

Changed 18 months ago by naoliv

Attachment: gas.svg added

comment:1 Changed 18 months ago by Klumbumbus

Milestone: 18.12

comment:2 Changed 18 months ago by Klumbumbus

Resolution: fixed
Status: newclosed

In 14575/josm:

fix #17120 - add shop=gas (patch by naoliv, icon by naoliv, modified, CC0 and PD licensed)

comment:3 Changed 18 months ago by Klumbumbus

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:

Changed 18 months ago by Klumbumbus

Attachment: 03.gif added

comment:4 Changed 18 months ago by naoliv

Thank you!

comment:5 Changed 17 months ago by Don-vip

We have TagCheckerTest.testShortValNotInPreset2 failing since r14575.

comment:6 Changed 17 months ago by Don-vip

Wait, we considered "gas" to be a mispelled value?

     * Check for misspelled value.
     * @throws IOException if any I/O error occurs
    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());

comment:7 Changed 17 months ago by Don-vip

Cc: GerdP added

Added in r14571 :) Please find a new value for the test :)

comment:8 Changed 17 months ago by GerdP

In 14579/josm:

see #17120: fix unit test: shop=gas was added to presets, use shop=abs instead

Hope this will never make it into the presets...

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.