Merge pull request #2505 from elemoine/graticule-style

Make stroke style of the graticule configurable
This commit is contained in:
Éric Lemoine committed 2014-08-08 08:43:28 +02:00
commit 9d6fced8b4
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>}