[OpenLayers-Users] force update markers layer

Jürgen Dankoweit Juergen.Dankoweit at T-Online.de
Thu Mar 8 13:55:34 EST 2012


Hello Jan,

Am 08.03.2012 16:43, schrieb Jan Hartmann:
> Well, first removing and then adding all markers from the markers layer
> will force the update. Not elegant, but it works.
> 
> Jan
> 
> On 03/07/2012 04:27 PM, Jan Hartmann wrote:
>> Hi,
>>
>> How do I force a redraw on a markers layer? I have a regular WMS map
>> with markers that have their lonlat-values updated from a database. I
>> can force a redraw of the WMS layer with mergenewparams(), but that is
>> not possible with the markers layer. That means that the when the
>> lonlat values are updated and I move the map, the markers remain in
>> their original positions. Only when I zoom in or out, the marker
>> positions are updated. Can I do something about that?

What about calling layer.redraw();
For my weather site I had to solve the same problem. The solution was
calling the redraw methode of the markers layer.
Look here http://www.dankoweit.de/cgi-bin/metar_karte.pl?1 and at the
source code of the page.

Juergen

-- 
Meine stets unfertige Homepage: www.dankoweit.de


More information about the Users mailing list