The WMSGetFeatureInfo control uses a WMS query to get information about a point on the map. The information may be in a display-friendly format such as HTML, or a machine-friendly format such as GML, depending on the server’s capabilities and the client’s configuration. This control handles click or hover events, attempts to parse the results using an OpenLayers.Format, and fires a ‘getfeatureinfo’ event with the click position, the raw body of the response, and an array of features if it successfully read the response.
OpenLayers. Control. WMSGetFeatureInfo | The WMSGetFeatureInfo control uses a WMS query to get information about a point on the map. |
Properties | |
hover | {Boolean} Send GetFeatureInfo requests when mouse stops moving. |
maxFeatures | {Integer} Maximum number of features to return from a WMS query. |
handlerOptions | {Object} Additional options for the handlers used by this control, e.g. |
Constants | |
EVENT_TYPES | |
Constructor | |
<OpenLayers. Control. WMSGetFeatureInfo> |
beforegetfeatureinfo | Triggered before the request is sent. The event object has an xy property with the position of the mouse click or hover event that triggers the request. |
getfeatureinfo | Triggered when a GetFeatureInfo response is received. The event object has a text property with the body of the response (String), a features property with an array of the parsed features, an xy property with the position of the mouse click or hover event that triggered the request, and a request property with the request itself. |