AW: [MAPSERVER-USERS] Hiding overviews

Pål Kristensen pal.kristensen at statkart.no
Tue Mar 25 08:22:09 EDT 2008


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
> 
> 

-- 
View this message in context: http://www.nabble.com/Hiding-overviews-tp15845320p16274328.html
Sent from the Mapserver - User mailing list archive at Nabble.com.



More information about the mapserver-users mailing list