Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

basemap thumbnail not displayed when the thumbnails are stored in the datadir #140

Open
landryb opened this issue Aug 24, 2021 · 4 comments

Comments

@landryb
Copy link
Member

landryb commented Aug 24, 2021

cadastrapp.properties allows to point at basemap thumbnails via full urls or relative to a subdir of the datadir:

pdf.baseMap.image.folder=images

pdf.baseMap.0.title.thumbnail=ortho.png
pdf.baseMap.1.title.thumbnail=planign.png

the files exist in /etc/georchestra/cadastrapp/images and mapfishapp properly displays them when listing the available basemaps to generate a BP.

mapstore2-cadastrapp fails to display them as it tries to fetch https://${fqdn}/mapstore/ortho.png and https://${fqdn}/mapstore/planign.png while it should do a POST on
https://${fqdn}/cadastrapp/services/getImageFromDataDir with the image name, that service returns the given image as text/plain (yeah i know, ugly).

@landryb
Copy link
Member Author

landryb commented Aug 24, 2021

@catmorales @jusabatier dunno if you use that feature or just point to urls for basemap thumbnails, but that's something to check for.

@landryb
Copy link
Member Author

landryb commented Aug 24, 2021

ms2-cadastrapp should check if the parameters returned by getConfiguration are urls, and if not should fetch them from the appropriate service.

@catmorales
Copy link

Ok , thank you for report it.
We use an url for thumbnails like https://public.sig.rennesmetropole.fr/ressources/app/georchestra/cadastrapp/images/cadastre.png
But it should be corrected.

@landryb
Copy link
Member Author

landryb commented Dec 7, 2021

fwiw as a temporary workaround i've put this in my nginx vhost:

location = /mapstore/ortho.png {
    alias /etc/georchestra/cadastrapp/images/ortho.png;
 }

location = /mapstore/planign.png {
    alias /etc/georchestra/cadastrapp/images/planign.png;
}

but that's a bit annoying/gross.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants