Esri / WAB-Image-Services-Widgets

Web AppBuilder widgets for Image Services (WABIS)
Apache License 2.0
49 stars 21 forks source link

PixelSize export restriction #30

Open Biboba opened 6 years ago

Biboba commented 6 years ago

Hello,

First of all thanks for all those nice widgets.

I have one remark regarding the exportImage one: doing some tests with our imageryService, I was surprised at first by the "bad" quality of my export though I was at the max allowed pixelSize for export. Having a look at the code, I noticed that the max PixelSize export restriction is not taking into account the Max Image Height and Max Image Width properties of the ImageService. To me, it is not very logical : if user wants a better quality and the Image service allow it, why preventing him from exporting ?

I removed that limitation by simply changing the following lines from: https://github.com/Esri/WAB-Image-Services-Widgets/blob/29a717658afabc2f11b4c4715b9d1e71ac703209/imagery_widgets/ISExport/Widget.js#L401-L402 to var widthMax = this.imageServiceLayer.maxImageWidth; var heightMax = this.imageServiceLayer.maxImageHeight;

Also, I believe there is a typo when validating maxPixelSize: https://github.com/Esri/WAB-Image-Services-Widgets/blob/29a717658afabc2f11b4c4715b9d1e71ac703209/imagery_widgets/ISExport/Widget.js#L405

Thanks