How can I use hyperlinks to add raster images to the map in ArcGIS Pro?

316
4
09-29-2020 10:07 AM
GregoryAllspaw
New Contributor III

This used to be extremely easy to set up in ArcMap.  Then they made it more complicated to set up, but you could still do it.  Now I'm trying to get up to speed on ArcGIS Pro, and I'm hitting a wall.

I have a polygon feature class, with a field containing a URL for each feature.  Each URL is a path to a georeferenced image file, stored on our in-house network. (most are .png, some are .tif or .jpg)

Hyperlinks are no longer part of layer Display properties.

I followed the procedure described here: ( FAQ: Is it possible to add a hyperlink path to a field in ArcGIS Pro? ) and I successfully added a hyperlink field that works from the pop up .... but it doesn't do what I need it to do.  This only opens the image in a photo viewer, but I need it to add the image to the map as a layer....preferably insert it into a specific group layer.

I have python code that I had entered into the hyperlink section of the layer display properties in my old ArcMap project that did exactly what I needed (and still need).....but I'm not sure how to implement this in Pro.

This should be extremely easy, but it's not.  Unless I'm missing something....someone please tell me I'm missing something simple! 

0 Kudos
4 Replies
GregoryAllspaw
New Contributor III

I still need help with this!  I would like input from ESRI staff, please!  I don't seem to have the ability to send this to anyone directly.

0 Kudos
Robert_LeClair
Esri Frequent Contributor

Gregory - you are correct that this functionality seems to be missing in AGP.  In reviewing this 2018 blog, it discusses using Arcade to launch a process such as viewing a PDF doc, etc.  I wonder if your Python script can be converted to Arcade to add the georeferenced image to a Pro Map View?

I did scan ArcGIS Ideas to see if this was previously mentioned but did not see it there either.  Perhaps you may want to add this to ArcGIS Ideas so it gets visibility with the AGP Developers.

0 Kudos
GregoryAllspaw
New Contributor III

Thanks for your input, Robert.  I don't think I want to dive into Arcade at this time, as I have my hands full with just trying to move over to Pro.

I should clarify that I am not set on the idea of using the pop up hyperlink to accomplish my goal....I was exploring that as a possibility, and I initially thought that it might be the quickest solution.

I have managed to make some progress by going another route, which is a Task coupled with a Python Script Tool.

I took the python code from my ArcMap project (which was stored as part of the display properties of my feature class layer)....and did A LOT of editing and made it into a script tool.  I had to update the code for Python 3, update methods used (because what works in the python window doesn't always work in a script tool), and I also need to account for the absence of pythonaddins in Pro (still have some work to do on this part) for some error handling.

The script requires a selection in order to run correctly, so I had to create a task to facilitate the user making the selection, and then the script tool runs as part of the task, after the selection is made.  It is still a work in progress, but I think I'm getting close to a satisfactory solution.

I am really peeved that I have to spend so much time re-engineering a solution that I developed many years ago....especially since the final product is most likely going to be a little less elegant solution compared to what I had in ArcMap.

If I get this up and going, I will post more details and code.

Thanks!

Robert_LeClair
Esri Frequent Contributor

Gregory - thank you for the update and your workflow to migrate to a AGP Task.  Working for Training Services, I'm not privy to the development process of AGP but do suspect that this functionality will be added in a future release.  If this does occur, then you "should" be able to use your updated Python3 code to work in the Layer Properties of AGP.  I recommend that you add this as an ArcGIS Idea so it's viewed by the AGP Development Team and up-voted by your peers too.

0 Kudos