[mapserver-users] How to use 01 connection for all layers in map file

Pavel Iacovlev iacovlev.pavel at gmail.com
Thu Aug 6 10:46:25 EDT 2009


As I understood the question the fact that OpenLayers makes 17*N (N
number of tiles) connections to the mapserver is a major slow down ?
Here is an example of mapserver layer usage:
http://openlayers.org/dev/examples/mapserver.html , so your request
should be something like this:
/map.map&layer=layer1&layer=layer2&mode=map
PROCESSING "CLOSE_CONNECTION=DEFER" will also help you a lot in this
case especially with oracle database that has high cost of connection
time.
So a user makes 1 request from OpenLayers, then mapserver request all
your 17 raster/vector files create an image and return it back to OL.

Jelmer Baas
Each OpenLayers WMS request is a new http request and in 1 session you
get 1 layer (openlayers -> mapserver). As I understood from docs
PROCESSING "CLOSE_CONNECTION=DEFER" will help then you have multiple
layer requests in 1 session (mapserver -> arcsde), and it will not
close the connection after a layer has been processed but after all
layers are processed and the work is done.

On Thu, Aug 6, 2009 at 12:32 PM, Mr. Bic
Phuong<bicphuongonline at yahoo.com> wrote:
>
> Your reply is really good news,
>
> Will you please to tell me details on details how can I do like you with a
> map file which has more than 17 connection now?
>
> I do not understand yet clearly how to use "single" MapServer layer for all?
>
> Thanks so much and I hope you can help me more!
>
>
>
> --- On Thu, 8/6/09, Pavel Iacovlev <iacovlev.pavel at gmail.com> wrote:
>
> From: Pavel Iacovlev <iacovlev.pavel at gmail.com>
> Subject: Re: [mapserver-users] How to use 01 connection for all layers in
> map file
> To: "Mr. Bic Phuong" <bicphuongonline at yahoo.com>
> Date: Thursday, August 6, 2009, 3:16 PM
>
> Hope I get your question right.
>
> We have around 32 layers in one of the project, the approach is rather
> simple, you just use a "single" Mapserver layer so there is always 1
> request to Mapserver from OpenLayers. The request layer is the
> combination of all your layers, the overlaying is made server side.
>
> Details:
> 1. We have a custom "layer switcher" that user selects what layers he
> wants to see and this data is saved, in a php session for example.
> 2. Then the user requests a map from a PHPMapscript(mapserver) server,
> using php you fetch all the layers selected by the user previously
> 3. Dispatch the result
>
>
>



-- 
http://iap.md, The future is open


More information about the mapserver-users mailing list