Ticket #1287 (closed bug: fixed)

Opened 5 years ago

Last modified 5 years ago

Pointtrack example does not work

Reported by: rdewit Owned by:
Priority: trivial Milestone: 2.6 Release
Component: examples Version: 2.5
Keywords: Cc:
State: Complete

Description

The following patch makes it work (rss.loadRSS() added) and has a changed location for the proxy to make it work in the examples directory.

Attachments

pointtrack-example.diff Download (0.8 KB) - added by rdewit 5 years ago.
1287-r5834-A0.patch Download (1.2 KB) - added by ahocevar 5 years ago.
Alternative patch that does not use non-API functions and makes the whole example less hackish by calling layer.removeMarker() instead of setting marker.lonlat to null.
pointtrack-proxy.diff Download (0.6 KB) - added by rdewit 5 years ago.

Change History

Changed 5 years ago by rdewit

follow-up: ↓ 2   Changed 5 years ago by ahocevar

  • state changed from Review to Needs Discussion

This bug in the point-track-markers.html example was introduced by r5828, which changed the loading behavior of the GeoRSS layer.

The proposed patch is not a solution, because it uses the non-API method loadRSS to load the RSS data.

The questions now are:

  • Is it valid to use a GeoRSS layer to load features that will be used by a different layer and are modified afterwards to only be displayed for specific criteria? This is what the example currently does. It is some kind of a hack. Maybe it would be better to replace this example with that one:  http://dev.openlayers.org/sandbox/ahocevar/pointtrack/examples/point-track.html, which does not use a RSS layer at all.
  • Should r5828 be considered as an API break of Layer.GeoRSS?
  • Should Layer.GeoRSS.loadRSS be made an API method?

For myself, I would prefer to exchange the example with the other one from the sandbox. I would not consider r5828 as an API break. I rather think that the point-track-markes.html example is kind of hackish. Also, I would not make loadRSS an API method.

What do others think?

in reply to: ↑ 1   Changed 5 years ago by ahocevar

Replying to ahocevar:

For myself, I would prefer to exchange the example with the other one from the sandbox. I would not consider r5828 as an API break. I rather think that the point-track-markes.html example is kind of hackish. Also, I would not make loadRSS an API method.

Rethinking: r5828 probably is an API break. See #1269 for further discussion.

  Changed 5 years ago by crschmidt

Discussion on #1269 moved to #1273, since that's where the work was actually done: #1269 should have been marked as a dupe.

Changed 5 years ago by ahocevar

Alternative patch that does not use non-API functions and makes the whole example less hackish by calling layer.removeMarker() instead of setting marker.lonlat to null.

  Changed 5 years ago by ahocevar

  • state changed from Needs Discussion to Review

  Changed 5 years ago by crschmidt

  • state changed from Review to Commit

That looks fine -- and just so you know, example changes don't need review. Feel free to commit it.

  Changed 5 years ago by ahocevar

  • status changed from new to closed
  • state changed from Commit to Complete
  • resolution set to fixed

(In [5835]) "Pointtrack example does not work". r=crschmidt (closes #1287)

follow-up: ↓ 8   Changed 5 years ago by rdewit

  • status changed from closed to reopened
  • state changed from Complete to Review
  • resolution fixed deleted

Hi Andreas, thanks for fixing this. To make the example work out of the box for external URLs, the URL to the proxy must be changed as well. I'll add a patch for this one now.

Just a suggestion: maybe have the map zoom to the extent of the features after loading. This will make it easier to find them (if none of them have a title/description for example).

Changed 5 years ago by rdewit

in reply to: ↑ 7   Changed 5 years ago by ahocevar

Replying to rdewit:

Hi Andreas, thanks for fixing this. To make the example work out of the box for external URLs, the URL to the proxy must be changed as well. I'll add a patch for this one now.

Oh, this one must have slipped out. I could swear that I had added it...

Just a suggestion: maybe have the map zoom to the extent of the features after loading. This will make it easier to find them (if none of them have a title/description for example).

I do not want to overdo the example, so people looking at the source can see how the whole thing works without being distracted too much. I already have the filtering of "Untitled" features in it, so I'll better leave that one out.

  Changed 5 years ago by ahocevar

  • status changed from reopened to closed
  • state changed from Review to Complete
  • resolution set to fixed

(In [5836]) To make the example work out of the box for external URLs, the URL to the proxy must be changed. (closes #1287)

Note: See TracTickets for help on using tickets.