Merge pull request #140 from aabt/outline
Add label outline to SVG and Canvas renderers
This commit is contained in:
@@ -414,11 +414,13 @@ OpenLayers.Feature.Vector = OpenLayers.Class(OpenLayers.Feature, {
|
||||
* labelAlign - {String} Label alignment. This specifies the insertion point relative to the text. It is a string
|
||||
* composed of two characters. The first character is for the horizontal alignment, the second for the vertical
|
||||
* alignment. 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".
|
||||
* alignment: "t"=top, "m"=middle, "b"=bottom. Example values: "lt", "cm", "rb". Default is "cm".
|
||||
* labelXOffset - {Number} Pixel offset along the positive x axis for displacing the label. Not supported by the canvas renderer.
|
||||
* labelYOffset - {Number} Pixel offset along the positive y axis for displacing the label. Not supported by the canvas renderer.
|
||||
* labelSelect - {Boolean} If set to true, labels will be selectable using SelectFeature or similar controls.
|
||||
* Default is false.
|
||||
* labelOutlineColor - {String} The color of the label outline. Default is 'white'. Only supported by the canvas & SVG renderers.
|
||||
* labelOutlineWidth - {Number} The width of the label outline. Default is 3, set to 0 or null to disable. Only supported by the canvas & SVG renderers.
|
||||
* fontColor - {String} The font color for the label, to be provided like CSS.
|
||||
* fontOpacity - {Number} Opacity (0-1) for the label
|
||||
* fontFamily - {String} The font family for the label, to be provided like in CSS.
|
||||
@@ -445,7 +447,11 @@ OpenLayers.Feature.Vector.style = {
|
||||
hoverPointRadius: 1,
|
||||
hoverPointUnit: "%",
|
||||
pointerEvents: "visiblePainted",
|
||||
cursor: "inherit"
|
||||
cursor: "inherit",
|
||||
fontColor: "#000000",
|
||||
labelAlign: "cm",
|
||||
labelOutlineColor: "white",
|
||||
labelOutlineWidth: 3
|
||||
},
|
||||
'select': {
|
||||
fillColor: "blue",
|
||||
@@ -464,7 +470,12 @@ OpenLayers.Feature.Vector.style = {
|
||||
hoverPointRadius: 1,
|
||||
hoverPointUnit: "%",
|
||||
pointerEvents: "visiblePainted",
|
||||
cursor: "pointer"
|
||||
cursor: "pointer",
|
||||
fontColor: "#000000",
|
||||
labelAlign: "cm",
|
||||
labelOutlineColor: "white",
|
||||
labelOutlineWidth: 3
|
||||
|
||||
},
|
||||
'temporary': {
|
||||
fillColor: "#66cccc",
|
||||
@@ -483,7 +494,12 @@ OpenLayers.Feature.Vector.style = {
|
||||
hoverPointRadius: 1,
|
||||
hoverPointUnit: "%",
|
||||
pointerEvents: "visiblePainted",
|
||||
cursor: "inherit"
|
||||
cursor: "inherit",
|
||||
fontColor: "#000000",
|
||||
labelAlign: "cm",
|
||||
labelOutlineColor: "white",
|
||||
labelOutlineWidth: 3
|
||||
|
||||
},
|
||||
'delete': {
|
||||
display: "none"
|
||||
|
||||
Reference in New Issue
Block a user