<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hello,<br>
<br>
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.<br>
The vectorlayer use bbox strategy and protocol HTTP:<br>
<br>
weather_points_layer = new OpenLayers.Layer.Vector("Wetterpunkte", {<br>
<br>
strategies: [new OpenLayers.Strategy.BBOX({ratio:
1.1})], <br>
<br>
protocol: new OpenLayers.Protocol.HTTP({<br>
url: "text_layer_generator/weather_points.php"<br>
..<br>
})<br>
});<br>
<br>
The script: weather_points.php limits the number of points using
bbox parameter and LIMIT statement in sql query.<br>
There is the working example: <a class="moz-txt-link-freetext" href="http://mapakrakow.pl/pogoda/test.php">http://mapakrakow.pl/pogoda/test.php</a><br>
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.<br>
<br>
Running this command:<br>
weather_points_layer.refresh({force:true}); <br>
in firebug console Openlayers requests and refreshes the data from
server correctly and shows points over Berlin.<br>
I tryed to change cache-control headers in weather_points.php:<br>
<br>
#header("Cache-Control: max-age=2"); // HTTP/1.1<br>
#header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); // Date in the
past<br>
#header("Pragma: Cache"); // required <br>
//header("connection: close");<br>
//Keep-Alive timeout=2, max=100<br>
<br>
and add the refresh strategy:<br>
strategies: [new OpenLayers.Strategy.BBOX({ratio: 1.1}), new
OpenLayers.Strategy.Refresh()], <br>
<br>
but both didn't helped.<br>
I fond this article:
<a class="moz-txt-link-freetext" href="http://stackoverflow.com/questions/2995238/how-to-refresh-reload-a-kml-layer-in-openlayers-dynamic-kml-layer">http://stackoverflow.com/questions/2995238/how-to-refresh-reload-a-kml-layer-in-openlayers-dynamic-kml-layer</a><br>
But I don't need to refresh vectorlayer in constant time interval
but every time when user manipulates the map.<br>
<br>
Has someone experience how to solve this problem?<br>
Thanks for your help.<br>
<br>
Bartlomiej Burkot<br>
<br>
<br>
W dniu 2012-03-07 16:56, Jan Hartmann pisze:
<blockquote cite="mid:4F578549.2020309@uva.nl" type="cite">
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
<font face="Times New Roman, Times, serif">No, it tried that.
According to the documentation, the redraw function does not
take a parameter.<br>
<br>
Jan<br>
</font><br>
On 03/07/2012 04:45 PM, <a moz-do-not-send="true"
class="moz-txt-link-abbreviated"
href="mailto:Steve.Toutant@inspq.qc.ca">Steve.Toutant@inspq.qc.ca</a>
wrote:
<blockquote
cite="mid:OF955F754E.8928EC6B-ON852579BA.005669C4-852579BA.00568C82@isn.rtss.qc.ca"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=UTF-8">
<br>
<font size="2" face="sans-serif">Is this working?</font> <br>
<font size="2" face="sans-serif">vectorLayer.redraw(true);<br>
</font> <br>
<br>
<br>
<br>
<table width="100%">
<tbody>
<tr valign="top">
<td width="40%"><font size="1" face="sans-serif"><b>Jan
Hartmann <a moz-do-not-send="true"
class="moz-txt-link-rfc2396E"
href="mailto:j.l.h.hartmann@uva.nl"><j.l.h.hartmann@uva.nl></a>@lists.osgeo.org</b>
</font> <br>
<font size="1" face="sans-serif">Envoyé par : <a
moz-do-not-send="true"
class="moz-txt-link-abbreviated"
href="mailto:openlayers-users-bounces@lists.osgeo.org">openlayers-users-bounces@lists.osgeo.org</a></font>
<p><font size="1" face="sans-serif">2012-03-07 10:27</font>
</p>
</td>
<td width="59%">
<table width="100%">
<tbody>
<tr valign="top">
<td>
<div align="right"><font size="1"
face="sans-serif">A</font></div>
</td>
<td><font size="1" face="sans-serif"><a
moz-do-not-send="true"
class="moz-txt-link-abbreviated"
href="mailto:openlayers-users@lists.osgeo.org">openlayers-users@lists.osgeo.org</a></font>
</td>
</tr>
<tr valign="top">
<td>
<div align="right"><font size="1"
face="sans-serif">cc</font></div>
</td>
<td> <br>
</td>
</tr>
<tr valign="top">
<td>
<div align="right"><font size="1"
face="sans-serif">Objet</font></div>
</td>
<td><font size="1" face="sans-serif">[Polluriel
potentiel] [OpenLayers-Users] force update
markers layer</font></td>
</tr>
</tbody>
</table>
<br>
<table>
<tbody>
<tr valign="top">
<td> <br>
</td>
<td><br>
</td>
</tr>
</tbody>
</table>
<br>
</td>
</tr>
</tbody>
</table>
<br>
<br>
<br>
<br>
<br>
<font size="3" face="Times New Roman">Hi,<br>
<br>
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?<br>
<br>
Jan</font><tt><font size="2">_______________________________________________<br>
Users mailing list<br>
<a moz-do-not-send="true" class="moz-txt-link-abbreviated"
href="mailto:Users@lists.osgeo.org">Users@lists.osgeo.org</a><br>
<a moz-do-not-send="true" class="moz-txt-link-freetext"
href="http://lists.osgeo.org/mailman/listinfo/openlayers-users">http://lists.osgeo.org/mailman/listinfo/openlayers-users</a><br>
</font></tt> <br>
<br>
<br>
</blockquote>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.osgeo.org">Users@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/openlayers-users">http://lists.osgeo.org/mailman/listinfo/openlayers-users</a>
</pre>
</blockquote>
<br>
</body>
</html>