Replace subtractViewRotation with rotateWithMap
This commit is contained in:
@@ -70,10 +70,10 @@ ol.style.Circle = function(opt_options) {
|
|||||||
|
|
||||||
goog.base(this, {
|
goog.base(this, {
|
||||||
opacity: 1,
|
opacity: 1,
|
||||||
|
rotateWithMap: false,
|
||||||
rotation: 0,
|
rotation: 0,
|
||||||
scale: 1,
|
scale: 1,
|
||||||
snapToPixel: undefined,
|
snapToPixel: undefined
|
||||||
subtractViewRotation: false
|
|
||||||
});
|
});
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -96,6 +96,12 @@ ol.style.Icon = function(opt_options) {
|
|||||||
*/
|
*/
|
||||||
var opacity = goog.isDef(options.opacity) ? options.opacity : 1;
|
var opacity = goog.isDef(options.opacity) ? options.opacity : 1;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @type {boolean}
|
||||||
|
*/
|
||||||
|
var rotateWithMap = goog.isDef(options.rotateWithMap) ?
|
||||||
|
options.rotateWithMap : false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @type {number}
|
* @type {number}
|
||||||
*/
|
*/
|
||||||
@@ -111,7 +117,7 @@ ol.style.Icon = function(opt_options) {
|
|||||||
rotation: rotation,
|
rotation: rotation,
|
||||||
scale: scale,
|
scale: scale,
|
||||||
snapToPixel: undefined,
|
snapToPixel: undefined,
|
||||||
subtractViewRotation: false
|
rotateWithMap: rotateWithMap
|
||||||
});
|
});
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
+16
-16
@@ -17,10 +17,10 @@ ol.style.ImageState = {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {{opacity: number,
|
* @typedef {{opacity: number,
|
||||||
|
* rotateWithMap: boolean,
|
||||||
* rotation: number,
|
* rotation: number,
|
||||||
* scale: number,
|
* scale: number,
|
||||||
* snapToPixel: (boolean|undefined),
|
* snapToPixel: (boolean|undefined)}}
|
||||||
* subtractViewRotation: boolean}}
|
|
||||||
*/
|
*/
|
||||||
ol.style.ImageOptions;
|
ol.style.ImageOptions;
|
||||||
|
|
||||||
@@ -38,6 +38,12 @@ ol.style.Image = function(options) {
|
|||||||
*/
|
*/
|
||||||
this.opacity_ = options.opacity;
|
this.opacity_ = options.opacity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @private
|
||||||
|
* @type {boolean}
|
||||||
|
*/
|
||||||
|
this.rotateWithMap_ = options.rotateWithMap;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
* @type {number}
|
* @type {number}
|
||||||
@@ -56,12 +62,6 @@ ol.style.Image = function(options) {
|
|||||||
*/
|
*/
|
||||||
this.snapToPixel_ = options.snapToPixel;
|
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.
|
* @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.
|
* @return {Array.<number>} Anchor.
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user