mrmap-community / GeoPortal.rlp

Other
7 stars 2 forks source link

atomfeedclient multiselect - wfs download #12

Open karlbrink opened 3 years ago

karlbrink commented 3 years ago

if multiselect feature is active, the selection of tiles works fine, but the download link is still pointing to a download of the last selected tile.

there should be an asychronous download link

holsandre commented 3 years ago

This affects only certain wfs. See the following example:

This one works fine: https://www.geoportal.hessen.de/mapbender/plugins/mb_downloadFeedClient.php?url=https%3A%2F%2Fwww.geoportal.hessen.de%2Fmapbender%2Fphp%2Fmod_inspireDownloadFeed.php%3Fid%3D03d99fcb-b11e-5bc8-1981-afe12abe87fb%26type%3DSERVICE%26generateFrom%3Dwfs%26wfsid%3D262

This one doesnt: https://www.geoportal.hessen.de/mapbender/plugins/mb_downloadFeedClient.php?url=https%3A%2F%2Fwww.geoportal.hessen.de%2Fmapbender%2Fphp%2Fmod_inspireDownloadFeed.php%3Fid%3D185e8bc0-9982-b2bb-4ab5-cbac21dad690%26type%3DSERVICE%26generateFrom%3Dwfs%26wfsid%3D272

The problem is located here: https://github.com/mrmap-community/GeoPortal.rlp/blob/master/resources/scripts/mb_downloadFeedClient/javascripts/mb_downloadFeedClient.php#L589

The script checks if the selected_format is included in the url. It seems like mapservers are doing it this way, but arcgis server dont. You could allow a multidownload for arcgis server by altering the if condition to match some string in the url, for example like this:

if(encodeURIComponent(url).includes(selected_format) || encodeURIComponent(url).includes("xmlns%3Agml")){ }