[OpenLayers-Users] Real-time image in Openlayer
ar_gaeta
riccardog79 at gmail.com
Fri Sep 2 08:37:48 EDT 2011
Hi all,
I have a problem.
I have 1 image from weather radar (file .png) that is produced every 5
minutes and copied always in the same directory with the same name. So each
new image overwrite the previous one.
I load this image as an OpenLayer.Image, because as WMS was very slow to
load:
var raster_options = {isBaseLayer: false, alwaysInRange: true, opacity: 0.6
, buffer: 0 //don't work
//, strategies: new OpenLayers.Strategy.Refresh({force: true,
interval:1000}) //don't work
};
var refresh_test = new OpenLayers.Layer.Image("Pioggia: Refresh_test",
"http://localhost:8008/mapguide/meteo/raster/refresh_test.gif",
new OpenLayers.Bounds(673593, 5307580, 1251128, 5881858)
, new OpenLayers.Size(500, 500), raster_options,
{displayInLayerSwitcher:false}
);
refresh_test.setVisibility(true);
refresh_test.redraw(true);
I've tried a lot of options:
- destroy and re-add the image to the map each 5 seconds (just to test);
- remove the layer from the map and re-add it;
- define again the url of the layer, and reload it;
- set the visibility alternatively "false/true" with the hope this could
work to refresh the image.
But nothing happens!
Could you please help me? I'll be very grateful for any help/suggestion.
If you need more information please don't hesitate to ask!
Thanks,
Riccardo
P.S.: I'm using OpenLayer 2.10 installed on my Windows 7 PC. I load the
layers inside a mapPanel.map with the help of GeoExt.
--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/Real-time-image-in-Openlayer-tp6753728p6753728.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
More information about the Users
mailing list