AW: [OpenLayers-Users] How to make Openlayers to request thevector data every manipulation of map

Arnd Wippermann arnd.wippermann at
Fri Mar 9 11:33:45 EST 2012

Hi Bartek,
keep in mind, that OpenLayers is an Open Source Project. 
Many people have spend their free time to develop OpenLayers
and it's up to them, how they spend their free time.
But it's possible for everyone to contribute to OpenLayers.

Von: openlayers-users-bounces at
[mailto:openlayers-users-bounces at] Im Auftrag von Bartlomiej
Gesendet: Freitag, 9. März 2012 08:43
Cc: users at
Betreff: Re: AW: [OpenLayers-Users] How to make Openlayers to request
thevector data every manipulation of map

Perfectly Arnd

why couldn't I find this option in official apidoc?
Why is difference between this docs?


maybe adding the param resFactor to the BBOX.Strategy will solve your
strategies: [new OpenLayers.Strategy.BBOX({ratio: 1.1, resFactor:1})], 



Von: openlayers-users-bounces at
[mailto:openlayers-users-bounces at] Im Auftrag von Bartlomiej
Gesendet: Donnerstag, 8. März 2012 16:57
An: openlayers-users at
Betreff: [OpenLayers-Users] How to make Openlayers to request the vector
data every manipulation of map


I think I have exactly the same problem. I have vector layer with many
points-markers. I need to limit the number of fetched points from server
becouse of performance.
The vectorlayer use bbox strategy and protocol HTTP:

weather_points_layer = new OpenLayers.Layer.Vector("Wetterpunkte", {
                strategies: [new OpenLayers.Strategy.BBOX({ratio: 1.1})], 

                protocol: new OpenLayers.Protocol.HTTP({
                    url: "text_layer_generator/weather_points.php"

The script: weather_points.php limits the number of points using bbox
parameter and LIMIT statement in sql query.
There is the working example:
When I zoomin the points are not fetched from server but from browser cache.
Problem is that when you zoomin to - for example  Berlin - you don't see any
points. There is not any request in firebug fetching the data.

Running this command:
in firebug console Openlayers requests and refreshes the data from server
correctly and shows points over Berlin.
I tryed to change cache-control headers in weather_points.php:

#header("Cache-Control: max-age=2"); // HTTP/1.1
#header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); // Date in the past
#header("Pragma: Cache"); // required 
//header("connection: close");
//Keep-Alive    timeout=2, max=100

and add the refresh strategy:
strategies: [new OpenLayers.Strategy.BBOX({ratio: 1.1}), new

but both didn't helped.
I fond this article:
But I don't need to refresh vectorlayer in constant time interval but every
time when user manipulates the map.

Has someone experience how to solve this problem?
Thanks for your help.

Bartlomiej Burkot

W dniu 2012-03-07 16:56, Jan Hartmann pisze: 

No, it tried that. According to the documentation, the redraw function does
not take a parameter.


On 03/07/2012 04:45 PM, Steve.Toutant at wrote: 

Is this working? 

Jan Hartmann  <mailto:j.l.h.hartmann at>
<j.l.h.hartmann at> 
Envoyé par : openlayers-users-bounces at 

2012-03-07 10:27 

openlayers-users at 	



[Polluriel potentiel]  [OpenLayers-Users] force update markers layer	



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?

Users mailing list
Users at



Users mailing list

Users at

-------------- next part --------------
An HTML attachment was scrubbed...

More information about the Users mailing list