Optional zIndex for fill symbolizers

This commit is contained in:
Tim Schaub
2013-08-26 15:18:34 -06:00
parent 96fa07effb
commit 04a23d0e45
5 changed files with 83 additions and 10 deletions
+12 -7
View File
@@ -9,7 +9,8 @@ goog.require('ol.style.Literal');
* fillOpacity: (number|undefined),
* strokeColor: (string|undefined),
* strokeOpacity: (number|undefined),
* strokeWidth: (number|undefined)}}
* strokeWidth: (number|undefined),
* zIndex: (number|undefined)}}
*/
ol.style.PolygonLiteralOptions;
@@ -66,6 +67,9 @@ ol.style.PolygonLiteral = function(options) {
'Either fillColor and fillOpacity or ' +
'strokeColor and strokeOpacity and strokeWidth must be set');
/** @type {number|undefined} */
this.zIndex = options.zIndex;
};
goog.inherits(ol.style.PolygonLiteral, ol.style.Literal);
@@ -73,10 +77,11 @@ goog.inherits(ol.style.PolygonLiteral, ol.style.Literal);
/**
* @inheritDoc
*/
ol.style.PolygonLiteral.prototype.equals = function(polygonLiteral) {
return this.fillColor == polygonLiteral.fillColor &&
this.fillOpacity == polygonLiteral.fillOpacity &&
this.strokeColor == polygonLiteral.strokeColor &&
this.strokeOpacity == polygonLiteral.strokeOpacity &&
this.strokeWidth == polygonLiteral.strokeWidth;
ol.style.PolygonLiteral.prototype.equals = function(other) {
return this.fillColor == other.fillColor &&
this.fillOpacity == other.fillOpacity &&
this.strokeColor == other.strokeColor &&
this.strokeOpacity == other.strokeOpacity &&
this.strokeWidth == other.strokeWidth &&
this.zIndex == other.zIndex;
};