How to display attachment on the ArcGIS Viewer for Flex?
I would like to display jpeg images attachments of "OperationalLayers" with "SimpleInfoWindowWidget" or "InfoPopupWidget"...
Is this possible?
How to do?
Thanks!
How to display attachment on the ArcGIS Viewer for Flex?
I would like to display jpeg images attachments of "OperationalLayers" with "SimpleInfoWindowWidget" or "InfoPopupWidget"...
Is this possible?
How to do?
Thanks!
Last edited by ramonrlp; 02-02-2011 at 05:41 AM.

Ramon,
Look here:
http://www.arcgis.com/home/item.html...ddf722fc34ea3c
Just because it's not the answer you want, does not mean that it is not the answer.
Robert Scheitlin
GIS Manager
Calhoun County, Alabama
I cannot get images to show up in the info window. I'm using the attrelateinfowindow and have uncommeted the multiimage script and replaced the link with my own server. any ideas as to why this might not be working or am I missing something?

Chris,
Are your images using an IIS virtual directory and the whole url to the image. You can not use a local file path when using Flash Player.
Just because it's not the answer you want, does not mean that it is not the answer.
Robert Scheitlin
GIS Manager
Calhoun County, Alabama
Yes I am, I have the images on the server in a similar fashion to the examples. Do I place the images in the suffix and the directory in the prefix? Sorry this is my first time using Flex and I'm still learning the run arounds. Thanks for the help!
Cheers
Chris

Chris,
Look at this example:
Code:<multiimagefield linkprefix="http://gis.calhouncounty.org/FlexViewer2.2/assets/images/" linksuffix="" nexttooltip="Next" prevtooltip="Prev">URL</multiimagefield>
Just because it's not the answer you want, does not mean that it is not the answer.
Robert Scheitlin
GIS Manager
Calhoun County, Alabama
my code looks like this:
http://******/flex/assets/images/

Chris,
Hmm. What does the contents of one of your link field look like?
Just because it's not the answer you want, does not mean that it is not the answer.
Robert Scheitlin
GIS Manager
Calhoun County, Alabama
I was leaving the link field blank.

Chris,
If you are attempting to use the multiimage portion of this widget than the field has to have data like this example:
Code:Whitehall_1.jpg,Whitehall_2.jpg,Whitehall_3.jpg,Whitehall_4.jpg,Whitehall_5.jpg,Whitehall_6.jpg,Whitehall_7.jpg,Whitehall_8.jpg,Whitehall_9.jpg,Whitehall_10.jpg
Just because it's not the answer you want, does not mean that it is not the answer.
Robert Scheitlin
GIS Manager
Calhoun County, Alabama
This also does not work. Do I need to have these images in the attributes? This is what my code looks like:
<multiimagefield linkprefix="http://gis.*****/flex/assets/images/img/" linksuffix="globe.png,default.png,Splash.jpg" nexttooltip="Next" prevtooltip="Prev">URL</multiimagefield>
Thanks again for all the help!

Chris,
Yes for the multiImages to work the values have to come from the attribute field.
Just because it's not the answer you want, does not mean that it is not the answer.
Robert Scheitlin
GIS Manager
Calhoun County, Alabama
So I having an issue with getting my hyperlinks to actually link to their respected websites. What is happening(or not) when the popup is open the hyperlink shows but is not clickable.

Chris,
Due to lack of detail, I really can not say... Maybe you should post your xml.
Just because it's not the answer you want, does not mean that it is not the answer.
Robert Scheitlin
GIS Manager
Calhoun County, Alabama
Robert,
here is the code:
<linkfield icon_or_txt_or_img="txt" linkalias="UWM" linkprefix="http://www4.uwm.edu" linksuffix="/pps/Sustainability/CampusInit/renewable-energy.cfm">Hyperlink</linkfield>
Cheers
Chris

Chris,
Can you give me a complete url that should work for this? and an example of that is in the Hyperlink field for one of the features?
Just because it's not the answer you want, does not mean that it is not the answer.
Robert Scheitlin
GIS Manager
Calhoun County, Alabama
Robert,
This is exactly how it is displayed in the Hyperlink field within the attribute table:
http://www4.uwm.edu/pps/Sustainabili...ble-energy.cfm

Chris,
OK then you don't need anything in the linkprefix and suffix then
because currently this is what is happening then:Code:<linkfield icon_or_txt_or_img="txt" linkalias="UWM" linkprefix="" linksuffix="">Hyperlink</linkfield>
http://www4.uwm.eduhttp://www4.uwm.edu/pps/Sustainability/CampusInit/renewable-energy.cfm/pps/Sustainability/CampusInit/renewable-energy.cfm
Just because it's not the answer you want, does not mean that it is not the answer.
Robert Scheitlin
GIS Manager
Calhoun County, Alabama
Robert,
Am I missing where to place the text that I would Like to hyperlink?
<fields>NAME,Type,Hyperlink</fields>
<titlefield>Type</titlefield>
<links>
<linkfield icon_or_txt_or_img="txt" txt="Hyperlink" linkalias="" linkprefix="" linksuffix="">Hyperlink</linkfield>
</links>

Chris,
Here is what you are asking I think.
There is no such attribute as txt = "".Code:<fields>NAME,Type,Hyperlink</fields> <titlefield>Type</titlefield> <links> <linkfield icon_or_txt_or_img="txt" linkalias="Click Here" linkprefix="" linksuffix="">Hyperlink</linkfield> </links>
Just because it's not the answer you want, does not mean that it is not the answer.
Robert Scheitlin
GIS Manager
Calhoun County, Alabama
Robert,
haha, ya I placed that in there to see what would happen. Let me see if I am actually understanding how this code is working.
<field> displays the fields from the attribute table
<linkfield> is linking to a specified field in the attribute table
the linkfield icon_or_txt_or_img="txt" is connecting to a text which is connected to linkalias. linkalias is being defined here and is not just for a mouse hover over?
linkprefix/suffix can be used if there is no URL in the attribute table
My question is... when I have Hyperlink in the <linkfield> is no longer shows up in the popup. When Hyperlink is only in the <field> tag then it displays a not working url.
Can I please see a similar working example code to what I am trying to do so I can compare?
Thanks again for all the help!

Chris,
Have you looked at the Attachment Relate Info Window Widget XML Configuration.pdf in the download?
You can also look at IWT_Cameras.xml in the download as well.
Just because it's not the answer you want, does not mean that it is not the answer.
Robert Scheitlin
GIS Manager
Calhoun County, Alabama
Robert,
So after reading the PDF while working with you, I realized that the PDF says txt and the IWT_Cameras says text. text seems to be the winning combination because it is working like a dream!
I can't thank you enough for your help on this too!
Cheers
Chris

Chris,
Thanks for letting me know about the mistake in the pdf I will get it updated ASAP.
Just because it's not the answer you want, does not mean that it is not the answer.
Robert Scheitlin
GIS Manager
Calhoun County, Alabama
Robert,
One more question for you. When I link an image to the popup, do I just put another field in the attribute table and linkfield to that? Once it is linked it then clips the image to fit into the popup?
Cheers
Chris

Chris,
Yes just add another field that contains the whole url or just the file name and then use the linkprefix and suffix. No it does not clip is resizes to fit.
Just because it's not the answer you want, does not mean that it is not the answer.
Robert Scheitlin
GIS Manager
Calhoun County, Alabama
Robert,
Again, thank you for your time and aid with this!
Cheers
Chris
Hey Robert, very nice widget, I got it running this morning. Are there any plans in the future to incorporate the new feature attachment capabilities in ArcGIS 10 that allows storage of the attachments directly in the db?
Thanks again for the widget!!

Darryl,
That's what the attachment portion of this widget uses. I don not have any plans to allow upload of attachments though.
Just because it's not the answer you want, does not mean that it is not the answer.
Robert Scheitlin
GIS Manager
Calhoun County, Alabama
Ah, duh. My bad. I was thinking that was for something else. I will just crawl back in my hole now.
Thanks again.
@rscheitlin
I do have a question about how the widget decides on how large the image within the info bubble will be. It appears to be in relation to how long the text string is but I am not sure. Is there there a way to standardize the way images are displayed?

Chris,
If you look in the AttRelateInfoWinWidget.mxml line 595 is where the image element begins and the maxWidth is set there you can hard code a value if you want to standardize it.
Just because it's not the answer you want, does not mean that it is not the answer.
Robert Scheitlin
GIS Manager
Calhoun County, Alabama
But then does the whole project need to be re-compiled? I am also assuming that because it is set as a percent I can also set it as a pixel value? (sorry if these are dumb questions)

Chris,
Yep, you will have to recompile and yep, you can use pixel values (i.e. 400)
Just because it's not the answer you want, does not mean that it is not the answer.
Robert Scheitlin
GIS Manager
Calhoun County, Alabama
I figured as much, thanks again for the help!
Would this be possible with the Sample Flex Viewer 1.3? ...Showing the attachments using either the identify widget or the search widget?
Thanks~
Bookmarks