I have an Esri WMS server serving raster data. I can query this using OpenLayers TileWMS, all appears beautifully on my basemap.
I need to be able to query the WMS based on a polygon and display my rasters returned but for the life of me I can't work out how.
I can query on my extent using bbox nice and easily (out of the box). I can query the WMS using my polygon (hand drawn polygon) and get a list of object ID's back. I can use those object ID's and make a WMS request to get back JSON that contains href and the extent of the raster tile.
I am worried I am being stupid and perhaps overthinking this, but how can I get OpenLayers (5 currently) to display said image on my basemap from this GeoJSON?
To confirm, I want to display all rasters that appear geospatially inside a hand drawn polygon within my extent.