Merge pull request #1127 from bartvde/gfi

STYLES parameter duplicated on getFeatureInfo (r=@tschaub,@ahocevar)
This commit is contained in:
Bart van den Eijnden
2013-11-25 00:39:09 -08:00
2 changed files with 19 additions and 3 deletions

View File

@@ -32,8 +32,8 @@ describe('ol.source.wms', function() {
[5, 10], {params: {'INFO_FORMAT': 'text/plain'}},
function(info) {
expect(info).to.eql('<iframe seamless src="' +
'?REQUEST=GetFeatureInfo&VERSION=1.3&LAYERS=foo&QUERY_LAYERS=' +
'foo&INFO_FORMAT=text%2Fplain&I=5&J=10"></iframe>');
'?request=GetFeatureInfo&version=1.3&layers=foo&query_layers=' +
'foo&info_format=text%2Fplain&i=5&j=10"></iframe>');
done();
});
});
@@ -45,6 +45,17 @@ describe('ol.source.wms', function() {
done();
});
});
it('overrides any existing parameters', function(done) {
ol.source.wms.getFeatureInfo('?REQUEST=GetMap&VERSION=1.3&LAYERS=' +
'foo&styles=x',
[5, 10], {params: {'INFO_FORMAT': 'text/plain', STYLES: 'y'}},
function(info) {
expect(info).to.eql('<iframe seamless src="' +
'?request=GetFeatureInfo&version=1.3&layers=foo&query_layers=' +
'foo&styles=y&info_format=text%2Fplain&i=5&j=10"></iframe>');
done();
});
});
});
});