diff --git a/src/ol/style/circlestyle.js b/src/ol/style/circlestyle.js index fc1b88cd17..813c36136d 100644 --- a/src/ol/style/circlestyle.js +++ b/src/ol/style/circlestyle.js @@ -70,10 +70,10 @@ ol.style.Circle = function(opt_options) { goog.base(this, { opacity: 1, + rotateWithMap: false, rotation: 0, scale: 1, - snapToPixel: undefined, - subtractViewRotation: false + snapToPixel: undefined }); }; diff --git a/src/ol/style/iconstyle.js b/src/ol/style/iconstyle.js index 2d38f59bfb..a49d9e309b 100644 --- a/src/ol/style/iconstyle.js +++ b/src/ol/style/iconstyle.js @@ -96,6 +96,12 @@ ol.style.Icon = function(opt_options) { */ var opacity = goog.isDef(options.opacity) ? options.opacity : 1; + /** + * @type {boolean} + */ + var rotateWithMap = goog.isDef(options.rotateWithMap) ? + options.rotateWithMap : false; + /** * @type {number} */ @@ -111,7 +117,7 @@ ol.style.Icon = function(opt_options) { rotation: rotation, scale: scale, snapToPixel: undefined, - subtractViewRotation: false + rotateWithMap: rotateWithMap }); }; diff --git a/src/ol/style/imagestyle.js b/src/ol/style/imagestyle.js index caf76bb90d..84ea6b9117 100644 --- a/src/ol/style/imagestyle.js +++ b/src/ol/style/imagestyle.js @@ -17,10 +17,10 @@ ol.style.ImageState = { /** * @typedef {{opacity: number, + * rotateWithMap: boolean, * rotation: number, * scale: number, - * snapToPixel: (boolean|undefined), - * subtractViewRotation: boolean}} + * snapToPixel: (boolean|undefined)}} */ ol.style.ImageOptions; @@ -38,6 +38,12 @@ ol.style.Image = function(options) { */ this.opacity_ = options.opacity; + /** + * @private + * @type {boolean} + */ + this.rotateWithMap_ = options.rotateWithMap; + /** * @private * @type {number} @@ -56,12 +62,6 @@ ol.style.Image = function(options) { */ this.snapToPixel_ = options.snapToPixel; - /** - * @private - * @type {boolean|undefined} - */ - this.subtractViewRotation_ = options.subtractViewRotation; - }; @@ -73,6 +73,14 @@ ol.style.Image.prototype.getOpacity = function() { }; +/** + * @return {boolean} Rotate with map. + */ +ol.style.Image.prototype.getRotateWithMap = function() { + return this.rotateWithMap_; +}; + + /** * @return {number} Rotation. */ @@ -97,14 +105,6 @@ ol.style.Image.prototype.getSnapToPixel = function() { }; -/** - * @return {boolean|undefined} Subtract view rotation? - */ -ol.style.Image.prototype.getSubtractViewRotation = function() { - return this.subtractViewRotation_; -}; - - /** * @return {Array.} Anchor. */