On Wednesday, September 1, 2010, Mulone <[email protected]> wrote:
>
> Hi all,
>
> I'm struggling with a peculiar set up: we have a WMS layer in OpenLayers
> (within a GeoExt web interface) invoking a MapServer string (e.g.
> http://mydomain/cgi-bin/mapserv.exe?map=someMapFile.map&etcetc).
> Now we need to split the dataset into several layers.
> We tried by instanciating n separate WMS layers and it's way too slow, so
> we're trying a pretty simple solution: generating a custom mapFile
> containing only the required layers. This dynamic mapfile is returned by a
> service:
> http://mydomain/myservice/get?layers=listoflayers,otherparams,etc that
> returns the path to the custom mapfile. This solution is very simple and
> efficient.
> So now we should update the WMS layer in order to replace this mapfile on
> the fly, without reloading the whole page.
> So my questions are:
> - Is this possible?

Yes, you can use mergeNewParams for that.

wmsLayer.mergeNewParams({map: <path_to_mapfile>});

-- 
Eric Lemoine

Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex

Tel : 00 33 4 79 44 44 96
Mail : [email protected]
http://www.camptocamp.com
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users

Reply via email to