Support fontWeight in text symbolizer

This commit is contained in:
Tim Schaub
2013-10-09 11:52:00 -06:00
parent 7be90877fe
commit 2ee776d9f6
7 changed files with 112 additions and 1 deletions
+6
View File
@@ -8,6 +8,7 @@ goog.require('ol.style.Literal');
* @typedef {{color: string,
* fontFamily: string,
* fontSize: number,
* fontWeight: string,
* text: string,
* opacity: number,
* strokeColor: (string|undefined),
@@ -38,6 +39,10 @@ ol.style.TextLiteral = function(options) {
/** @type {number} */
this.fontSize = options.fontSize;
goog.asserts.assertString(options.fontWeight, 'fontWeight must be a string');
/** @type {string} */
this.fontWeight = options.fontWeight;
goog.asserts.assertString(options.text, 'text must be a string');
/** @type {string} */
this.text = options.text;
@@ -92,6 +97,7 @@ ol.style.TextLiteral.prototype.equals = function(other) {
return this.color == other.color &&
this.fontFamily == other.fontFamily &&
this.fontSize == other.fontSize &&
this.fontWeight == other.fontWeight &&
this.opacity == other.opacity &&
this.strokeColor == other.strokeColor &&
this.strokeOpacity == other.strokeOpacity &&