Use X, Y or I, J depending on WMS version
This also adds consistency - Pixel coordinates are now always rounded to integers.
This commit is contained in:
@@ -28,22 +28,22 @@ describe('ol.source.wms', function() {
|
||||
|
||||
describe('ol.source.wms.getFeatureInfo', function() {
|
||||
it('calls a callback with a feature info IFRAME as result', function(done) {
|
||||
ol.source.wms.getFeatureInfo('?REQUEST=GetMap&LAYERS=foo',
|
||||
{params: {'INFO_FORMAT': 'text/plain'}},
|
||||
ol.source.wms.getFeatureInfo('?REQUEST=GetMap&VERSION=1.3&LAYERS=foo',
|
||||
[5, 10], {params: {'INFO_FORMAT': 'text/plain'}},
|
||||
function(info) {
|
||||
expect(info).to.eql('<iframe seamless src="' +
|
||||
'?REQUEST=GetFeatureInfo&LAYERS=foo&QUERY_LAYERS=foo&' +
|
||||
'INFO_FORMAT=text%2Fplain"></iframe>');
|
||||
'?REQUEST=GetFeatureInfo&VERSION=1.3&LAYERS=foo&QUERY_LAYERS=' +
|
||||
'foo&INFO_FORMAT=text%2Fplain&I=5&J=10"></iframe>');
|
||||
done();
|
||||
});
|
||||
});
|
||||
it('can do xhr to retrieve feature info', function(done) {
|
||||
ol.source.wms.getFeatureInfo('?REQUEST=GetMap&LAYERS=foo', {
|
||||
method: ol.source.WMSGetFeatureInfoMethod.XHR_GET
|
||||
}, function(info) {
|
||||
expect(info).to.contain('<html>');
|
||||
done();
|
||||
});
|
||||
ol.source.wms.getFeatureInfo('?REQUEST=GetMap&VERSION=1.1.1&LAYERS=foo',
|
||||
[5, 10], {method: ol.source.WMSGetFeatureInfoMethod.XHR_GET},
|
||||
function(info) {
|
||||
expect(info).to.contain('<html>');
|
||||
done();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user