Replace subtractViewRotation with rotateWithMap
This commit is contained in:
@@ -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
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
@@ -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
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
@@ -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.<number>} Anchor.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user