Select to view content in your preferred language

eSearch - how to view attachments in popup?

4252
18
Jump to solution
08-10-2012 09:17 AM
MegPeterson
Regular Contributor
I have a point feature class with related attachements (photos) in a gdb. I'd like to view these in the popup associated with the eSearch widget, but I'm not sure how to configure the .xml. (I don't see any tags in the xml help configuration document.)

I tried <showattachments>true</showattachments> for my layer in the .xml, but no luck.

I'm also not sure what the tag <queryattachments> does....

Appreciate any help pointing me in the right direction!
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus
Meg,

   I am pretty confident I have it resolved in 3.0.7

Version 3.0.7 - 8/21/2012
* Tab labels are now configurable in the Fixed data grid (use the SearchWidgetFixedDG.xml).
* Fixed nobufferoutlincolor label being ignored in the eSearchWidget.xml
* Fixed show and hide animation on Fixed Datagrid.
* Fixed datagrid (if autohide) will show when a search is executed and hide with results are cleared.
* If multi field expressions are used, now all fields DO NOT have to be filled.
* Fixed PopUp Attachment Issue.

View solution in original post

0 Kudos
18 Replies
MegPeterson
Regular Contributor
Sleuthing away --

I just added <queryattachments>true</queryattachments> to my layer tag after finding this function in the eSearch.mxml:


private function configurePopUpInfo(links:Array):EnhancedPopUpInfo
   {
    var popUpInfo:EnhancedPopUpInfo = new EnhancedPopUpInfo;
    popUpInfo.title = "{title}";
    popUpInfo.description = "{content}";
    if(queryAttachments){
     popUpInfo.showAttachments = true;
    }

And I'm still out of luck.

Maybe something to do with the link tag and CDATA info? I was able to get the photo icon to load, but not able to see a thumbnail simialr to the Traffic Cameras example.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Meg,

   It seems like I forgot to document this feature alltoghter... Well you are half way there all you need to do is add the object id field to the list of fields.

                <field name="objectid" visible="false" />
0 Kudos
JustinNettleton
Deactivated User
Robert,
I am having a similar issues, except I am trying to show the pictures using the <link> tag. I can't get the image to show up in the popup but if i click on the popup box, it takes me straight to the photo.

Is there anyway to get a thumbnail of the photo to show up in that popup? 

Thanks,

[ATTACH=CONFIG]16906[/ATTACH]
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Justin,

   As the original posters issue was with attachments (very different that just a link) it would be best that you start your own thread instead of hijacking this one (a lot more detail will help also).
0 Kudos
MegPeterson
Regular Contributor
Hi Robert - Thanks for the response and updating the documentation.  I'm still a little stuck.

I added the 'OBJECTID_1' field as you suggested above and have queryattachments set to True.  (OBJECTID_1 is the field that seems to be linked to my attachments in the gdb). See the attached image. And the OBJECTID field didn't work.

I'm still getting the "No attachments" text and no thumbnails in the popup.

Any other suggestions? thanks, Meg
___________________________________

Here are the layer properties for my eSearchWidget.xml --

<layer>
   <definitionexpression></definitionexpression>
   <enableexport>true</enableexport>
   <name>Cultural Point Features</name>
   <url>http://pogis/ArcGIS/rest/services/LiveMaps_v10/CultRes_MegTest_Attach/MapServer/0</url>
   <expressions>
    <expression alias="Points" textsearchlabel="Search by EBRPD code:">
     <values>
      <value prompt="Example: achs001 or ac%">EBRPD_ID like '[value]'</value>
     </values>
    </expression>
   </expressions>
   <graphicalsearchlabel>Use one of the graphical search tools to select points</graphicalsearchlabel>
   <spatialsearchlayer>true</spatialsearchlayer>
   <titlefield>EBRPD_ID</titlefield>
   <fields all="false">
       <field name="OBJECTID_1" visible="false" />
    <field name="PRIMARY" alias="STATE REPORT NUMBER" gridfield="true" />
          <field name="TRINOMIAL" alias="TRINOMIAL???" gridfield="true" />
          <field name="NAT_HIS_LM" alias="NAT_HIS_LM???" gridfield="true" />
          <field name="CA_HIS_LM" alias="CA_HIS_LM???" gridfield="true"/>
          <field name="NAME" alias="NAME" gridfield="true"/>
          <field name="FEATTYPE" alias="FEATURE TYPE" gridfield="true"/>
          <field name="FEATSTYPE" alias="FEATURE SUBTYPE" gridfield="true"/>
             <field name="DESCRIP" alias="DESCRIPTION" gridfield="true"/>
          <field name="STRUCTURE" alias="STRUCTURE" gridfield="true"/>
          <field name="LAT_Y_CNTR" alias="LATITUDE" gridfield="true" />
          <field name="LON_X_CNTR" alias="LONGITUDE" gridfield="true" />
          <field name="IMAGE" alias="IMAGE" gridfield="true" />
   </fields>
   <links>
    <link alias="View Photo">
     <![CDATA[{IMAGE}]]>
     <icon><![CDATA[assets/images/i_camera.png]]></icon>
    </link>
   </links>
   <zoomscale usegeometry="true" zoompercent="1.2"></zoomscale>
   <queryattachments>true</queryattachments>
  </layer>
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Meg,

    Have you tried to get query the attachment from the REST Services directory page to make sure that ArcGIS Server is allowing access to your attachments?
0 Kudos
MegPeterson
Regular Contributor
Yes I can see the image when I query in REST and the pop up works when I use the standard ESRI popupconfig option in the config.xml (but I like your tool better):

<layer label="Cultural Resources" type="dynamic" visible="true" alpha="1"
                   url="http://pogis/ArcGIS/rest/services/LiveMaps_v10/CultRes_MegTest_Attach/MapServer">
                <sublayer id="0" popupconfig="popups/PopUp_CultRes_Points.xml"/>
                <sublayer id="1" popupconfig="popups/PopUp_CultRes_Lines.xml"/> 
                <sublayer id="2" popupconfig="popups/PopUp_CultRes_Area.xml"/> 
                <sublayer id="3" popupconfig="popups/PopUp_CultRes_SiteAreas.xml"/>     
            </layer>

Both screenshots attached (though obviously my cat is not a cultural resource but a placeholder....). Thanks.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Meg,

   I don't see where I asked what version of my eSearch widget you are using... Lets make sure you are using a version that supports this ability. When the widget is opened in your viewer hold your alt button and click on the widgets title and tell me what the dialog that pops up says.
0 Kudos
MegPeterson
Regular Contributor
ver 3.0.4
Build Date 8/8/2012
0 Kudos