Automatisches Aktualisieren von POI oder Openlayers-Markern

ich habe das Beispiele auf http://wiki.openstreetmap.org/wiki/Openlayers_POI_layer_example gelesen und gut anpassen können. Ich bekomme per GPS verschiedene Fahrzeugpositionen und kann die in einer Textdatei speichern und die werden dann mit Ikonen auf der Karte dargestellt. Wenn ich die Seite neu lade, sieht man auch die neuen Positionen.
Nun meine Frage, da habe ich trotz langem Suchen nach Beispielen ein Brett vor dem Kopf: wie kann meine Internetseite (das o.g. Beispiel) nur die Marker aktualisieren, statt immer die ganze Karte neu zu laden, also nur den Layer Pois?
Ich habe beispiele gefunden, wie Leute die POIs an- und ausschalten, aber keines, wie die Internetseite z.B. 5 Sekunden nur die POIs aktualisiert, ohne den aktuellen Zoom und Ausschnitt zu ändern, die man vielleicht gerade selbst im Browser geändert hat.

Ich habe leider wohl von Internetseiten zuwenig Ahnung, aber kann man aus einem anderen Frame vielleicht auf eine Karte zugreifen? Man müsste ja nur den layer Pois löschen und neu erzeugen. Geht sowas ?

Und natürlich irgendwie regelmäßig…

Danke und Gruß - Thomas

Moderator edit: Please only post in English here. The German subforum is here

So you want a reread of the textfile with pois?

Well I don’t know how to accomplish this.

The used code from the openlayers exemple is following:

var pois = new OpenLayers.Layer.Text( “My Points”,
{ location:“./textfile.txt”,
projection: map.displayProjection
});
map.addLayer(pois);

If I were you I would try following first.

Place a button on that webpage and in on click let it execute following javascript code.

pois = new OpenLayers.Layer.Text( “My Points Extra”,
{ location:“./textfile.txt”,
projection: map.displayProjection
});

If that does not work then try

pois = new OpenLayers.Layer.Text( “My Points Extra”,
{ location:“./textfile.txt”,
projection: map.displayProjection
});
map.addLayer(pois);

maybe you can find a removeLayer() function?

Thanx a lot, that was the right option to begin testing. I made buttons and they worked.

Then I found out how to repeat:
I start a javascript function which calls itself (“settimeout”) with “onload” and now the textfile (filled by a GPS-application) can change regularily and the cars are displayed properly.

I hope - tonight only simulated by different textfiles.

Thx

Thomas