0

I have two layers defined in a mapfile, for displaying either polygons or points dependent on a query parameter of the accessing WMS Request.

Is it possible to combine them in a UNION layer or something similar?

In a way that the WMS Request request only one Layer, not both?

1 Answer 1

2

I'm assuming by requesting "only one layer" you mean using one parameter rather than a list of "LAYERS=mylayer,mylayer2" you can use wms_layer_group and then request using "LAYERS=mygroup":

LAYER
  NAME "mylayer"
  DATA "mylayer"
  TYPE LINE
  CLASS
    STYLE
      COLOR 100 100 255
    END
  END
  METADATA
   "WMS_LAYER_GROUP" "/mygroup"
  END
END

LAYER
  NAME "mylayer2"
  DATA "mylayer2"
  TYPE POLYGON
  CLASS
    STYLE
      COLOR 100 100 255
    END
  END
  METADATA
   "WMS_LAYER_GROUP" "/mygroup"
  END

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.