WCSTerrainProvider icon indicating copy to clipboard operation
WCSTerrainProvider copied to clipboard

small proxy issue

Open BigDog6432 opened this issue 7 years ago • 2 comments

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);
    }**
  }

BigDog6432 avatar Aug 25 '17 18:08 BigDog6432

Hi thanks for this issue. Could I add you as a collaborator of this projet ? Could you submit a pull request ?

xle

xlhomme avatar Aug 29 '17 11:08 xlhomme

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.

BigDog6432 avatar Sep 07 '17 19:09 BigDog6432