diff --git a/src/api/map.js b/src/api/map.js index b8490e49ee..f6a090fe9b 100644 --- a/src/api/map.js +++ b/src/api/map.js @@ -9,7 +9,7 @@ goog.require('ol.error'); /** - * @typedef {ol.Map|Object|string} + * @typedef {ol.Map|{center, zoom, numZoomLevels, projection, userProjection, maxExtent, maxResolution, resolutions, renderTo, layers, controls}|string} */ ol.MapLike; diff --git a/src/api/popup.js b/src/api/popup.js index 1d2aa65533..dd51db9a73 100644 --- a/src/api/popup.js +++ b/src/api/popup.js @@ -5,7 +5,7 @@ goog.require('ol.map'); /** - * @typedef {ol.Popup|Object} popup + * @typedef {ol.Popup|{map, anchor, placement, content, template}} popup */ ol.PopupLike; @@ -39,6 +39,7 @@ ol.popup = function(opt_arg){ if (arguments.length == 1 && goog.isDef(opt_arg)) { if (goog.isObject(opt_arg)) { + ol.base.checkKeys(opt_arg, ['map', 'anchor', 'placement', 'content', 'template']); map = ol.API ? opt_arg['map'] : opt_arg.map; anchor = ol.API ? opt_arg['anchor'] : opt_arg.anchor; placement = ol.API ? opt_arg['placement'] : opt_arg.placement;