Allow ol.Overlay positioning option to be a string
This commit is contained in:
@@ -55,7 +55,7 @@
|
||||
* @property {Element|undefined} element The overlay element.
|
||||
* @property {ol.Coordinate|undefined} position The overlay position in map
|
||||
* projection.
|
||||
* @property {ol.OverlayPositioning|undefined} positioning Positioning.
|
||||
* @property {ol.OverlayPositioning|string|undefined} positioning Positioning.
|
||||
* @property {boolean|undefined} stopEvent Whether event propagation to the map
|
||||
* viewport should be stopped. Default is `true`. If `true` the overlay is
|
||||
* placed in the same container as that of the controls
|
||||
|
||||
@@ -134,7 +134,8 @@ ol.Overlay = function(options) {
|
||||
this.setPosition(options.position);
|
||||
}
|
||||
if (goog.isDef(options.positioning)) {
|
||||
this.setPositioning(options.positioning);
|
||||
this.setPositioning(
|
||||
/** @type {ol.OverlayPositioning} */ (options.positioning));
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user