I'm trying to add an ArcGIS Server tiled/cached layer to OpenLayers. This is working using code modified from these samples.
The only problem is that when panning the map, the layer does not update to show data which was previously off the screen. In this example I've panned the map to the west, and the overlay data hasn't updated:
However, if I zoom (rather than pan) the layer does update. Do I need to explicitly call an update method on the layer when panning? Note that the first example script correctly updates after panning (but this is a basemap, not an overlay - does that make a difference?)
My sample code is available here. I need to hard-code the layerInfo parameters, rather than retrieving them at run-time (I obtained the values using ..../MapServer?f=json&pretty=true)
Thanks for any advice.
[EDIT: the layer does update when panning in Chrome or IE9, but not in FireFox or Opera.]
[EDIT2: if I switch the layer off then on in the moveend function, the layer correctly updates after panning in FireFox and Opera:
map.events.register("moveend", map, function() {
var lyrs = map.getLayersByName("geology");
if(lyrs.length > 0) {
lyr = lyrs[0];
lyr.setVisibility(false);
lyr.setVisibility(true);
}
});