Add scale to ol.style.IconStyle
This commit is contained in:
@@ -735,6 +735,7 @@
|
|||||||
* @typedef {Object} olx.style.IconOptions
|
* @typedef {Object} olx.style.IconOptions
|
||||||
* @property {ol.Pixel|undefined} anchor Anchor.
|
* @property {ol.Pixel|undefined} anchor Anchor.
|
||||||
* @property {null|string|undefined} crossOrigin crossOrigin setting for image.
|
* @property {null|string|undefined} crossOrigin crossOrigin setting for image.
|
||||||
|
* @property {number|undefined} scale Scale.
|
||||||
* @property {number|undefined} rotation Rotation.
|
* @property {number|undefined} rotation Rotation.
|
||||||
* @property {ol.Size|undefined} size Icon size in pixel.
|
* @property {ol.Size|undefined} size Icon size in pixel.
|
||||||
* @property {string} src Image source URI.
|
* @property {string} src Image source URI.
|
||||||
|
|||||||
@@ -83,10 +83,16 @@ ol.style.Icon = function(opt_options) {
|
|||||||
*/
|
*/
|
||||||
var rotation = goog.isDef(options.rotation) ? options.rotation : 0;
|
var rotation = goog.isDef(options.rotation) ? options.rotation : 0;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @type {number}
|
||||||
|
*/
|
||||||
|
var scale = goog.isDef(options.scale) ? options.scale : 1;
|
||||||
|
|
||||||
goog.base(this, {
|
goog.base(this, {
|
||||||
anchor: anchor,
|
anchor: anchor,
|
||||||
imageState: ol.style.ImageState.IDLE,
|
imageState: ol.style.ImageState.IDLE,
|
||||||
rotation: rotation,
|
rotation: rotation,
|
||||||
|
scale: scale,
|
||||||
size: size,
|
size: size,
|
||||||
snapToPixel: undefined,
|
snapToPixel: undefined,
|
||||||
subtractViewRotation: false
|
subtractViewRotation: false
|
||||||
|
|||||||
Reference in New Issue
Block a user