Opened 11 years ago
Last modified 8 years ago
#11510 closed defect
Custom icons in presets don't show up — at Version 2
| Reported by: | Owned by: | team | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Core | Version: | |
| Keywords: | template_report | Cc: | stoecker |
Description (last modified by )
What steps will reproduce the problem?
- Create a basic preset with one or many custom icons
- Add the preset to JOSM (and restart)
- Use the created preset from the preset menu
What is the expected result?
New set of items with the specified icon (from the XML)
What happens instead?
No custom icons show up, only those already in JOSM (internal resources)
Please provide any additional information below. Attach a screenshot if possible.
When run from a terminal, this is the output:
C:\Program Files (x86)\JOSM>java -jar josm-tested.jar ERROR: Failed to locate image '30.png' WARNING: Could not get presets icon 30.png ERROR: Failed to locate image '40.png' WARNING: Could not get presets icon 40.png ERROR: Failed to locate image 'maxspeed_icon.svg' ERROR: Failed to locate image '50.png' WARNING: Could not get presets icon 50.png WARNING: Mappaint style "standard" (Maxspeed) icon "maxspeed_icon.svg" not found . ERROR: Failed to locate image '60.png' WARNING: Could not get presets icon 60.png ERROR: Failed to locate image '70.png' WARNING: Could not get presets icon 70.png ERROR: Failed to locate image '80.png' WARNING: Could not get presets icon 80.png ERROR: Failed to locate image '90.png' WARNING: Could not get presets icon 90.png ERROR: Failed to locate image '100.png' WARNING: Could not get presets icon 100.png ERROR: Failed to locate image '110.png' WARNING: Could not get presets icon 110.png ERROR: Failed to locate image '120.png' WARNING: Could not get presets icon 120.png ERROR: Failed to locate image '130.png' WARNING: Could not get presets icon 130.png INFO: loading plugin 'turnrestrictions' (version 31034) INFO: loading plugin 'PicLayer' (version 31114)
where you can see that the icons failed to load, despite it saying on the JOSM wiki that icons are stored/read relative to the path of the XML for the mapstyle/preset. Using absolute paths in the XML file solved this problem, but that is not a good solution. You can also see that the Maxspeed mapstyle failed to load its icon, which is strange considering I've made no changes whatsoever to it and installed it from the list of mapstyles in JOSM.
A typical entry in my custom preset looks like this:
<item name="30 km/h" icon="30.png" type="way,closedway"> <key key="maxspeed" value="30" /> </item>
where the icon 30.png is located in the same folder as the preset XML file.
Revision: 8339 Repository Root: http://josm.openstreetmap.de/svn Relative URL: ^/trunk Last Changed Author: stoecker Last Changed Date: 2015-05-07 17:30:43 +0200 (Thu, 07 May 2015) Build-Date: 2015-05-08 01:31:23 URL: http://josm.openstreetmap.de/svn/trunk Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b Last Changed Rev: 8339 Identification: JOSM/1.5 (8339 en) Windows 7 64-Bit Memory Usage: 382 MB / 3634 MB (135 MB allocated, but free) Java version: 1.8.0_31, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM Plugins: - PicLayer (31114) - turnrestrictions (31034) Last errors/warnings: - W: Could not get presets icon 120.png - E: Failed to locate image '130.png' - W: Could not get presets icon 130.png - E: Failed to locate image 'maxspeed_icon.svg' - W: Mappaint style "standard" (Maxspeed) icon "maxspeed_icon.svg" not found.
Change History (2)
comment:1 by , 11 years ago
comment:2 by , 11 years ago
| Description: | modified (diff) |
|---|



Btw: do you know that the JOSM default style renders the actual value of maxspeed as maxspeed sign?