OpenLayers OpenLayers

Ticket #1064 (new feature)

Opened 1 year ago

Last modified 4 months ago

Refresh GeoRSS layer

Reported by: thijsbrentjens Assigned to: crschmidt
Priority: critical Milestone: 2.8 Release
Component: Layer.GeoRSS Version: SVN
Keywords: Cc:
State: Needs More Work

Description

Add a refresh-function (or something similar) to OpenLayers.Layer.GeoRSS.

Such a refresh function should: 1. clear all current features 2. reload the GeoRSS-feed 3. redraw all features.

I've created a patch for this (against SVN revision 4844). The code might need some improvements, since I'm a bit new to OpenLayers. So maybe someone can check...

The patch also adds the properties title, link and description to the data-property of each (GeoRSS-)feature. These properties might be useful, for example when writing the feed's properties to a table.

Attachments

GeoRSS.patch (2.4 kB) - added by thijsbrentjens on 10/05/07 09:13:18.
Patch, refresh GeoRSS layer

Change History

10/05/07 09:13:18 changed by thijsbrentjens

  • attachment GeoRSS.patch added.

Patch, refresh GeoRSS layer

10/05/07 11:01:05 changed by ianmayo

Is there any merit in adding processing for a or "category" attribute of each entry. OpenLayers could then plot an icon representing that type of event. For instance, if we had fall, camp_out and puncture category values for entries in a georss feed representing an off-road-biking journey we could show fall.png, camp_out.png and puncture.png icons at those locations.

Alternatively an implementation could choose to use a lookup table of category versus image to use.

I've just looked, and there is a category attribute at the item level in RSS2.0

10/08/07 03:01:30 changed by thijsbrentjens

Adding the category is a good idea and is easy to do. Using different markers per category is a bit more work. Besides "category", "pubDate" (in RSS) is used a lot in feeds as well. And could be fun to have. I haven't got time now, but might look into that later.

10/08/07 12:30:52 changed by crschmidt

  • keywords changed from refresh to review.

I think that the two comments on this ticket are great, but two things:

  • They should not be in this ticket, which is about refreshing the GeoRSS Layer
  • Please *do not* do further work on parsing *inside* Layer.GeoRSS -- instead, do it in Format.GeoRSS, which will be the way forward for parsing GeoRSS. (See #1025)

07/04/08 02:52:12 changed by euzuro

  • milestone set to 2.7 Release.

tim, is the vector-behaviour work going to take care of this?

if so, please mark this a duplicate with reference to that ticket.

(moving to 2.7 to force a response to my question)

07/28/08 15:15:56 changed by euzuro

  • priority changed from minor to critical.

07/29/08 20:01:46 changed by crschmidt

  • state changed from Review to Needs More Work.
  • milestone changed from 2.7 Release to 2.8 Release.

This refresh patch has a couple problems.

  1. The 'adding a cache-busting parameter' code does not work cleanly on URLs like "/georss.xml?type=foo' -- it will add ?currenttime=2008-blah to the 'type', messing up that parameter.

2. The caching stuff should be optional (since ideally that should be handled on the server) 3. The patch has other things in it that shouldn't be there (and won't apply any more) 4. The new way to do this is actually pretty simple: layer.loaded=false; layer.url = 'foo'; layer.loadRSS();

Given this, I'm bumping out of 2.8 unless someone offers a cleaned up patch to improve these things.