[OpenLayers-Users] Overlay dont "refresh" with setcenter forcezoom.

Jonke jonke at bt.nu
Sun Aug 26 05:07:05 EDT 2007


I really like openlayers.

However I have problem with the automatic refresh of a overlay (that is a
layer that is not a baselayer).
I have read thorough all the examples and I especially the one with the
Webcam. 

However I start by describing the setup.

I have a baselayer (a big one with many layers in it served by GeoServer)
changes very rare.

I have a almost realtime dataset with 1 000 000 items, changes very
frequently (300 000 changes every 30s), this is setup as a transperent
overlay with the isbaselayer: false. ( We can call this layer for overlay)

Both the baselayer and overlay have the tiled attribute set (not a
tiledcache as a backend but just a vanilla geoserver).


When I scroll and pan and use the zoomin zoomout with the Mouse, the overlay
is properly refreshed and everything is fine.

When I try to do this javascript wise to get a "automatic refresh" (with a
map.setCenter or layer.moveTo and the forcezoom to true), then I only see
the old overlay that seems to have been cached somewhere (and it is not by
the geoserver). I have tried different things, "zoomOut();zoomIn();" and
"removelayer(overlay);addlayer(overlay)" with no luck.

Could it be that the layers are tiled and as long as I am in the same tile a
new request to the geoserver is not spawned?

I've read the openlayers source but I can't pinpoint where the decision to
retrieve or not retrieve data from the geoserver is done.

I tried to remove the tiled attribute for the overlay but that seem to do
not what I intended but to download a very large tile of my overlay and
still not updateing using center, moveto.

But here comes the 'scratch my head' part, if I with firefox open two tabs
to the same url where my openlayers are and switch back and fort between
them, then the center method works with both layers having the tiled
attribute. If I stay in one tab I don't see any change of my overlay, if I
go to the next tab the overlay is refreshed and then I go back to the first
tab the overlay is refreshed.

If someone can point me to the "right way" todo this with many geometries I
will gladly test another approach.

Regards.
-- 
View this message in context: http://www.nabble.com/Overlay-dont-%22refresh%22-with-setcenter-forcezoom.-tf4327410.html#a12324516
Sent from the OpenLayers Users mailing list archive at Nabble.com.




More information about the Users mailing list