I have a map created from an excel file saved on my computer. The file has pictures that are hyperlinks to websites. How can I add the pictures from Excel to the popups on the map? I have tried using the configure popup and the add image but I don't know what I am missing in my code to display the pictures. This is what I have but it doesn't work.
<img src='C:\Users\venriquez\Desktop\Leg Map\Sheet1\Picture' width='250' />
What am I missing?
Solved! Go to Solution.
The image must be accessible via URL. So you can either host that image in a cloud storage option of your choosing, your own servers, or by adding the image to ArcGIS Online, and then making it public to grab the URL - instructions here: https://www.esri.com/arcgis-blog/products/arcgis-online/mapping/adding-and-using-photos-and-images/
Once you have the link, use that in the Excel/CSV file to add to your map, or publish as a hosted feature layer. Then you can configure the pop-up using that field.
The image must be accessible via URL. So you can either host that image in a cloud storage option of your choosing, your own servers, or by adding the image to ArcGIS Online, and then making it public to grab the URL - instructions here: https://www.esri.com/arcgis-blog/products/arcgis-online/mapping/adding-and-using-photos-and-images/
Once you have the link, use that in the Excel/CSV file to add to your map, or publish as a hosted feature layer. Then you can configure the pop-up using that field.
Thank you Ben,
I now have a new question. Now that I have the pictures in the popup, they look fine on the map, but when I add an interactive legend to the map the pictures make the popups big and some need to be scrolled through. Is there a specific size the pictures need to be to fit into the popups on the interactive legend and is there an easy way to set it up or do I need to fix each individual picture where they are being accessed?
I am not sure I understand, especially the "scrolled through" part. In the pop-up, the pictures are constrained to fit within the pop-up. If you click to open a larger version, then depending on how large the photo you are opening is you might get the browser scroll bars. If you can share your web map or app with me I might be able to help further. You can reach me off this Community at bszukalski@esri.com.
Interactive legend will display the image in a pop-up that's a little larger than what you might see in the current Map Viewer since it is one of the JS API 4.x apps. The pop-up appearance will be the same as viewed using Map Viewer Beta, also based on the latest JS API. But in either case - using the classic map viewer and apps compared to the newer 4.x map viewer beta and apps, the picture will remain constrained within the pop-up, though the 4.x pop-up is slightly bigger.