Description
In ArcGIS Online, pop-ups can be configured and customized to present the attribute information of a feature in a web map. In some instances, a PDF file attached to the feature cannot be accessed from the pop-up. The image below shows the pop-up of the feature as displayed in Map Viewer.
Cause
ArcGIS Online is unable to access the data stored in the local drive. As displayed in the pop-up, the PDF is stored in the local C: drive and is not hosted on a file-hosting website or a local server, causing the PDF to be inaccessible.
Solution or Workaround
Choose one of the workarounds below to resolve the issue.
Add the PDF file as public content in ArcGIS Online
- In ArcGIS Online, upload the PDF file from the computer. Refer to ArcGIS Online: Add files from your computer for steps to do so.
- Change the sharing option of the PDF file to Everyone (public). Refer to ArcGIS Online: Share items with everyone for more information.
- Copy the URL of the PDF file.
- Navigate to Content > My Content, and click the PDF file to access the item details page.
- On the item details page, scroll to the bottom of the web page, under URL, click the Copy
icon.
- Replace the local path with the copied URL in the web map.
- Navigate to Content > My Content, and click the web map to access the item details page.
- On the item details page, click the drop-down arrow next to Open in Map Viewer Classic, and select Open in Map Viewer.
- In Map Viewer, on the right vertical toolbar, click Edit.
- In the Editor pane, click Edit feature.
- Select the feature on the map that contains the local path of the PDF file.
- In the Editor pane, paste the URL from Step 3 in the field that contains the local path of the PDF file, and press Enter on the keyboard. In this example, the field is PDFSamples.
- Click Update.
- On the left vertical toolbar, click Save to save the modification.
The PDF is hyperlinked as View via URL in the pop-up.
Add the PDF file as an attachment to the feature
- In ArcGIS Online, navigate to Content > My Content, click the web map to access the item details page.
- On the item details page, click the drop-down arrow next to Open in Map Viewer Classic, and select Open in Map Viewer.
- Add the PDF file as an attachment to the feature.
- In Map Viewer, on the right vertical toolbar, click Edit.
- In the Editor pane, click Edit feature.
- Select a feature to edit.
- In the Editor pane, under Attachments, click Add.
- Click Select file, and select the PDF file from the computer.
- Click Add.
- Display the attachment in the pop-up. Refer to ArcGIS Online: Add attachments for steps to do so.
- On the left vertical toolbar, click Save to save the modifications made to the web map.
The PDF file is added as an attachment to the feature and can be accessed in the pop-up.