Modify

Opened 15 years ago

Closed 15 years ago

#2547 closed defect (fixed)

[patch] Audio/picture markers no longer working

Reported by: Ldp Owned by: team
Priority: major Milestone:
Component: Core Version: latest
Keywords: Cc: hampelratte

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)

gpx_link_patch.diff (3.9 KB ) - added by hampelratte 15 years ago.
test.gpx (427 bytes ) - added by RussNelson 15 years ago.
test gpx file that isn't working in SVN
test.2.gpx (472 bytes ) - added by hampelratte 15 years ago.
Fixed version of test.gpx

Download all attachments as: .zip

Change History (22)

comment:1 by SKald@…, 15 years ago

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.

comment:2 by anonymous, 15 years ago

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 by Ldp, 15 years ago

Forgot to put my nick on the previous addition.

comment:4 by stoecker, 15 years ago

Ticket #2601 has been marked as a duplicate of this ticket.

comment:5 by stoecker, 15 years ago

Resolution: fixed
Status: newclosed

Fixed in r1597.

comment:6 by rudison, 15 years ago

Resolution: fixed
Status: closedreopened

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 by stoecker, 15 years ago

Cc: hampelratte 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?

by hampelratte, 15 years ago

Attachment: gpx_link_patch.diff added

comment:8 by hampelratte, 15 years ago

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?

in reply to:  8 ; comment:9 by anonymous, 15 years ago

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).

in reply to:  9 ; comment:10 by hampelratte, 15 years ago

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.

in reply to:  10 comment:11 by rudison, 15 years ago

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 by anonymous, 15 years ago

I applied the patch with TortoiseSVN, and I have the markers back. Good work!

comment:13 by stoecker, 15 years ago

Summary: Audio/picture markers no longer working[patch] Audio/picture markers no longer working

comment:14 by stoecker, 15 years ago

Resolution: fixed
Status: reopenedclosed

In r1601.

by RussNelson, 15 years ago

Attachment: test.gpx added

test gpx file that isn't working in SVN

comment:15 by RussNelson, 15 years ago

Resolution: fixed
Status: closedreopened

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 by hampelratte, 15 years ago

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.

by hampelratte, 15 years ago

Attachment: test.2.gpx added

Fixed version of test.gpx

comment:17 by hampelratte, 15 years ago

I have attached a fixed version of test.gpx for comparison.

in reply to:  16 comment:18 by RussNelson, 15 years ago

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 by RussNelson, 15 years ago

Resolution: fixed
Status: reopenedclosed

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.