Is it possible to pass a “custom evalscript” as base64 encoded parameter in a OGC WMS request within a leaflet webmap?
If yes, then please assist.
At the moment I have reference to this FAQ link that says this is possible, but I am struggling a little. I’m not quite sure how to structure the request for this to work.
Below is my attempt, but the response is 400.
const sentine2RGBLayer = L.tileLayer.wms(`${sentinelHubWMSBaseUrl}/${sentinel2InstanceID}`, {
tileSize: 512,
maxcc: 50,
preset: "CUSTOM",
datasource: "Sentinel-2 L1C",
layers: "B01,B02,B03",
evalscript: "cmV0dXJuIFtCMDgqMi41LEIwNCoyLjUsQjAzKjIuNV07",
time: `2023-01-28`,
transparent: "true",
format: "image/png",
crs: L.CRS.EPSG4326,
});
Why do I need this? I would like to built custom script client side and then submit to Sentinel Hub as a WMS request.
I am specifically interested in rescaling and alternate color ramp changes to a layer (or custom script) for the visualization of data retrieved.
At the moment I succeed with calling configured layers, with preset color maps.
const sentine2RGBLayer = L.tileLayer.wms(`${sentinelHubWMSBaseUrl}/${sentinel2InstanceID}`, {
tileSize: 512,
maxcc: 50,
layers: "TRUE-COLOR-S2-L1C",
transparent: "true",
format: "image/png",
crs: L.CRS.EPSG4326,
});
Thank you in advance.