I am trying to download a Geoserver layer as KML using the KML Reflector. I actually use Leaflet and a plugin (leaflet-area-draw) in order to let the user design a rectangle and then pass the BB to the URL. The URL request I make is WMS and it looks like this:
I face two issues. First the whole layer is downloaded although I restrict it with the BBox. I wonder if this is related cause its a WMS request and maybe I should try to make a WFS one. Is it possible to make a WFS request to get KML?
The second issue appears when the projetion of the layer in geoserver is other than EPSG:4326. Then I get nothing back. What is the right approach to this? Should I use a Leaflet plugin to convert the BBOX coordinates from EPSG:4326 to the layer's srs?
I tried using KML scoring in order to get the data as vectors with the hope, that they will be rendered correctly and only the ones in BB will be shown. But it didn't work. I get all the features back.