Remove use of goog.uri

This commit is contained in:
Björn Harrtell
2016-06-03 21:29:50 +02:00
parent e63b4d1f48
commit 27853ea7dd
8 changed files with 98 additions and 14 deletions

View File

@@ -1,7 +1,6 @@
goog.provide('ol.source.ImageArcGISRest');
goog.require('goog.asserts');
goog.require('goog.uri.utils');
goog.require('ol');
goog.require('ol.Image');
goog.require('ol.events');
@@ -10,6 +9,7 @@ goog.require('ol.extent');
goog.require('ol.object');
goog.require('ol.proj');
goog.require('ol.source.Image');
goog.require('ol.uri');
/**
@@ -215,7 +215,7 @@ ol.source.ImageArcGISRest.prototype.getRequestUrl_ = function(extent, size, pixe
if (modifiedUrl == url) {
goog.asserts.fail('Unknown Rest Service', url);
}
return goog.uri.utils.appendParamsFromMap(modifiedUrl, params);
return ol.uri.appendParams(modifiedUrl, params);
};

View File

@@ -2,11 +2,11 @@ goog.provide('ol.source.ImageMapGuide');
goog.require('ol.events');
goog.require('ol.events.EventType');
goog.require('goog.uri.utils');
goog.require('ol.Image');
goog.require('ol.extent');
goog.require('ol.object');
goog.require('ol.source.Image');
goog.require('ol.uri');
/**
@@ -222,7 +222,7 @@ ol.source.ImageMapGuide.prototype.getUrl = function(baseUrl, params, extent, siz
'SETVIEWCENTERY': center[1]
};
ol.object.assign(baseParams, params);
return goog.uri.utils.appendParamsFromMap(baseUrl, baseParams);
return ol.uri.appendParams(baseUrl, baseParams);
};

View File

@@ -3,7 +3,6 @@
goog.provide('ol.source.ImageWMS');
goog.require('goog.asserts');
goog.require('goog.uri.utils');
goog.require('ol');
goog.require('ol.Image');
goog.require('ol.events');
@@ -15,6 +14,7 @@ goog.require('ol.source.Image');
goog.require('ol.source.wms');
goog.require('ol.source.wms.ServerType');
goog.require('ol.string');
goog.require('ol.uri');
/**
@@ -312,7 +312,7 @@ ol.source.ImageWMS.prototype.getRequestUrl_ = function(extent, size, pixelRatio,
}
params['BBOX'] = bbox.join(',');
return goog.uri.utils.appendParamsFromMap(this.url_, params);
return ol.uri.appendParams(this.url_, params);
};

View File

@@ -1,7 +1,6 @@
goog.provide('ol.source.TileArcGISRest');
goog.require('goog.asserts');
goog.require('goog.uri.utils');
goog.require('ol');
goog.require('ol.extent');
goog.require('ol.object');
@@ -10,6 +9,7 @@ goog.require('ol.proj');
goog.require('ol.size');
goog.require('ol.source.TileImage');
goog.require('ol.tilecoord');
goog.require('ol.uri');
/**
@@ -114,7 +114,7 @@ ol.source.TileArcGISRest.prototype.getRequestUrl_ = function(tileCoord, tileSize
if (modifiedUrl == url) {
goog.asserts.fail('Unknown Rest Service', url);
}
return goog.uri.utils.appendParamsFromMap(modifiedUrl, params);
return ol.uri.appendParams(modifiedUrl, params);
};

View File

@@ -5,7 +5,6 @@
goog.provide('ol.source.TileWMS');
goog.require('goog.asserts');
goog.require('goog.uri.utils');
goog.require('ol');
goog.require('ol.extent');
goog.require('ol.object');
@@ -17,7 +16,7 @@ goog.require('ol.source.wms');
goog.require('ol.source.wms.ServerType');
goog.require('ol.tilecoord');
goog.require('ol.string');
goog.require('ol.uri');
/**
* @classdesc
@@ -265,7 +264,7 @@ ol.source.TileWMS.prototype.getRequestUrl_ = function(tileCoord, tileSize, tileE
var index = ol.math.modulo(ol.tilecoord.hash(tileCoord), urls.length);
url = urls[index];
}
return goog.uri.utils.appendParamsFromMap(url, params);
return ol.uri.appendParams(url, params);
};

View File

@@ -2,7 +2,6 @@ goog.provide('ol.source.WMTS');
goog.provide('ol.source.WMTSRequestEncoding');
goog.require('goog.asserts');
goog.require('goog.uri.utils');
goog.require('ol.TileUrlFunction');
goog.require('ol.array');
goog.require('ol.extent');
@@ -10,6 +9,7 @@ goog.require('ol.object');
goog.require('ol.proj');
goog.require('ol.source.TileImage');
goog.require('ol.tilegrid.WMTS');
goog.require('ol.uri');
/**
@@ -123,7 +123,7 @@ ol.source.WMTS = function(options) {
// special template params
template = (requestEncoding == ol.source.WMTSRequestEncoding.KVP) ?
goog.uri.utils.appendParamsFromMap(template, context) :
ol.uri.appendParams(template, context) :
template.replace(/\{(\w+?)\}/g, function(m, p) {
return (p.toLowerCase() in context) ? context[p.toLowerCase()] : m;
});
@@ -147,7 +147,7 @@ ol.source.WMTS = function(options) {
ol.object.assign(localContext, dimensions);
var url = template;
if (requestEncoding == ol.source.WMTSRequestEncoding.KVP) {
url = goog.uri.utils.appendParamsFromMap(url, localContext);
url = ol.uri.appendParams(url, localContext);
} else {
url = url.replace(/\{(\w+?)\}/g, function(m, p) {
return localContext[p];