sentinelhub-js
sentinelhub-js copied to clipboard
Check if getStats() really needs instance id and layer id when StatAPI is used
Even when StatAPI is used for getting statistics, instanceId and layerId are still needed.
in layer.getStats(), there is getStatisticsProvider() for getting statistics provider and when StatAPI is used, StatisticalApi.getStats() calls layer.updateLayerFromServiceIfNeeded(), where instanceId and layerId are needed.
Is this really necessary? Can it be done to work just with evalscript and dataProduct like getMap()?
Related code lines:
https://github.com/sentinel-hub/sentinelhub-js/blob/75517437601697974b7fef8ca631cd8f71669cd3/src/statistics/StatisticalApi.ts#L26