WCSTerrainProvider
WCSTerrainProvider copied to clipboard
small proxy issue
Xavier,
Found a small issue in the templateToURL method. I am using a proxy so the urlParam is already encoded. I got around this by making a small change:
Thought adding a proxy (true false) as a parameter would be more preformant than passing the url and encoding it multiple times.
function templateToURL(urlParam, x, y, level, provider, proxy) {
var rect = provider.tilingScheme.tileXYToNativeRectangle(x, y, level);
var xSpacing = (rect.east - rect.west) / (provider.heightMapWidth - 1);
var ySpacing = (rect.north - rect.south) / (provider.heightMapHeight - 1);
rect.west -= xSpacing * 0.5;
rect.east += xSpacing * 0.5;
rect.south -= ySpacing * 0.5;
rect.north += ySpacing * 0.5;
/* var scalingX = provider.pixelSize[0] / xSpacing
var scalingY = provider.pixelSize[1] / ySpacing;
.replace("{scaleX}", scalingX).replace("{scaleY}", scalingY)*/
**if(proxy) {
return urlParam.replace("%7Bsouth%7D", rect.south).replace("%7Bnorth%7D", rect.north).replace("%7Bwest%7D", rect.west).replace("%7Beast%7D", rect.east);
}
else {
return urlParam.replace("{south}", rect.south).replace("{north}", rect.north).replace("{west}", rect.west).replace("{east}", rect.east);
}**
}
Hi thanks for this issue. Could I add you as a collaborator of this projet ? Could you submit a pull request ?
xle
Sure!
Sent from my iPhone
On Aug 29, 2017, at 4:34 AM, xavier lhomme [email protected] wrote:
Hi thanks for this issue. Could I add you as a collaborator of this projet ? Could you submit a pull request ?
xle
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.