[mapserver-users] WMS layer swapping according to scale

Gracia Fernández López graciafdez at gmail.com
Tue Nov 9 06:28:10 EST 2010


Hello Rahkonen,

Thanks for answering so quickly. I had already proved that, but I had
obtained a warning in the GetCapabilities request and I didn't have
realized that it was working.

Do you know how I can solve the warning?:

<Layer>
      <Name>group</Name>
<!-- WARNING: Mandatory metadata '..._GROUP_TITLE' was missing in this
context. -->
      ...
      <Layer queryable="1" opaque="0" cascaded="0">
        <Name>layer1</Name>
        ...
      </Layer>
      <Layer queryable="0" opaque="0" cascaded="0">
        <Name>layer2</Name>
        ....
      </Layer>
 </Layer>

Also, I have read in
http://www.mail-archive.com/mapserver-users@lists.umn.edu/msg02321.html
that there can be problems with the GetFeatureInfo query. ¿Does anyone
know what these problems are?

Thank you again for your help.

--
Regards
Gracia

El día 9 de noviembre de 2010 10:39, Rahkonen Jukka
<Jukka.Rahkonen at mmmtike.fi> escribió:
> Hi,
>
> Layers cannot have a same name in WMS. Use different names for layers and put them under the same GROUP. Use GROUP in WMS requests. Layers could look like
>
> LAYER
>        GROUP "group"
>        NAME "close"
>        STATUS ON
>        DATA "close.shp"
>        TYPE POLYGON
>        MAXSCALEDENOM  60000
>        METADATA
>              "wms_title"    "close"
>          END
> END
> LAYER
>         GROUP "group"
>         NAME "far"
>         STATUS ON
>         DATA "far.shp"
>         TYPE POINT
>         MINSCALEDENOM 60000
>         METADATA
>              "wms_title"    "far"
>         END
> END
>
> -Jukka Rahkonen-
>
> Gracia Fernández López wrote:
>>
>> Hello,
>>
>> I want to replace the polygon representations in a layer by markers
>> when the zoom is out of a scale level.
>>
>> To do that, I have defined two layers in Mapserver to represent the
>> same objects: one of them is a Polygon, and the other one is a Point
>> (centroid), and I want to swap one for the other depending on the
>> scale.
>>
>> With the Mapserver queries, I had defined the same name for both
>> layers and it worked well. Now I need to do the same with WMS queries,
>> but neither I can assign the same name to the layers (if I do that
>> they are changed automatically), nor use the GROUP option (I obtain a
>> warning with GetCapabilities). I also tried using the parameter
>> wms_group_layer, but it puts a common title but not a common name, so
>> I can not query the group in the LAYERS param.
>>
>> Do anyone knows how to solve this issue in Mapserver? Or do I have to
>> do that in the viewer side?
>>
>> Thanks in advance for any help.
>>
>> --
>> Regards
>> Gracia
>> _______________________________________________
>> mapserver-users mailing list
>> mapserver-users at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>>
>


More information about the mapserver-users mailing list