Asynchronous API for map#getFeatureInfo

This change allows us to use feature info services on the
server. It will also be useful for the GetFeature control to
get results from a WFS.
This commit is contained in:
ahocevar
2013-05-09 22:26:55 +02:00
parent fa1eb354f2
commit 7b256c3ec6
6 changed files with 58 additions and 28 deletions

View File

@@ -5,6 +5,20 @@
* @property {ol.ProjectionLike} projection Projection.
*/
/**
* @typedef {Object} ol.GetFeatureInfoOptions
* @property {ol.Pixel} pixel Pixel coordinate relative to the map viewport.
* @property {Array.<ol.layer.Layer>|undefined} layers Layers to restrict the
* query to. All layers will be queried if not provided.
* @property {function(Array.<ol.Feature|string>)} success Callback for
* successful queries. The passed argument is the resulting feature
* information. Layers that are able to provide attribute data will put
* ol.Feature instances, other layers will put a string which can either
* be plain text or markup.
* @property {function(Object)|undefined} error Callback for unsuccessful
* queries.
*/
/**
* Object literal with config options for the map.
* @typedef {Object} ol.MapOptions