Select to view content in your preferred language

Hyperlinking local files

2810
5
12-30-2011 06:49 AM
GrantWills
Deactivated User
This is a shot in the dark, but does anyone know if it is possible to hyperlink local computer files onto the internet without publishing each file out to the web. I am attempting to create a link field so that upon identifying a point within my flex viewer application it links to a photo. I can get it to work with only http:// addresses, I have tried using a file:/// prefix but that does not work either. It seems that if I am to make this work that I will have to give each of my photos an http:// address. Does anyone know a Work-around for this?

Thank you
Tags (2)
0 Kudos
5 Replies
BrianOevermann
Frequent Contributor
I may be misinterpreting exactly what you want to do, but here is what I do to link scanned pdf's of our parcel plat documents. I don't think you can get around having a URL for each, but I've made it less painful to maintain over time. I'll be generalizing the names...

All of the scanned plat pdf's (photos, in your case) are in a folder (or subfolder within...) on the network that the soc user has read access to.

In IIS I created a virtual directory that points to the scanned pdf folder and simply named the virtual directory 'plats'. It doesn't matter what the actual file structure is since you are pointing the virtual directory to that location (i.e. my plats are in \\myserver\department\files\stored\here\scanned_plats).

In my parcel layer I have three fields: PlatRoot, PlatFileName, PlatURL

I globally populate the PlatRoot field with 'http://myCity.com/plats/' (no quotes but ensure the trailing '/'). The PlatFileName contains just the pdf name (including any subfolder structure--i.e. 'someplat.pdf' or 'downtown/someplat.pdf'). To populate the filename I used a "file lister" application to dump the contents of my folder (and subfolders) into a text editor.  Then I replaced the '\' delimiters with '/' and simply copy/pasted the filenames into the relevant records within ArcGIS (I have a plat name field, so I simply selected records based on the plat name, then populated all of the records with the pdf filename).

I then concatenate the PlatRoot and PlatFileName fields into PlatURL using the field calculator in the attribute table window.  (i.e. [PlatRoot] & [PlatFileName])  If I ever need/want to change the virtual directory name or structure, it's simple to re-populate the PlatRoot field and then re-concatenate, hence the separate fields.

I use the excellent enhanced Identify widget from Mr. Scheitlin, so I just point the hyperlink field for the parcel layer to PlatURL and the user has a direct link to the plat documents! In effect, each pdf now has a distinct URL.

Admittedly, if your photos are scattered all over, this technique won't work very well. You would need to decide if it makes more sense to aggregate your photos into one location.

There are probably more elegant techniques...

Brian
0 Kudos
GrantWills
Deactivated User
Brain,

Thanks for those detailed instructions. I got it to work. The key for me was I was unaware how to get the http:// part of the file location. But your message helped me realize it was just the http:// of my mapping application. Thank you.

Grant
0 Kudos
PamelaKountz
New Contributor
I was sucessful in creating a hyperlink to one document, but now my project has several documents that need to link to a single polygon "area". Is there a way to search a directory and bring up a list of documents for the user to then choose which one to view?
0 Kudos
BrianOevermann
Frequent Contributor
Pamela,

I haven't tried the following with a public facing app, so I don't know if it will accomplish what you are wanting...

If all of the documents are in one folder, you could simply make your link in your data go to the folder itself rather than a specific document within.  Using my post above as the example, that would be synonymous with the PlatRoot field.  You may need to enable directory browsing on the virtual directory for this to work.

But... if you are using rscheitlin's Identify widget, I believe you can now include multiple links.  Check the readme document for the widget.  I haven't tried it as I currently have no need, but I believe it was changed at the 2.5 version of the widget.  You would then need to create/maintain whatever link fields you need within your data as well as create the appropriate virtual directories if there is more than one location you are pulling the documents from.
0 Kudos
AnthonyGiles
Honored Contributor
Pamela, Brian,

I hope you don't mind me adding to this, Roberts attachment relate widget also supports multiple hyperlinks, you could have a stand alone table that links your polygons (by object id) to attached documents (file names). That way you could have many documents to one polygon or many polygons to one document.

http://www.arcgis.com/home/item.html?id=4ec33120c9ea4d019fddf722fc34ea3c

Regards

Anthony
0 Kudos