Modify

Opened 5 years ago

Closed 5 years ago

Last modified 5 years 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

Description

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="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 -->
    98839897        <separator/>
    98849898        <item name="Travel Agency" icon="presets/shop/travel_agency.svg" type="node,closedway,multipolygon" preset_name_label="true">
    98859899            <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] {  
    21172117    icon-image: "presets/shop/frame.svg";
    21182118    set icon_z17;
    21192119}
     2120node[shop=gas] {
     2121    icon-image: "presets/shop/gas.svg";
     2122    set icon_z17;
     2123}
    21202124node[shop=gift] {
    21212125    icon-image: "presets/shop/present.svg";
    21222126    set icon_z17;

Icon:
https://i.imgur.com/CQeCtH1.png

Preset:
https://i.imgur.com/zWPZx8P.png

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 5 years ago.
03.gif (644 bytes ) - added by Klumbumbus 5 years ago.

Download all attachments as: .zip

Change History (10)

by naoliv, 5 years ago

Attachment: gas.svg added

comment:1 by Klumbumbus, 5 years ago

Milestone: 18.12

comment:2 by Klumbumbus, 5 years ago

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 by Klumbumbus, 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 Klumbumbus, 5 years ago

Attachment: 03.gif added

comment:4 by naoliv, 5 years ago

Great!
Thank you!

comment:5 by Don-vip, 5 years ago

We have TagCheckerTest.testShortValNotInPreset2 failing since r14575.

comment:6 by Don-vip, 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());
    }

comment:7 by Don-vip, 5 years ago

Cc: GerdP added

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

comment:8 by GerdP, 5 years ago

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
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.