Opened 4 years ago
Closed 4 years ago
#2547 closed defect (fixed)
[patch] Audio/picture markers no longer working
| Reported by: | Ldp | Owned by: | team |
|---|---|---|---|
| Priority: | major | Component: | Core |
| Version: | latest | Keywords: | |
| Cc: | henrik.niehaus@… |
Description
I'm not getting clickable buttons for audio and image markers anymore. Tested with 1580/1583. The last version I have here that gives me the buttons is 1566 (I no longer have any intermediate versions), and #2464 and r1572 are the only things I saw that had something to do with the buttons/preferences.
For reference, my waypoints, working in every recent version until sometime after 1566:
<wpt lat="xx" lon="xx"><ele>-7</ele><time>2009-04-05T16:08:22Z</time><name>voice</name><link href="20090405_180816.wav" /></wpt>
<wpt lat="xx" lon="xx"><ele>-8</ele><time>2009-04-05T16:12:41Z</time><name>picture</name><link href="\20090405_181228.jpg" /></wpt>
I do get text labels for them, which shows me that they are parsed correctly.
Attachments (3)
Change History (22)
comment:1 Changed 4 years ago by SKald@…
comment:2 Changed 4 years ago by anonymous
I didn't think to mention the java version before, since it was still working with 1566.
I'm on Windows XP SP3 with Sun Java 6 Update 13 (JRE).
comment:3 Changed 4 years ago by Ldp
Forgot to put my nick on the previous addition.
comment:4 Changed 4 years ago by stoecker
Ticket #2601 has been marked as a duplicate of this ticket.
comment:5 Changed 4 years ago by stoecker
- Resolution set to fixed
- Status changed from new to closed
Fixed in r1597.
comment:6 Changed 4 years ago by rudison
- Resolution fixed deleted
- Status changed from closed to reopened
Changing the if statement doesn't fully solve the problem. Now we have a "meta.links" attribute, but for the Marker Layer we need a "link" attribute. Is it possible to revert to this section (before patch 2214)?
} else if (currentState != state.link) {
Map<String, Object> attr = getAttr();
if (!attr.containsKey("link")) {
attr.put("link", new LinkedList<GpxLink>());
}
((Collection<GpxLink>) attr.get("link")).add(currentLink);
}
comment:7 Changed 4 years ago by stoecker
- Cc henrik.niehaus@… added
Actually it is probably better to fix MarkerLayer to use Gpxdata.META_LINKS. Henrik, you know your changes better to do so. Could you have a look through src/org/openstreetmap/josm/data/gpx/ and src/org/openstreetmap/josm/gui/layer/ if there need to be other related changes?
Changed 4 years ago by Henrik Niehaus <henrik.niehaus@…>
comment:8 follow-up: ↓ 9 Changed 4 years ago by Henrik Niehaus <henrik.niehaus@…>
I have search over the project and replaced remaining strings where applicable. @rudison: Could you please try the attached patch and confirm, that it works again?
comment:9 in reply to: ↑ 8 ; follow-up: ↓ 10 Changed 4 years ago by anonymous
Replying to Henrik Niehaus <henrik.niehaus@…>:
How can I apply the patch? I tried it with TortoiseSVN (Explorer Plugin), but it was not successful. (TortoiseMerge with an empty window appeared).
comment:10 in reply to: ↑ 9 ; follow-up: ↓ 11 Changed 4 years ago by Henrik Niehaus <henrik.niehaus@…>
Replying to anonymous:
Replying to Henrik Niehaus <henrik.niehaus@…>:
How can I apply the patch? I tried it with TortoiseSVN (Explorer Plugin), but it was not successful. (TortoiseMerge with an empty window appeared).
Sounds like Windows. You can use Eclipse to apply the patch or if you don't use eclipse, you may also do the changes manually. There are only a few lines of code to change. Just open the patch file, it's pretty self-descriptive.
comment:11 in reply to: ↑ 10 Changed 4 years ago by rudison
Replying to Henrik Niehaus <henrik.niehaus@…>:
Sounds like Windows. You can use Eclipse to apply the patch or if you don't use eclipse, you may also do the changes manually. There are only a few lines of code to change. Just open the patch file, it's pretty self-descriptive.
I tried to apply the patch with eclipse but a message appeared: "Patch file does not contain a valid patch." Maybe my eclipse (version 3.3.0) is too old.
I made the changes manually. Now everything seems to work fine. Thanks!
comment:12 Changed 4 years ago by anonymous
I applied the patch with TortoiseSVN, and I have the markers back. Good work!
comment:13 Changed 4 years ago by stoecker
- Summary changed from Audio/picture markers no longer working to [patch] Audio/picture markers no longer working
comment:14 Changed 4 years ago by stoecker
- Resolution set to fixed
- Status changed from reopened to closed
In r1601.
comment:15 Changed 4 years ago by RussNelson
- Resolution fixed deleted
- Status changed from closed to reopened
I've attached a test.gpx file which I expect should work. It doesn't. The <link> throws an exception. I tried renaming it to <meta.links>, which doesn't throw an exception, but it's not recognized as an audio link either.
comment:16 follow-up: ↓ 18 Changed 4 years ago by Henrik Niehaus <henrik.niehaus@…>
The attached GPX file, ist not a valid GPX 1.0 file. Even, if I handle it as 1.1, as it looks like, it's not valid, because the <link> tag has a mandatory attribute href, which is missing in your file, So, this is more a problem/bug of makegpx, than of JOSM.
comment:17 Changed 4 years ago by Henrik Niehaus <henrik.niehaus@…>
I have attached a fixed version of test.gpx for comparison.
comment:18 in reply to: ↑ 16 Changed 4 years ago by RussNelson
Replying to Henrik Niehaus <henrik.niehaus@…>:
The attached GPX file, ist not a valid GPX 1.0 file. Even, if I handle it as 1.1, as it looks like, it's not valid, because the <link> tag has a mandatory attribute href, which is missing in your file, So, this is more a problem/bug of makegpx, than of JOSM.
Aha! Okay, well, it *used* to work, hence my confusion. I've modified my program producing the gpx and now it work. Thanks, Henrik!
comment:19 Changed 4 years ago by RussNelson
- Resolution set to fixed
- Status changed from reopened to closed



I can confirm on this.
As described above it works on a linux system with sun-java 1.5.x with ver. 1566 and not with the latest one (as described above). Whats interesting is that, on a WinXP box with sun jdk 1.6.x it doesnt work with 1566 neither. The last version i have that show the captions and the markers for links in waypoints is 1546.