Hyperlinks From ArcServer to Flexviewer

349
4
09-07-2011 12:36 PM
BarryHill1
New Contributor
Hello everyone,

I am having problems getting hyperlinks of documents created as a service in ArcServer to work in the Flex viewer. I'll try to give as much background as possible...

I use an attribute in the feature class (polygon shapefile) and hardcode the url in the attribute item that looks at a virtual folder on the server that contains the documents. Identifying the feature in ArcMap allows a hyperlink in the Identify window (lightning bolt) that opens an IE window. (Also, in the 'Map Document Properties' of ArcMap I hardcoded the path to the virtual directory in the 'Hyperlink Base:" field, and in the 'Layer Properties' hyperlink field I checked the 'Support Hyperlinks using field: and highlighted the url radio button.) All things I should do to support hyperlinks.  All good...

I publish the map document to Server and then edit my service (web application) to link through the Layer Properties, Records tab, Custom Formatting, and create the hyperlink from the attribute field. Identify a feature and the link works in the pop-up window. All things I should do to support hyperlinks. All good...

I tried it on other machines other than mine and hyperlinks work fine. They all see the virtual directory and can link to the documents.

I restart IE and start my Flex application which contains my published map service. Identify the feature and attributes pop up in the Identify window...The attribute (PDF_Hyperlinks) shows the pathname to the documents just as in ArcMap and ArcServer Web application, but it's not highlighted and therefore does not have a 'live' hyper link to the document.

First of all...Is this function avaialble in Flex? Is there a widget that needs to be coded? I see where images are hyperlinked so I know it can be done. I was just wondering why my service can see it through the IIS but Flex doesn't use it.

I am very new to Flex and am not a developer so I could very well be missing something. Thanks in advance.
Tags (2)
0 Kudos
4 Replies
RobertScheitlin__GISP
MVP Emeritus
Barry,

   Hyperlinks in flex will require a fully qualified url. For example http://yourwebserver/project1/document/mtpdf.pdf in the attribute field. Unlike ArcMap and other .Net technologies that can use the hyperlink prefix and or suffix from the map document. Unless you are using a widget like the IdentifyWidget or Enhanced Search Widget that support adding hyperlink prefix and or suffix in their config xml files. If you have a fully qualified url in an attribute the out of the box popup will allow the hyperlink to work as it searches each field that is displayed for http content. Hope this clears things up.
0 Kudos
BarryHill1
New Contributor
Robert,

Thanks for the response. I should have mentioned in the post that I am using the full url (i.e.)http://ServerName/VirtualFolder/DocumentFolder/Document.pdf and using your Identify Widget. I changed the config file to Identify my layers in the map and the attribute list, for example...

</layer>
  <layer>
   <name>LeaseParcels</name>
   <fields>Tenant,Type of Property,Folio Number,Project Number,Address,Port Region,Acreage,Square Footage,Type of Property,PDF Hyperlinks</fields>
   <linkfield></linkfield>
   <linkprefix></linkprefix>
   <linksuffix></linksuffix>
   <iconfield></iconfield>
   <iconprefix></iconprefix>
   <iconsuffix></iconsuffix>
   <zoomscale>15000</zoomscale>
   <forcescale>true</forcescale>
  </layer>
  <layer>

And everything works great. The table to my layers pop up and the 'map tips' work when hovering over an identified record. Is there something in this part of the code (or anywhere else) that I need to change to support the hyperlink? Otherwise I haven't changed anything else in the Identify Widget config file. Is there something in the Flexviewer config file?

Thanks
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Barry,

   So the issue is that you do have to tell most widgets (except the esri popup) which field to use as a hyperlink.

<linkfield>PDF_Hyperlinks</linkfield>
0 Kudos
BarryHill1
New Contributor
Robert,

Thank you. I picture you shaking your head saying 'rookie' (and hoping that's as bad as it got).
0 Kudos