Make stroke style of the graticule configurable

This commit is contained in:
Marc Jansen authored and Éric Lemoine committed 2014-08-08 08:28:34 +02:00
1 parent b8dca21286
commit b60609d93c
4 files changed
+54 -5

No files matched your search

+12 -4
View File
@@ -83,13 +83,11 @@ ol.Graticule = function(opt_options) {
this.parallels_ = [];
/**
* TODO can be configurable
* @type {ol.style.Stroke}
* @private
*/
this.strokeStyle_ = new ol.style.Stroke({
color: 'rgba(0,0,0,0.2)'
});
this.strokeStyle_ = goog.isDef(options.strokeStyle) ?
options.strokeStyle : ol.Graticule.DEFAULT_STROKE_STYLE_;
/**
* @type {ol.TransformFunction|undefined}
@@ -113,6 +111,16 @@ ol.Graticule = function(opt_options) {
};
/**
* @type {ol.style.Stroke}
* @private
* @const
*/
ol.Graticule.DEFAULT_STROKE_STYLE_ = new ol.style.Stroke({
color: 'rgba(0,0,0,0.2)'
});
/**
* TODO can be configurable
* @type {Array.<number>}