[Mapbender-dev] Reload single WMS-Layer

Christoph Ratke ratke at geoinformationsdienst.de
Thu Jun 14 11:11:15 EDT 2007


Hey Uli,
wouldn't it make sense to adapt the function setSingleMapRequest? To
always set a different GetMap request it would be sufficient to add the
TIME parameter and assign the timestamp to it (ts=mb_timestamp(), it is
already there). Usually, if you call this setSingleMapRquest you don't
want the browser to cache your single map anyway. What do you think?

Rainer,
if you want to automatically refresh your map request you could use the 
javascript function setTimeout similar to this

var loop = true; // set this var to false to stop the loop
function functionA() {
        if (loop) {window.setTimeout("functionA", 
		<milliseconds to wait>);}
        else {top.close(); } // stop the timeout
        <call getMap or zoom function>
}
I would recommend to write your own javascript or php module

regards,
Christoph Ratke

Am Donnerstag, den 14.06.2007, 16:36 +0200 schrieb Rainer Prüller:
> Hallo Uli,
> 
> thank you for the very fast answer.
> Where would be the best location to load either the setSingleMapRequest- 
> or the zoom-function every 30 seconds? In an own php- or javascript-file 
> or within the map.php?
> 
> With best regards.
> Rainer
> 
> 
> Uli Rothstein (WhereGroup) schrieb:
> > Hallo Rainer,
> >
> > sure.
> > Your have to call setSingleMapRequest(frameName,wms_id) every 30 sec.
> > (setSingleMapRequest('mapframe1',<your wms id>))
> > The wms_id is displayed at your gui-wms settings.
> > But you will have trouble with the browser cache.
> > It's better to zoom a little bit, so the map-URL is different to the 
> > earlier request. But in this case, both services will be reloaded...
> > (example: zoom('mapframe1',true,0.999999);)
> >
> > regards
> > Uli
> >
> >
> > Rainer Prüller schrieb:
> >> Is it possible to reload just one single WMS-layer in my 
> >> Mapbender-application? I have two WMS-Layers in my project, the first 
> >> is the background (a raster layer) the second one the foreground 
> >> (from postgis) which shows the positions of moving objects. This 
> >> layer should be refreshed every 30 seconds. How could this be done?
> >>
> >> With best regards.
> >> Rainer
> >>
> >> _______________________________________________
> >> Mapbender_dev mailing list
> >> Mapbender_dev at lists.osgeo.org
> >> http://lists.osgeo.org/mailman/listinfo/mapbender_dev
> >
> >
> 
> _______________________________________________
> Mapbender_dev mailing list
> Mapbender_dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapbender_dev
-- 
Christoph Ratke <ratke at geoinformationsdienst.de>
Geoinformationsdienst GmbH



More information about the Mapbender_dev mailing list