Add rotateWithView option to ol.style.Text

This commit is contained in:
Frederic Junod
2016-03-16 13:47:18 +01:00
parent 17ebe82577
commit 8e95d94f3e
7 changed files with 159 additions and 4 deletions

View File

@@ -28,6 +28,12 @@ ol.style.Text = function(opt_options) {
*/
this.rotation_ = options.rotation;
/**
* @private
* @type {boolean|undefined}
*/
this.rotateWithView_ = options.rotateWithView;
/**
* @private
* @type {number|undefined}
@@ -129,6 +135,16 @@ ol.style.Text.prototype.getFill = function() {
};
/**
* Determine whether the text rotates with the map.
* @return {boolean|undefined} Rotate with map.
* @api
*/
ol.style.Text.prototype.getRotateWithView = function() {
return this.rotateWithView_;
};
/**
* Get the text rotation.
* @return {number|undefined} Rotation.