Icon images are handled by a separate class
This commit is contained in:
@@ -56,12 +56,21 @@ ol.style.Circle = function(opt_options) {
|
||||
|
||||
var size = this.render_();
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {Array.<number>}
|
||||
*/
|
||||
this.anchor_ = [size / 2, size / 2];
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {ol.Size}
|
||||
*/
|
||||
this.size_ = [size, size];
|
||||
|
||||
goog.base(this, {
|
||||
anchor: [size / 2, size / 2],
|
||||
imageState: ol.style.ImageState.LOADED,
|
||||
rotation: 0,
|
||||
scale: 1,
|
||||
size: [size, size],
|
||||
snapToPixel: undefined,
|
||||
subtractViewRotation: false
|
||||
});
|
||||
@@ -70,6 +79,14 @@ ol.style.Circle = function(opt_options) {
|
||||
goog.inherits(ol.style.Circle, ol.style.Image);
|
||||
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
ol.style.Circle.prototype.getAnchor = function() {
|
||||
return this.anchor_;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @return {ol.style.Fill} Fill style.
|
||||
*/
|
||||
@@ -94,6 +111,14 @@ ol.style.Circle.prototype.getImage = function(pixelRatio) {
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
ol.style.Circle.prototype.getImageState = function() {
|
||||
return ol.style.ImageState.LOADED;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @return {number} Radius.
|
||||
*/
|
||||
@@ -102,6 +127,14 @@ ol.style.Circle.prototype.getRadius = function() {
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
ol.style.Circle.prototype.getSize = function() {
|
||||
return this.size_;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @return {ol.style.Stroke} Stroke style.
|
||||
*/
|
||||
@@ -110,12 +143,24 @@ ol.style.Circle.prototype.getStroke = function() {
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
ol.style.Circle.prototype.listenImageChange = goog.nullFunction;
|
||||
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
ol.style.Circle.prototype.load = goog.nullFunction;
|
||||
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
ol.style.Circle.prototype.unlistenImageChange = goog.nullFunction;
|
||||
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @return {number} Size.
|
||||
|
||||
Reference in New Issue
Block a user