2

In MapServer, I want to show a polygon WMS layer (watersheds). I want to show the boundaries (outlines) of the polygons as a non-transparent thick line. And I want to show the inside (fill) of the polygons with 50% transparency. Is this possible?

I tried to set OPACITY 50, but this changes the transparency of both the outline and the fill. The second option I tried was to set TYPE line, but this shows the fill as complete transparent and the GetFeatureInfo no longer works by clicking inside the polygon.

What I would like to get, is: The outlines of my polygons have 0% transparency. The fill of my polygons has 50% transparency.

5

You should use two different STYLE blocks, one for the fill and one for the stroke:

CLASS
 STYLE
  OUTLINECOLOR r g b #stroke
  WIDTH 3
 END     
 STYLE
  COLOR r g b #fill
  OPACITY 50
 END
END

Ordering is important, you'll get different visual results if you swap the order of the STYLE blocks.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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