Be more explicit about object properties to get rid of warnings.

This commit is contained in:
ahocevar
2012-06-26 09:56:50 +02:00
parent b7c8486289
commit 8541490f53
2 changed files with 3 additions and 2 deletions

View File

@@ -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;

View File

@@ -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;