make WMSGetFeatureInfo Control WMS 1.3 compatible, r=ahocevar (closes #2355)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@9879 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -334,25 +334,36 @@ OpenLayers.Control.WMSGetFeatureInfo = OpenLayers.Class(OpenLayers.Control, {
|
||||
layerNames = layerNames.concat(layers[i].params.LAYERS);
|
||||
styleNames = styleNames.concat(this.getStyleNames(layers[i]));
|
||||
}
|
||||
var params = OpenLayers.Util.extend({
|
||||
service: "WMS",
|
||||
version: layers[0].params.VERSION,
|
||||
request: "GetFeatureInfo",
|
||||
layers: layerNames,
|
||||
query_layers: layerNames,
|
||||
styles: styleNames,
|
||||
bbox: this.map.getExtent().toBBOX(null,
|
||||
layers[0].reverseAxisOrder()),
|
||||
feature_count: this.maxFeatures,
|
||||
height: this.map.getSize().h,
|
||||
width: this.map.getSize().w,
|
||||
format: format,
|
||||
info_format: this.infoFormat
|
||||
}, (parseFloat(layers[0].params.VERSION) >= 1.3) ?
|
||||
{
|
||||
crs: this.map.getProjection(),
|
||||
i: clickPosition.x,
|
||||
j: clickPosition.y
|
||||
} :
|
||||
{
|
||||
srs: this.map.getProjection(),
|
||||
x: clickPosition.x,
|
||||
y: clickPosition.y
|
||||
}
|
||||
);
|
||||
OpenLayers.Util.applyDefaults(params, this.vendorParams);
|
||||
return {
|
||||
url: url,
|
||||
params: OpenLayers.Util.applyDefaults({
|
||||
service: "WMS",
|
||||
version: "1.1.0",
|
||||
request: "GetFeatureInfo",
|
||||
layers: layerNames,
|
||||
query_layers: layerNames,
|
||||
styles: styleNames,
|
||||
bbox: this.map.getExtent().toBBOX(),
|
||||
srs: this.map.getProjection(),
|
||||
feature_count: this.maxFeatures,
|
||||
x: clickPosition.x,
|
||||
y: clickPosition.y,
|
||||
height: this.map.getSize().h,
|
||||
width: this.map.getSize().w,
|
||||
format: format,
|
||||
info_format: this.infoFormat
|
||||
}, this.vendorParams),
|
||||
params: OpenLayers.Util.upperCaseObject(params),
|
||||
callback: function(request) {
|
||||
this.handleResponse(clickPosition, request);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user