The WMTSGetFeatureInfo control uses a WMTS 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 for each layer queried.
OpenLayers.
|
The WMTSGetFeatureInfo control uses a WMTS query to get information about a point on the map. |
Properties | |
hover | {Boolean} Send GetFeatureInfo requests when mouse stops moving. |
drillDown | {Boolean} Drill down over all WMTS layers in the map. |
maxFeatures | {Integer} Maximum number of features to return from a WMTS query. |
clickCallback | {String} The click callback to register in the {OpenLayers.Handler.Click} object created when the hover option is set to false. |
queryVisible | {Boolean} Filter out hidden layers when searching the map for layers to query. |
handlerOptions | {Object} Additional options for the handlers used by this control, e.g. |
events | {OpenLayers.Events} Events instance for listeners and triggering control specific events. |
Constructor | |
<OpenLayers.
|
{String} The click callback to register in the {OpenLayers.Handler.Click} object created when the hover option is set to false. Default is “click”.
{OpenLayers.Events} Events instance for listeners and triggering control specific events.
control.events.register(type, obj, listener);
beforegetfeatureinfo | Triggered before each request is sent. The event object has an xy property with the position of the mouse click or hover event that triggers the request and a layer property referencing the layer about to be queried. If a listener returns false, the request will not be issued. |
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, a layer property referencing the layer queried and a request property with the request itself. If drillDown is set to true, one event will be fired for each layer queried. |
exception | Triggered when a GetFeatureInfo request fails (with a status other than 200) or whenparsing fails. Listeners will receive an event with request, xy, and layer properties. In the case of a parsing error, the event will also contain an error property. |