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.
 
http://trac.osgeo.org/openlayers/wiki/HowToContribute
 
Arnd
 
  _____  

Von: [email protected]
[mailto:[email protected]] Im Auftrag von Bartlomiej
Burkot
Gesendet: Freitag, 9. März 2012 08:43
Cc: [email protected]
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?
http://dev.openlayers.org/releases/OpenLayers-2.11/doc/apidocs/files/OpenLay
ers/Strategy/BBOX-js.html
http://dev.openlayers.org/docs/files/OpenLayers/Strategy/BBOX-js.html#OpenLa
yers.Strategy.BBOX.resFactor
Why is difference between this docs?

Bartek




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

Arnd


  _____  

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


Hello,

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: http://mapakrakow.pl/pogoda/test.php
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:
weather_points_layer.refresh({force:true}); 
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
OpenLayers.Strategy.Refresh()], 

but both didn't helped.
I fond this article:
http://stackoverflow.com/questions/2995238/how-to-refresh-reload-a-kml-layer
-in-openlayers-dynamic-kml-layer
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.

Jan

On 03/07/2012 04:45 PM, [email protected] wrote: 


Is this working? 
vectorLayer.redraw(true);





Jan Hartmann  <mailto:[email protected]>
<[email protected]>@lists.osgeo.org 
Envoyé par : [email protected] 


2012-03-07 10:27 


A
[email protected]        

cc

        

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


        
        






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?

Jan_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users






 

_______________________________________________

Users mailing list

[email protected]

http://lists.osgeo.org/mailman/listinfo/openlayers-users



_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users

Reply via email to