AW: [MAPSERVER-USERS] Hiding overviews

Daniel Morissette dmorissette at mapgears.com
Tue Mar 25 07:42:32 PDT 2008


I had a quick look at this thread and it seems to me at first that using 
GROUP in all layers corresponding to the same set of overviews should 
allow you to turn all of them on/off at once.

With respect to this proposed change, I don't see why it would be needed 
since the layer.name is optional and if omitted in your layer in the 
mapfile will simply be omitted in the GetCapabilities, giving the 
behavior that you are looking for. The wms_name is a metadata used by 
CONNECTIONTYPE WMS only AFAIK, it should not be used by the WMS server 
code unless I'm mistaken.

I'll have a deeper look and try to better understand the problem and get 
back to you all.

Daniel


Pål Kristensen wrote:
> Hi! 
> 
> Did you commit this change in the MapServer trunk? 
> 
> PS! Has any of you developers seen this thread, and would it be feasible to
> add the patch to the trunk?
> 
> 
> 
> 
> Eichner, Andreas - SID-NLK wrote:
>>  
>>
>> Ok guys. I examined the situation and came to the conclusion that it is
>> a bug in MapServer.
>> In the source of mapserver v5.0.2, file mapwms.c, line 1071:
>>
>>> msOWSPrintEncodeParam(stdout, "LAYER.NAME", lp->name, OWS_WARN,
>>>                          "        <Name>%s</Name>\n", NULL);
>> should really be
>>
>>> msOWSPrintEncodeMetadata(stdout, &(lp->metadata), "MO", "name",
>> OWS_NOERR,
>>>                         "        <Name>%s</Name>\n", NULL);
>> since the code conflicts with the comment in the code on line 1747 in
>> the same file which states:
>>   "Layer Name is optional but title is mandatory."
>> Which exactly agrees with the specs which states at page 25 of v1.3.0:
>>
>> "7.2.4.6.2 Title
>> A <Title> is mandatory for all layers; ..." and
>>
>> "7.2.4.6.3 Name
>> If, and only if, a layer has a <Name>, then it is a map layer that can
>> be requested by using that Name in the LAYERS parameter of a GetMap
>> request. A Layer that contains a <Name> element is referred to as a
>> "named layer" in this International Standard. If the layer has a Title
>> but no Name, then that layer is only a category title for all the layers
>> nested within. A server that advertises a Layer containing a Name
>> element shall be able to accept that Name as the value of LAYERS
>> argument in a GetMap request and return the corresponding map. A client
>> shall not attempt to request a layer that has a Title but no Name."
>>
>> IMHO this means you can ommit the <Name> but have to provide the
>> <Title>. And if the layer has no name it can simply not be requested in
>> a GetMap-Request. If I change the code like above I have to provide a
>> "wms_name" in the METADATA part of the MAP file to make the layer
>> queryable. If I ommit "wms_name" then the layer get's no <Name> and can
>> therefore not be requested by the client. IMHO it's then up to the
>> server whether or not to render that layer which is exactly what I want.
>> For overviews I want multiple layers where only one is active for a
>> given scale but which one is up to the server. Therefore a client should
>> not be able to explicitly request one of them. Instead I group those
>> layers in a named layer by a GROUP clause.
>>
>> So please check this out. May be we should file a bug report on that.
>> But I think someone else should confirm this...
>>
>>
>> Best regards,
>>
>> Andreas Eichner
>>  
>> _______________________________________________
>> mapserver-users mailing list
>> mapserver-users at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>>
>>
> 


-- 
Daniel Morissette
http://www.mapgears.com/



More information about the MapServer-users mailing list