Merge pull request #3002 from elemoine/regularstyle
Passing options to RegularShape is mandatory
This commit is contained in:
@@ -20,14 +20,15 @@ goog.require('ol.style.Stroke');
|
|||||||
* `radius2` are provided.
|
* `radius2` are provided.
|
||||||
*
|
*
|
||||||
* @constructor
|
* @constructor
|
||||||
* @param {olx.style.RegularShapeOptions=} opt_options Options.
|
* @param {olx.style.RegularShapeOptions} options Options.
|
||||||
* @extends {ol.style.Image}
|
* @extends {ol.style.Image}
|
||||||
* @implements {ol.structs.IHasChecksum}
|
* @implements {ol.structs.IHasChecksum}
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
ol.style.RegularShape = function(opt_options) {
|
ol.style.RegularShape = function(options) {
|
||||||
|
|
||||||
var options = goog.isDef(opt_options) ? opt_options : {};
|
goog.asserts.assert(goog.isDef(options.radius) ||
|
||||||
|
goog.isDef(options.radius1));
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
@@ -71,9 +72,6 @@ ol.style.RegularShape = function(opt_options) {
|
|||||||
*/
|
*/
|
||||||
this.points_ = options.points;
|
this.points_ = options.points;
|
||||||
|
|
||||||
goog.asserts.assert(goog.isDef(options.radius) ||
|
|
||||||
goog.isDef(options.radius1));
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
* @type {number}
|
* @type {number}
|
||||||
|
|||||||
Reference in New Issue
Block a user