Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to add halos on my labels on an Openlayers map.

I have tried adding the following to my code but no halos display.

labelHaloColor: "#FFFFFF",
labelHaloWidth: "2",

I got that from here:

Do I need to use a newer version of OpenLayers to get this working? I am currently using the dev version.

share|improve this question
up vote 2 down vote accepted

The ticket's status is in "Needs Discussion", they are still working on this and the only way you can use this feature would be to install the patch. However, reading the last post you can see there are still bugs in it and they are "working on it". (in quotes because it's a minor priority and you could be waiting for a while.)

Alternatively, depending on the length of the content you put in there, you might be able to use a background graphic like such:

enter image description here

strokeColor: "#00FF00",
strokeOpacity: 0.7,
strokeWidth: 3,
fillColor: "#FF5500",
fillOpacity: 0.7,
pointRadius: 12,
pointerEvents: "visiblePainted",
//Supported values include “circle”, “square”, “star”, “x”, “cross”, and “triangle”.
graphicName: "circle",
label: "${order}",
fontColor: "#000000",
fontSize: "16px",
fontFamily: "Courier New, monospace",
fontWeight: "bold",
//Valid values for horizontal alignment: “l”=left, “c”=center, “r”=right.  
//Valid values for vertical alignment: “t”=top, “m”=middle, “b”=bottom.  
//Example values: “lt”, “cm”, “rb”
labelAlign: "cm",
labelXOffset: "0",
labelYOffset: "0"
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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