Merge pull request #2505 from elemoine/graticule-style

Make stroke style of the graticule configurable
This commit is contained in:
Éric Lemoine
2014-08-08 08:43:28 +02:00
4 changed files with 54 additions and 5 deletions

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>}