Select to view content in your preferred language

Change link icon in Identify widget in flexviewer 2.2

1457
9
01-18-2011 04:50 AM
EricVenden
Frequent Contributor
I would like to change the default icon for link fields in the Identify widget.  I do not have an "iconfield" in my data, so I'm wondering if I can just specify the url to a particular image to use.  I have tried inserting a valid url in the iconfield tag, then the iconprefix tag, and the iconsuffix tag.  None of these worked.
Any ideas?
Thanks
Eric Venden
Gurnee, IL
Tags (2)
0 Kudos
9 Replies
RobertScheitlin__GISP
MVP Emeritus
Eric,

    Currently there is no way to do this without an icon field. If you add a text field you don't even have to populate it with any thing to get this to work just put the valid url in the prefix or suffix, but you have to specify a field to get it to work.
0 Kudos
MarcWeinshenker1
Regular Contributor
Maybe I'm misunderstanding the request, but can't you just replace the w_link.png in ..\assets\images with the preferred icon?  If the image needs to be re-sized, then IdResultItemRenderer.mxml would need to be edited and then re-compiled.  That's what I do to replace the little triangle arrow of the original w_link.png with one that adds the word "Link" in front of it.

Marc
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Marc,

   You are correct if you want to replace all the icons with the same one. The icon field portion of my identify widget is for when you want different icons based on the particular feature you identify. Say a pdf icon of one feature and a camera for another based on the endpoint of the hyperlink.
0 Kudos
EricVenden
Frequent Contributor
You are correct Richard - I wanted to change the icon based on what type of linked file/document.
Eric V
0 Kudos
EricVenden
Frequent Contributor
Robert - First, I apologize - in numerous postings I've referred to you as Richard.
I do appreciate your knowledge and contributions to this forum.

I have added a text field (ICONFLD) to features that I would like to change the hyperlink icon.  I've added the following code and the image has changed to the usual "missing" icon - like the app can't find the path.  The url is valid and I can view the image if I paste the URL into a browser.  I've opened permissions up on the folder (EVERYONE - full control) just in case it's a permissions issue.

Any ideas?

<layer>
    <name>Mains</name>
    <fields>Diameter,Material,Upstream Inv,Downstream Inv,Slope,Proj Num,Install Yr,Video Link,Owner,Status</fields>
    <linkfield>Video Link</linkfield>
    <linkprefix></linkprefix>
    <linksuffix></linksuffix>
    <iconfield>ICONFLD</iconfield>
    <iconprefix>http://arcgis-srv1.village.gurnee.il.us/icons/wmv.jpg</iconprefix>
    <iconsuffix></iconsuffix>
    <zoomscale>1800</zoomscale>
    <forcescale>true</forcescale>
</layer>

Thanks much
Eric V
Gurnee, IL
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Eric,

   Not a problem. So is the ICONFLD a string field that has nulls or empty text? Try doing a field calculation in ArcMap and populate all the rows with '' (an empty string)
0 Kudos
EricVenden
Frequent Contributor
Thanks for the suggestion Robert..I was wondering about that.  The fields are Null right now.  I will try your idea and check back.

Thanks
Eric
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
All,

   A new version of the identify widget is now available.

* 2.2.3 - Identify by point/line/extent/polygon are all now supported
- Info window will appear at the center of identified geometry now if returngeometryforzoom is set to true in xml file.
if returngeometryforzoom is true, when you mouse over a record the geometry for that particular record is drawn using the symbology defined in the xml
- The symbology used by the draw tools is now user defined in the xml
- Fixed an issues with link icon if prefix or suffix is supplied and a empty field.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Paul,

   Al of my widgets are now updated to Flex Viewer 2.3.x and most of them now take advantage of the new PopUpInfo window in FV 2.3.x and there for can not be used in Flex Viewer 2.2. The identify widget is one of the ones that does use new FV 2.3.x technology
0 Kudos