Cope with axis orientation in single image WMS sources

This commit is contained in:
Tom Payne
2013-02-21 22:00:44 +01:00
parent 66e5b1d736
commit 17bd715495
2 changed files with 9 additions and 7 deletions
+3 -1
View File
@@ -38,11 +38,13 @@ ol.source.SingleImageWMS = function(options) {
baseParams[version >= '1.3' ? 'CRS' : 'SRS'] = projection.getCode();
goog.object.extend(baseParams, options.params);
var axisOrientation = projection.getAxisOrientation();
var imageUrlFunction;
if (options.url) {
var url = goog.uri.utils.appendParamsFromMap(
options.url, baseParams);
imageUrlFunction = ol.ImageUrlFunction.createBboxParam(url);
imageUrlFunction =
ol.ImageUrlFunction.createBboxParam(url, axisOrientation);
} else {
imageUrlFunction =
ol.ImageUrlFunction.nullImageUrlFunction;