I also posted this question on stackoverflow.

I successfully overlaid a WMS layer in google maps v3, however, as the information on tiles is black on transparent, it is not well seen on dark background (like satellite map), see some tile for example:


(This was the WMS link to retrieve that tile)

Question: how to modify the above WMS request to change the foreground color (currently black) to some custom color (e.g. red)? In other words, how to style the layer? The server is apparently able to do it for this layer, since it is possible to do it via their web map application (which works in IE only), where you can select the color. See this map image for example:

enter image description here

(The following link was used to retrieve the image - note that it contains scale and logo, so it's not a proper tile.)

Unfortunately, this web application doesn't use WMS to get this styled map so I can't just copy the styling parameters to WMS request. I must do the styling via the WMS request (because this other request format is proprietary, retrieves whole map - not designed for tiles - and it doesn't seem to support WGS coordinates).

How shall I do it?

I tried to:

  1. look at the WMS documentation, especially version 1.1.1
  2. look at the SLDs, but it seems pretty complex thing to grasp...
  3. look at the GetCapabilities command output for the WMS server
  4. Also, having look at DescribeLayer and GetStyles command outputs for my desired layer (HLMCR) I don't even know if this layer will support styling over WMS.
  • 1
    I have posted an answer over at SO. Please note this way of cross posting, while it might be not in violation of any of the site rules, should not be used. A better solution would have been to ask a site admin to move the question over here at GIS.SE.
    – unicoletti
    Commented Dec 3, 2011 at 10:42
  • @unicoletti, I don't want to move it, since I might get useful answers at SO too. Moreover, I placed a bounty there.
    – Tomas
    Commented Dec 3, 2011 at 10:48
  • It's possible if the server has been configured to allow it. You must supply an SLD either by reference (url to an SLD file in a location that the remote server can access) using the SLD parameter, or supply the SLD using the SLD_BODY parameter. Styles can be additive to the existing style, or you can apply a completely new style.
    – nmtoken
    Commented Jan 6, 2023 at 14:45

2 Answers 2


You really need to learn about SLD (yes I know it looks complex but it's quiet simple really) I'd start with http://docs.geoserver.org/stable/en/user/styling/sld/cookbook/index.html. Even if it doesn't work out with this server if you intent to play with styling WMS layers it is the only game in town. Once you have a rough idea of what you want get and read the standard.

You need to check if the server you are interested in can consume remote SLDs (check the getCapabilities response for the "UserDefinedSymbolization" ).

Another option might be to fetch the data as a WFS and style it in your server (or client) but it looks like a raster to me.


To help you grasp the SLD language, you could download the installer for GeoServer at geoserver.org and use the Styler tool. It'll allow you go visually manipulate your styles and save the SLD.

I'd suggest you create a simple SLD and peruse the XML so you gain an understanding of SLD.

I used this method to help me understand SLD.

Good luck!

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.