+ Reply to Thread
Results 1 to 36 of 36

Thread: How to Display Attachments (ArcGIS Viewer for Flex)?

  1. #1
    Ramon Leal Pessôa
    Join Date
    Dec 2010
    Posts
    19
    Points
    0
    Answers Provided
    0


    0

    Question How to Display Attachments (ArcGIS Viewer for Flex)?

    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.

  2. #2
    Robert Scheitlin

    Join Date
    Mar 2010
    Posts
    9,239
    Points
    5578
    Answers Provided
    938


    0

    Lightbulb Re: How to Display Attachments (ArcGIS Viewer for Flex)?

    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


  3. #3
    Chris Brannin
    Join Date
    Sep 2010
    Posts
    83
    Points
    0
    Answers Provided
    3


    0

    Default Re: How to Display Attachments (ArcGIS Viewer for Flex)?

    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?

  4. #4
    Robert Scheitlin

    Join Date
    Mar 2010
    Posts
    9,239
    Points
    5578
    Answers Provided
    938


    0

    Lightbulb Re: How to Display Attachments (ArcGIS Viewer for Flex)?

    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


  5. #5
    Chris Brannin
    Join Date
    Sep 2010
    Posts
    83
    Points
    0
    Answers Provided
    3


    0

    Default Re: How to Display Attachments (ArcGIS Viewer for Flex)?

    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

  6. #6
    Robert Scheitlin

    Join Date
    Mar 2010
    Posts
    9,239
    Points
    5578
    Answers Provided
    938


    0

    Lightbulb Re: How to Display Attachments (ArcGIS Viewer for Flex)?

    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


  7. #7
    Chris Brannin
    Join Date
    Sep 2010
    Posts
    83
    Points
    0
    Answers Provided
    3


    0

    Default Re: How to Display Attachments (ArcGIS Viewer for Flex)?

    my code looks like this:

    http://******/flex/assets/images/

  8. #8
    Robert Scheitlin

    Join Date
    Mar 2010
    Posts
    9,239
    Points
    5578
    Answers Provided
    938


    0

    Question Re: How to Display Attachments (ArcGIS Viewer for Flex)?

    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


  9. #9
    Chris Brannin
    Join Date
    Sep 2010
    Posts
    83
    Points
    0
    Answers Provided
    3


    0

    Default Re: How to Display Attachments (ArcGIS Viewer for Flex)?

    I was leaving the link field blank.

  10. #10
    Robert Scheitlin

    Join Date
    Mar 2010
    Posts
    9,239
    Points
    5578
    Answers Provided
    938


    0

    Lightbulb Re: How to Display Attachments (ArcGIS Viewer for Flex)?

    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


  11. #11
    Chris Brannin
    Join Date
    Sep 2010
    Posts
    83
    Points
    0
    Answers Provided
    3


    0

    Default Re: How to Display Attachments (ArcGIS Viewer for Flex)?

    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!

  12. #12
    Robert Scheitlin

    Join Date
    Mar 2010
    Posts
    9,239
    Points
    5578
    Answers Provided
    938


    0

    Lightbulb Re: How to Display Attachments (ArcGIS Viewer for Flex)?

    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


  13. #13
    Chris Brannin
    Join Date
    Sep 2010
    Posts
    83
    Points
    0
    Answers Provided
    3


    0

    Default Re: How to Display Attachments (ArcGIS Viewer for Flex)?

    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.

  14. #14
    Robert Scheitlin

    Join Date
    Mar 2010
    Posts
    9,239
    Points
    5578
    Answers Provided
    938


    0

    Lightbulb Re: How to Display Attachments (ArcGIS Viewer for Flex)?

    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


  15. #15
    Chris Brannin
    Join Date
    Sep 2010
    Posts
    83
    Points
    0
    Answers Provided
    3


    0

    Default Re: How to Display Attachments (ArcGIS Viewer for Flex)?

    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

  16. #16
    Robert Scheitlin

    Join Date
    Mar 2010
    Posts
    9,239
    Points
    5578
    Answers Provided
    938


    0

    Lightbulb Re: How to Display Attachments (ArcGIS Viewer for Flex)?

    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


  17. #17
    Chris Brannin
    Join Date
    Sep 2010
    Posts
    83
    Points
    0
    Answers Provided
    3


    0

    Default Re: How to Display Attachments (ArcGIS Viewer for Flex)?

    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

  18. #18
    Robert Scheitlin

    Join Date
    Mar 2010
    Posts
    9,239
    Points
    5578
    Answers Provided
    938


    0

    Lightbulb Re: How to Display Attachments (ArcGIS Viewer for Flex)?

    Chris,

    OK then you don't need anything in the linkprefix and suffix then

    Code:
    <linkfield icon_or_txt_or_img="txt" linkalias="UWM" linkprefix="" linksuffix="">Hyperlink</linkfield>
    because currently this is what is happening then:

    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


  19. #19
    Chris Brannin
    Join Date
    Sep 2010
    Posts
    83
    Points
    0
    Answers Provided
    3


    0

    Default Re: How to Display Attachments (ArcGIS Viewer for Flex)?

    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>

  20. #20
    Robert Scheitlin

    Join Date
    Mar 2010
    Posts
    9,239
    Points
    5578
    Answers Provided
    938


    0

    Lightbulb Re: How to Display Attachments (ArcGIS Viewer for Flex)?

    Chris,

    Here is what you are asking I think.

    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>
    There is no such attribute as txt = "".
    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


  21. #21
    Chris Brannin
    Join Date
    Sep 2010
    Posts
    83
    Points
    0
    Answers Provided
    3


    0

    Default Re: How to Display Attachments (ArcGIS Viewer for Flex)?

    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!

  22. #22
    Robert Scheitlin

    Join Date
    Mar 2010
    Posts
    9,239
    Points
    5578
    Answers Provided
    938


    0

    Lightbulb Re: How to Display Attachments (ArcGIS Viewer for Flex)?

    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


  23. #23
    Chris Brannin
    Join Date
    Sep 2010
    Posts
    83
    Points
    0
    Answers Provided
    3


    0

    Cool Re: How to Display Attachments (ArcGIS Viewer for Flex)?

    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

  24. #24
    Robert Scheitlin

    Join Date
    Mar 2010
    Posts
    9,239
    Points
    5578
    Answers Provided
    938


    0

    Lightbulb Re: How to Display Attachments (ArcGIS Viewer for Flex)?

    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


  25. #25
    Chris Brannin
    Join Date
    Sep 2010
    Posts
    83
    Points
    0
    Answers Provided
    3


    0

    Default Re: How to Display Attachments (ArcGIS Viewer for Flex)?

    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

  26. #26
    Robert Scheitlin

    Join Date
    Mar 2010
    Posts
    9,239
    Points
    5578
    Answers Provided
    938


    0

    Lightbulb Re: How to Display Attachments (ArcGIS Viewer for Flex)?

    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


  27. #27
    Chris Brannin
    Join Date
    Sep 2010
    Posts
    83
    Points
    0
    Answers Provided
    3


    0

    Default Re: How to Display Attachments (ArcGIS Viewer for Flex)?

    Robert,

    Again, thank you for your time and aid with this!

    Cheers
    Chris

  28. #28
    Darryl Albert
    Join Date
    Apr 2010
    Posts
    106
    Points
    5
    Answers Provided
    1


    0

    Default Re: How to Display Attachments (ArcGIS Viewer for Flex)?

    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!!

  29. #29
    Robert Scheitlin

    Join Date
    Mar 2010
    Posts
    9,239
    Points
    5578
    Answers Provided
    938


    0

    Lightbulb Re: How to Display Attachments (ArcGIS Viewer for Flex)?

    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


  30. #30
    Darryl Albert
    Join Date
    Apr 2010
    Posts
    106
    Points
    5
    Answers Provided
    1


    0

    Default Re: How to Display Attachments (ArcGIS Viewer for Flex)?

    Ah, duh. My bad. I was thinking that was for something else. I will just crawl back in my hole now.

    Thanks again.

  31. #31
    Chris Brannin
    Join Date
    Sep 2010
    Posts
    83
    Points
    0
    Answers Provided
    3


    0

    Default Re: How to Display Attachments (ArcGIS Viewer for Flex)?

    @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?

  32. #32
    Robert Scheitlin

    Join Date
    Mar 2010
    Posts
    9,239
    Points
    5578
    Answers Provided
    938


    0

    Lightbulb Re: How to Display Attachments (ArcGIS Viewer for Flex)?

    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


  33. #33
    Chris Brannin
    Join Date
    Sep 2010
    Posts
    83
    Points
    0
    Answers Provided
    3


    0

    Default Re: How to Display Attachments (ArcGIS Viewer for Flex)?

    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)

  34. #34
    Robert Scheitlin

    Join Date
    Mar 2010
    Posts
    9,239
    Points
    5578
    Answers Provided
    938


    0

    Lightbulb Re: How to Display Attachments (ArcGIS Viewer for Flex)?

    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


  35. #35
    Chris Brannin
    Join Date
    Sep 2010
    Posts
    83
    Points
    0
    Answers Provided
    3


    0

    Default Re: How to Display Attachments (ArcGIS Viewer for Flex)?

    I figured as much, thanks again for the help!

  36. #36
    Liz D
    Join Date
    Jun 2010
    Posts
    44
    Points
    1
    Answers Provided
    1


    0

    Default Re: How to Display Attachments (ArcGIS Viewer for Flex)?

    Would this be possible with the Sample Flex Viewer 1.3? ...Showing the attachments using either the identify widget or the search widget?
    Thanks~

+ Reply to Thread

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts