2

I have made a webmap using QGIS2Web. I am able to attach pdf documents using the line

<a target="_blank" href="file:///C:/xxx.pdf">google report</a>

When the webmap source files (shown in the image below) are on a local drive,it is possible to access the pdf. However, when i move them to a server, i can't access the pdf files. webmap source files

Is it possible to have them in a folder in similar location to that of the source files and if so how do i edit the code to read them?

2 Answers 2

2

Change the URL in your link either to an absolute URL like:

https://www.yourdomain/com/path/to/files/filenameXXX.pdf

Or, if you are putting the PDFs in a subfolder within the webmap folder, use a relative URL like:

./pdf/filenameXXX.pdf
-1

You can use nextgis.com to host you QGIS maps and attachments out of the box (see http://docs.nextgis.com/docs_ngweb/source/layers_settings.html#adding-photos-to-geodata). Any files are supported, but only for images now available preview capability.

Documentation is here.

enter image description here

2
  • 1
    Are you associated with nextgis? If so, please leave a notice indicating you are a developer for the project, otherwise people will assume this is SPAM.
    – Aaron
    Mar 14, 2018 at 16:54
  • Yes, I'm developer from NextGIS. Mar 14, 2018 at 19:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.