Until we know what we want to return, return undefined

This commit is contained in:
ahocevar
2013-07-31 11:58:45 +02:00
parent 53765ebd0f
commit 5307e5ea3f
2 changed files with 22 additions and 8 deletions
+20 -6
View File
@@ -20,9 +20,9 @@
* information for each layer, with array indices being the same as in the * information for each layer, with array indices being the same as in the
* passed `layers` array or in the layer collection as returned from * passed `layers` array or in the layer collection as returned from
* `ol.Map#getLayers()` if no `layers` were provided. * `ol.Map#getLayers()` if no `layers` were provided.
* @property {function(Object)|undefined} error Callback for unsuccessful * @property {function()|undefined} error Callback for unsuccessful queries.
* queries. Note that queries with no matching features trigger the success * Note that queries with no matching features trigger the success callback,
* callback, not the error callback. * not the error callback.
*/ */
/** /**
@@ -35,9 +35,9 @@
* each layer, with array indices being the same as in the passed `layers` * each layer, with array indices being the same as in the passed `layers`
* array or in the layer collection as returned from `ol.Map#getLayers()` if * array or in the layer collection as returned from `ol.Map#getLayers()` if
* no layers were provided. * no layers were provided.
* @property {function(Object)|undefined} error Callback for unsuccessful * @property {function()|undefined} error Callback for unsuccessful queries.
* queries. Note that queries with no matching features trigger the success * Note that queries with no matching features trigger the success callback,
* callback, not the error callback. * not the error callback.
*/ */
/** /**
@@ -441,6 +441,8 @@
* @property {null|string|undefined} crossOrigin crossOrigin setting for image * @property {null|string|undefined} crossOrigin crossOrigin setting for image
* requests. * requests.
* @property {ol.Extent|undefined} extent Extent. * @property {ol.Extent|undefined} extent Extent.
* @property {ol.source.WMSGetFeatureInfoOptions|undefined}
* getFeatureInfoOptions Options for GetFeatureInfo.
* @property {Object.<string,*>} params WMS request parameters. At least a * @property {Object.<string,*>} params WMS request parameters. At least a
* `LAYERS` param is required. `STYLES` is '' by default. `VERSION` is * `LAYERS` param is required. `STYLES` is '' by default. `VERSION` is
* '1.3.0' by default. `WIDTH`, `HEIGHT`, `BBOX` and `CRS` (`SRS` for WMS * '1.3.0' by default. `WIDTH`, `HEIGHT`, `BBOX` and `CRS` (`SRS` for WMS
@@ -500,6 +502,8 @@
* @property {null|string|undefined} crossOrigin crossOrigin setting for image * @property {null|string|undefined} crossOrigin crossOrigin setting for image
* requests. * requests.
* @property {ol.Extent|undefined} extent Extent. * @property {ol.Extent|undefined} extent Extent.
* @property {ol.source.WMSGetFeatureInfoOptions|undefined}
* getFeatureInfoOptions Options for GetFeatureInfo.
* @property {ol.tilegrid.TileGrid|undefined} tileGrid Tile grid. * @property {ol.tilegrid.TileGrid|undefined} tileGrid Tile grid.
* @property {number|undefined} maxZoom Maximum zoom. * @property {number|undefined} maxZoom Maximum zoom.
* @property {ol.ProjectionLike} projection Projection. * @property {ol.ProjectionLike} projection Projection.
@@ -533,6 +537,16 @@
* @property {ol.ProjectionLike} projection Projection. * @property {ol.ProjectionLike} projection Projection.
*/ */
/**
* @typedef {Object} ol.source.WMSGetFeatureInfoOptions
* @property {ol.source.WMSGetFeatureInfoMethod} method Method for requesting
* GetFeatureInfo. Default is `ol.source.WMSGetFeatureInfoMethod.IFRAME`.
* @property {Object} params Params for the GetFeatureInfo request. Default is
* `{'INFO_FORMAT': 'text/html'}`.
*/
/** /**
* @typedef {Object} ol.source.WMTSOptions * @typedef {Object} ol.source.WMTSOptions
* @property {Array.<ol.Attribution>|undefined} attributions Attributions. * @property {Array.<ol.Attribution>|undefined} attributions Attributions.
+2 -2
View File
@@ -106,7 +106,7 @@ ol.renderer.Map.prototype.getCanvas = goog.functions.NULL;
* information. Layers that are able to provide attribute data will put * information. Layers that are able to provide attribute data will put
* ol.Feature instances, other layers will put a string which can either * ol.Feature instances, other layers will put a string which can either
* be plain text or markup. * be plain text or markup.
* @param {function(Object)=} opt_error Callback for unsuccessful * @param {function()=} opt_error Callback for unsuccessful
* queries. * queries.
*/ */
ol.renderer.Map.prototype.getFeatureInfoForPixel = ol.renderer.Map.prototype.getFeatureInfoForPixel =
@@ -142,7 +142,7 @@ ol.renderer.Map.prototype.getFeatureInfoForPixel =
* information. Layers that are able to provide attribute data will put * information. Layers that are able to provide attribute data will put
* ol.Feature instances, other layers will put a string which can either * ol.Feature instances, other layers will put a string which can either
* be plain text or markup. * be plain text or markup.
* @param {function(Object)=} opt_error Callback for unsuccessful * @param {function()=} opt_error Callback for unsuccessful
* queries. * queries.
*/ */
ol.renderer.Map.prototype.getFeaturesForPixel = ol.renderer.Map.prototype.getFeaturesForPixel =