diff --git a/src/objectliterals.jsdoc b/src/objectliterals.jsdoc index 6c973bdef6..c2eb124ea1 100644 --- a/src/objectliterals.jsdoc +++ b/src/objectliterals.jsdoc @@ -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 diff --git a/src/ol/overlay.js b/src/ol/overlay.js index 17081ba375..c6fa9b92c8 100644 --- a/src/ol/overlay.js +++ b/src/ol/overlay.js @@ -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)); } };