Remove end-of-line whitespace.
The license header is left untouched, to keep it the same in all files. A seperate commit will probably deal with this
This commit is contained in:
@@ -15,10 +15,10 @@
|
||||
/**
|
||||
* Class: OpenLayers.Control.WMSGetFeatureInfo
|
||||
* 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
|
||||
* 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.
|
||||
*
|
||||
* Inherits from:
|
||||
@@ -56,7 +56,7 @@ OpenLayers.Control.WMSGetFeatureInfo = OpenLayers.Class(OpenLayers.Control, {
|
||||
* option is set to false. Default is "click".
|
||||
*/
|
||||
clickCallback: "click",
|
||||
|
||||
|
||||
/**
|
||||
* APIProperty: output
|
||||
* {String} Either "features" or "object". When triggering a getfeatureinfo
|
||||
@@ -65,7 +65,7 @@ OpenLayers.Control.WMSGetFeatureInfo = OpenLayers.Class(OpenLayers.Control, {
|
||||
* WMS). Default is "features".
|
||||
*/
|
||||
output: "features",
|
||||
|
||||
|
||||
/**
|
||||
* APIProperty: layers
|
||||
* {Array(<OpenLayers.Layer.WMS>)} The layers to query for feature info.
|
||||
@@ -87,7 +87,7 @@ OpenLayers.Control.WMSGetFeatureInfo = OpenLayers.Class(OpenLayers.Control, {
|
||||
* of the first eligible layer will be used.
|
||||
*/
|
||||
url: null,
|
||||
|
||||
|
||||
/**
|
||||
* APIProperty: layerUrls
|
||||
* {Array(String)} Optional list of urls for layers that should be queried.
|
||||
@@ -105,7 +105,7 @@ OpenLayers.Control.WMSGetFeatureInfo = OpenLayers.Class(OpenLayers.Control, {
|
||||
* INFO_FORMAT parameter in your <OpenLayers.Layer.WMS> instance(s).
|
||||
*/
|
||||
infoFormat: 'text/html',
|
||||
|
||||
|
||||
/**
|
||||
* APIProperty: vendorParams
|
||||
* {Object} Additional parameters that will be added to the request, for
|
||||
@@ -117,14 +117,14 @@ OpenLayers.Control.WMSGetFeatureInfo = OpenLayers.Class(OpenLayers.Control, {
|
||||
* (end)
|
||||
*/
|
||||
vendorParams: {},
|
||||
|
||||
|
||||
/**
|
||||
* APIProperty: format
|
||||
* {<OpenLayers.Format>} A format for parsing GetFeatureInfo responses.
|
||||
* Default is <OpenLayers.Format.WMSGetFeatureInfo>.
|
||||
*/
|
||||
format: null,
|
||||
|
||||
|
||||
/**
|
||||
* APIProperty: formatOptions
|
||||
* {Object} Optional properties to set on the format (if one is not provided
|
||||
@@ -142,21 +142,21 @@ OpenLayers.Control.WMSGetFeatureInfo = OpenLayers.Class(OpenLayers.Control, {
|
||||
* }
|
||||
* (end)
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Property: handler
|
||||
* {Object} Reference to the <OpenLayers.Handler> for this control
|
||||
*/
|
||||
handler: null,
|
||||
|
||||
|
||||
/**
|
||||
* Property: hoverRequest
|
||||
* {<OpenLayers.Request>} contains the currently running hover request
|
||||
* (if any).
|
||||
*/
|
||||
hoverRequest: null,
|
||||
|
||||
/**
|
||||
|
||||
/**
|
||||
* APIProperty: events
|
||||
* {<OpenLayers.Events>} Events instance for listeners and triggering
|
||||
* control specific events.
|
||||
@@ -168,7 +168,7 @@ OpenLayers.Control.WMSGetFeatureInfo = OpenLayers.Class(OpenLayers.Control, {
|
||||
*
|
||||
* Supported event types (in addition to those from <OpenLayers.Control.events>):
|
||||
* beforegetfeatureinfo - Triggered before the request is sent.
|
||||
* The event object has an *xy* property with the position of the
|
||||
* The event object has an *xy* property with the position of the
|
||||
* mouse click or hover event that triggers the request.
|
||||
* nogetfeatureinfo - no queryable layers were found.
|
||||
* getfeatureinfo - Triggered when a GetFeatureInfo response is received.
|
||||
@@ -186,20 +186,20 @@ OpenLayers.Control.WMSGetFeatureInfo = OpenLayers.Class(OpenLayers.Control, {
|
||||
* Constructor: <OpenLayers.Control.WMSGetFeatureInfo>
|
||||
*
|
||||
* Parameters:
|
||||
* options - {Object}
|
||||
* options - {Object}
|
||||
*/
|
||||
initialize: function(options) {
|
||||
options = options || {};
|
||||
options.handlerOptions = options.handlerOptions || {};
|
||||
|
||||
OpenLayers.Control.prototype.initialize.apply(this, [options]);
|
||||
|
||||
|
||||
if(!this.format) {
|
||||
this.format = new OpenLayers.Format.WMSGetFeatureInfo(
|
||||
options.formatOptions
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
if(this.drillDown === true) {
|
||||
this.hover = false;
|
||||
}
|
||||
@@ -222,11 +222,11 @@ OpenLayers.Control.WMSGetFeatureInfo = OpenLayers.Class(OpenLayers.Control, {
|
||||
},
|
||||
|
||||
/**
|
||||
* Method: getInfoForClick
|
||||
* Method: getInfoForClick
|
||||
* Called on click
|
||||
*
|
||||
* Parameters:
|
||||
* evt - {<OpenLayers.Event>}
|
||||
* evt - {<OpenLayers.Event>}
|
||||
*/
|
||||
getInfoForClick: function(evt) {
|
||||
this.events.triggerEvent("beforegetfeatureinfo", {xy: evt.xy});
|
||||
@@ -235,7 +235,7 @@ OpenLayers.Control.WMSGetFeatureInfo = OpenLayers.Class(OpenLayers.Control, {
|
||||
OpenLayers.Element.addClass(this.map.viewPortDiv, "olCursorWait");
|
||||
this.request(evt.xy, {});
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* Method: getInfoForHover
|
||||
* Pause callback for the hover handler
|
||||
@@ -286,7 +286,7 @@ OpenLayers.Control.WMSGetFeatureInfo = OpenLayers.Class(OpenLayers.Control, {
|
||||
}
|
||||
return layers;
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* Method: urlMatches
|
||||
* Test to see if the provided url matches either the control <url> or one
|
||||
@@ -385,7 +385,7 @@ OpenLayers.Control.WMSGetFeatureInfo = OpenLayers.Class(OpenLayers.Control, {
|
||||
* Method: getStyleNames
|
||||
* Gets the STYLES parameter for the layer. Make sure the STYLES parameter
|
||||
* matches the LAYERS parameter
|
||||
*
|
||||
*
|
||||
* Parameters:
|
||||
* layer - {<OpenLayers.Layer.WMS>}
|
||||
*
|
||||
@@ -413,12 +413,12 @@ OpenLayers.Control.WMSGetFeatureInfo = OpenLayers.Class(OpenLayers.Control, {
|
||||
/**
|
||||
* Method: request
|
||||
* Sends a GetFeatureInfo request to the WMS
|
||||
*
|
||||
*
|
||||
* Parameters:
|
||||
* clickPosition - {<OpenLayers.Pixel>} The position on the map where the
|
||||
* mouse event occurred.
|
||||
* options - {Object} additional options for this method.
|
||||
*
|
||||
*
|
||||
* Valid options:
|
||||
* - *hover* {Boolean} true if we do the request for the hover handler
|
||||
*/
|
||||
@@ -430,13 +430,13 @@ OpenLayers.Control.WMSGetFeatureInfo = OpenLayers.Class(OpenLayers.Control, {
|
||||
OpenLayers.Element.removeClass(this.map.viewPortDiv, "olCursorWait");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
options = options || {};
|
||||
if(this.drillDown === false) {
|
||||
var wmsOptions = this.buildWMSOptions(this.url, layers,
|
||||
clickPosition, layers[0].params.FORMAT);
|
||||
clickPosition, layers[0].params.FORMAT);
|
||||
var request = OpenLayers.Request.GET(wmsOptions);
|
||||
|
||||
|
||||
if (options.hover === true) {
|
||||
this.hoverRequest = request;
|
||||
}
|
||||
@@ -460,9 +460,9 @@ OpenLayers.Control.WMSGetFeatureInfo = OpenLayers.Class(OpenLayers.Control, {
|
||||
var layers;
|
||||
for (var url in services) {
|
||||
layers = services[url];
|
||||
var wmsOptions = this.buildWMSOptions(url, layers,
|
||||
var wmsOptions = this.buildWMSOptions(url, layers,
|
||||
clickPosition, layers[0].params.FORMAT);
|
||||
OpenLayers.Request.GET(wmsOptions);
|
||||
OpenLayers.Request.GET(wmsOptions);
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -490,11 +490,11 @@ OpenLayers.Control.WMSGetFeatureInfo = OpenLayers.Class(OpenLayers.Control, {
|
||||
// Reset the cursor.
|
||||
OpenLayers.Element.removeClass(this.map.viewPortDiv, "olCursorWait");
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* Method: handleResponse
|
||||
* Handler for the GetFeatureInfo response.
|
||||
*
|
||||
*
|
||||
* Parameters:
|
||||
* xy - {<OpenLayers.Pixel>} The position on the map where the
|
||||
* mouse event occurred.
|
||||
@@ -502,7 +502,7 @@ OpenLayers.Control.WMSGetFeatureInfo = OpenLayers.Class(OpenLayers.Control, {
|
||||
* url - {String} The url which was used for this request.
|
||||
*/
|
||||
handleResponse: function(xy, request, url) {
|
||||
|
||||
|
||||
var doc = request.responseXML;
|
||||
if(!doc || !doc.documentElement) {
|
||||
doc = request.responseText;
|
||||
@@ -520,7 +520,7 @@ OpenLayers.Control.WMSGetFeatureInfo = OpenLayers.Class(OpenLayers.Control, {
|
||||
this._features = (this._features || []).concat(features);
|
||||
}
|
||||
if (this._requestCount === this._numRequests) {
|
||||
this.triggerGetFeatureInfo(request, xy, this._features.concat());
|
||||
this.triggerGetFeatureInfo(request, xy, this._features.concat());
|
||||
delete this._features;
|
||||
delete this._requestCount;
|
||||
delete this._numRequests;
|
||||
|
||||
Reference in New Issue
Block a user