Select to view content in your preferred language

Popup Imagery as Attachments not showing with Search Widget

1880
11
12-27-2011 02:25 PM
JeffreyUtter
Deactivated User
I'm trying to figure out why my photo attachments are not showing.
I created a Search Widget, modified the Louisville.xml to reflect my attributes.
The Search Widget works, showing my attributes from my msd file except for the attached photo.
Any help would be appreciated.
My config file:
<layer label="Alaska Camps and Cabins" type="dynamic" visible="false" alpha="0.6"
                   popupconfig="popups/PopUp_CampsnCabins.xml"
                   url="http://atlas/ArcGIS/rest/services/NSBAreaWideCampsAndCabins111611JAJ/MapServer"/>


My Search Widget file:
<?xml version="1.0" ?>
<configuration>
    <layers>
        <layer>
            <name>OwnerName</name>
            <url>http://atlas/ArcGIS/rest/services/NSBAreaWideCampsAndCabins111611JAJ/MapServer/0</url>
            <expression>OwnerNAME like '%[value]%'</expression>
            <textsearchlabel>Search by Owner Name  [ Example: Brower or bro%]</textsearchlabel>
            <titlefield>OWNERNAME</titlefield>
            <linkfield>URL</linkfield>
            <fields all="false">
            <field name="OwnerName" alias="OwnerName"/>
            <field name="Area_Location" alias="Area Location"/>
            <field name="Village_Location" alias="Village Location"/>
            <field name="Location_Number" alias="Location Number"/>
            <field name="Type" alias="Type"/>
          </fields>
          <showattachments>true</showattachments>  
        </layer>
        <layer>
            <name>Area_Location</name>
            <url>http://atlas/ArcGIS/rest/services/NSBAreaWideCampsAndCabins111611JAJ/MapServer/0</url>
            <expression>Area_Location like '%[value]%'</expression>
            <textsearchlabel>Search Area Location by its name... [ Example: Avalik or Ava%]</textsearchlabel>
            <titlefield>Area_Location</titlefield>
            <linkfield>URL</linkfield>
            <fields all="false">
            <field name="OwnerName" alias="OwnerName"/>
            <field name="Area_Location" alias="Area Location"/>
            <field name="Village_Location" alias="Village Location"/>
            <field name="Location_Number" alias="Location Number"/>
            <field name="Type" alias="Type"/>
            </fields>
        </layer>
        <layer>
            <name>Village_Location</name>
            <url>http://atlas/ArcGIS/rest/services/NSBAreaWideCampsAndCabins111611JAJ/MapServer/0</url>
            <expression>Village_Location like '%[value]%'</expression>
            <textsearchlabel>Search Village Location by its name... [ Example: Wainwright or Wai%]</textsearchlabel>
            <titlefield>Area_Location</titlefield>
            <linkfield>URL</linkfield>
            <fields all="false">
            <field name="OwnerName" alias="OwnerName"/>
            <field name="Area_Location" alias="Area Location"/>
            <field name="Village_Location" alias="Village Location"/>
            <field name="Location_Number" alias="Location Number"/>
            <field name="Type" alias="Type"/>
            </fields>
        </layer>
        <layer>
            <name>Location_Number</name>
            <url>http://atlas/ArcGIS/rest/services/NSBAreaWideCampsAndCabins111611JAJ/MapServer/0</url>
            <expression>Location_Number like '%[value]%'</expression>
            <textsearchlabel>Search Location Number by its name... [ Example: AIN-42 or AIN%]</textsearchlabel>
            <titlefield>Location_Number</titlefield>
            <linkfield>URL</linkfield>
            <fields all="false">
            <field name="OwnerName" alias="OwnerName"/>
            <field name="Area_Location" alias="Area Location"/>
            <field name="Village_Location" alias="Village Location"/>
            <field name="Location_Number" alias="Location Number"/>
            <field name="Type" alias="Type"/>
            </fields>
        </layer>


    </layers>
    <zoomscale>72224</zoomscale>
</configuration>

<!--
    See Search widget documentation at
    http://links.esri.com/searchwidget
-->



My Popup Widget file:
<?xml version="1.0" ?>
<configuration>
    <title>{NAME}</title>
    <description>
        <![CDATA[<b>Owners Name {OwnerName}</b> is a <i>Native Owned {Type}</i> located in the {Area_Location} of the  {Village_Area} area. It has a designation number of {Location_Number}.]]>
    </description>
    <fields>
        <field name="OwnerName"/>
        <field name="Area_Location"/>
        <field name="Village_Area"/>
        <field name="Type"/>
        <field name="Location_Number">
       </field>
       <Showattachments>True</Showattachments>
    </fields>
</configuration>

<!--
    Pop-up configuration file for:
    http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Hurricanes/NOAA_Tracks_1851_2007/MapServe...

    See pop-up documentation at
    http://links.esri.com/flexviewer/popups
-->
Tags (2)
0 Kudos
11 Replies
RobertScheitlin__GISP
MVP Emeritus
Jeff,


  Case is always going to bite you if you don't pay attention to it.

PopUp configuration:
<showattachments>true</showattachments>



Also no where in the layer tag is there a showattachments element for the SearchWidget.xml. For a list of all supported elements/tags in the SearchWidget look here:

http://help.arcgis.com/en/webapps/flexviewer/help/01m3/01m300000023000000.htm
0 Kudos
JeffreyUtter
Deactivated User
Yes, Case gets me everytime, but still doesn't show after making your corrections.
For simplicity, I only attached 1 photo to one site, Kippi, to test the process will work.
I double check the mxd file, and yes the file is attached. The mxd file published OK, no errors.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Jeff,

   You are still a little confused on how this all works. The PopUp that you configured to show attachments has nothing to do with the search widget... The popup that will have the attachment will only show when you click on the feature that you have the popup configured for that layer and does not have anything to do with the search widget. Maybe you need to read up on PopUps:

http://help.arcgis.com/en/webapps/flexviewer/help/01m3/01m300000013000000.htm
0 Kudos
JeffreyUtter
Deactivated User
Well, I read and re-read the Pop-ups.
I am still confused. I thought the Search Widget, with the Config Popup code could call up the Pupup thru that widget.
I'm lost............
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Jeff,

   I am not sure what else to tell you. The PopUps work (are displayed) based on a map click, on a feature that has popups configured, and is completely independent of any widget. Currently there is no search widget (out of the box, or custom developer widget) that supports attachments.
0 Kudos
JeffreyUtter
Deactivated User
OK, so if I go with an Operational Layer using Popupconfig, my code would look like this?
<layer label="Camps and Cabins" type="dynamic" visible="false"
url="http://atlas/ArcGIS/rest/services/NSBAreaWideCampsAndCabins111611JAJ/MapServer">
<sublayer id="0" popupconfig="popups/PopUp_CampsnCabins.xml"/></layer>

When I do, the fields are showing, but no photo.
0 Kudos
JeffreyUtter
Deactivated User
Looks like I will go with an Operational Layer for Camps and Cabins.
The popup code is:
<?xml version="1.0" ?>
<configuration>
    <title>{AK Camps and Cabins}</title>
<description>
        <![CDATA[<b>{OwnerName}</b>, an <i>Alaska Native, </i> is the owner of this {Type}, which is located in the {Area_Location} of the  {Village_Area} area. It has a designation number of {Location_Number}.]]>
    </description>
    <fields>
        <field name="OWNERNAME"/>
        <field name="AREA_LOCATION"/>
        <field name="VILLAGE_AREA"/>
        <field name="TYPE"/>
        <field name="LOCATION_NUMBER"/>
        <field name="TYPE"/>
    </fields>
<medias>     imageLinkURL = "{URL}"
</medias>
    <showattachments>true</showattachments>
</configuration>

<!--
    Pop-up configuration file for:
   http://atlas/ArcGIS/rest/services/NSBAreaWideCampsAndCabins111611JAJ/MapServer
    See pop-up documentation at
    http://links.esri.com/flexviewer/popups
-->

I'm alot closer, but the photo still dosen't want to come in. Clicking on the Blue JPG icon gives me another window opening up with a 500 Server Error.
We checked the IIS permissions and all five arcgis folders are there.
Any thoughts?
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Jeff,

   So you enable attachments on a featureclass in ArcCatalog and tested in ArcMap that the attachments are working right?

Image one will be what the popup looks like when you have clicked on a feature tht has attachments and you have everything configured correctly.

[ATTACH=CONFIG]10833[/ATTACH]

Make sure that you REST Service directory for the layer with attachments is reporting that it does have attachments enabled as depicted in image 2.
[ATTACH=CONFIG]10834[/ATTACH]
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Jeff,

   So I am not sure if you are actually using Attachments or not... Based on your last post it looks like you just have a field that has a URL to an image. If that is the case than try this:

<?xml version="1.0" ?>
<configuration>
    <title>{AK Camps and Cabins}</title>
    <description>
<![CDATA[<b>{OwnerName}</b>, an <i>Alaska Native, </i> is the owner of this {Type}, which is located in the {Area_Location} of the {Village_Area} area. It has a designation number of {Location_Number}.]]>
    </description>
    <fields>
        <field name="OWNERNAME" />
        <field name="AREA_LOCATION" />
        <field name="VILLAGE_AREA" />
        <field name="TYPE" />
        <field name="LOCATION_NUMBER" />
        <field name="TYPE" />
        <field name="URL" />
    </fields>
    <medias>
        <media type="image" caption="some caption for the image" imagesource="{URL}" imagelink="{URL}"/>
    </medias>
    <showattachments>true</showattachments>
</configuration>

<!-- Pop-up configuration file for: http://atlas/ArcGIS/rest/services/NS...1JAJ/MapServer 
    See pop-up documentation at http://links.esri.com/flexviewer/popups -->
0 Kudos