Select to view content in your preferred language

eSearch Widget not working for Flex 2.4

2572
10
08-25-2011 08:47 AM
HarrietMcQuade
Emerging Contributor
Hi there,

I have recently downloaded flex viewer 2.4, and am trying to use the advanced search widget (eSearch), and it is not working. The icon appears in my web application but once clicked nothing actually happens, I don't even get an error? It worked for a collegue in 2.1 but not for me. Below is my config, can anyone help?

Harriet

<configuration>
<layers>
  <layer>
   <definitionexpression></definitionexpression>
   <enableexport>true</enableexport>
            <name>Address Search</name>
            <url>http://baltimore/ArcGIS/rest/services/ATLAS_Contact/Contact_Dynamic/MapServer/2</url>
            <expressions>
             <expression alias="Address Search" textsearchlabel="Enter Any part of Address [ Example: 5 Victor Drive ]:">ADDRESS LIKE ('%[value]%')</expression>
             <expression alias="UPRN Search" textsearchlabel="Enter UPRN [ Example: 010012150891 ]:">UPRN LIKE ('[value]%')</expression>

   </expressions>
            <graphicalsearchlabel>Use one of the graphical search tools to select a property</graphicalsearchlabel>
   <spatialsearchlayer>true</spatialsearchlayer>
   <titlefield>UPRN</titlefield>
            <linkfield linkprefix="" linksuffix=""></linkfield>
   <icon isfield="true" iconprefix="" iconsuffix=""></icon>
            <fields all="false">
    <field name="UPRN" gridfield="true"/>
    <field name="ADDRESS" gridfield="true"/>
    <field name="BLPU_CLASS_DESC" gridfield="true"/>
   </fields>
            <zoomscale usegeometry="false">5000</zoomscale>
        </layer>
</layers>
<spatialrelationships>
  <!-- possible spatial relationships  
   esriSpatialRelIntersects | esriSpatialRelContains | esriSpatialRelCrosses | esriSpatialRelEnvelopeIntersects | esriSpatialRelIndexIntersects | esriSpatialRelOverlaps | esriSpatialRelTouches | esriSpatialRelWithin
  
   currently unavailable:
    esriSpatialRelRelation
  -->
  <spatialrelationship>
   <name>esriSpatialRelContains</name>
   <label>entirely contained in</label>
  </spatialrelationship>
  <spatialrelationship>
   <name>esriSpatialRelIntersects</name>
   <label>interssected by</label>
  </spatialrelationship>
  <spatialrelationship>
   <name>esriSpatialRelEnvelopeIntersects</name>
   <label>intersected by envelop of</label>
  </spatialrelationship>
</spatialrelationships>
<bufferunits>
  <bufferunit>
   <name>UNIT_FOOT</name>
   <label>Feet</label>
  </bufferunit>
  <bufferunit>
   <name>UNIT_STATUTE_MILE</name>
   <label>Miles</label>
  </bufferunit>
  <bufferunit>
   <name>UNIT_METER</name>
   <label>Meters</label>
  </bufferunit> 
  <bufferunit>
   <name>UNIT_KILOMETER</name>
   <label>Kilometers</label>
  </bufferunit>
</bufferunits>
<tolerance>6</tolerance>
<spatialReference>102003</spatialReference>
<zoomscale>2400</zoomscale>
<geometryservice>http://tasks.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer</geometryservice>
<csvSeparator>,</csvSeparator>
<toleranceforpointgraphicalselection>6</toleranceforpointgraphicalselection><!-- value is in screen pixels -->
<disablebuttons></disablebuttons><!--possible values one or more not all three search types comma sepearted text,graphic,spatial,grid -->
<defaultselectionoption>textInput</defaultselectionoption><!--possible values only one graphicalInput or textInput or spatialInput -->
<enabledrawgraphicbutton>true</enabledrawgraphicbutton>
<enablebuffergraphicbutton>true</enablebuffergraphicbutton>
<selectedgraphicaltool></selectedgraphicaltool><!-- possible values are extent or polygon or mappoint or polyline or nothing -->
<multipartgraphicsearch>false</multipartgraphicsearch>
<labels>
  <addtolerance>Add search tolerance to point selection</addtolerance>
  <existingdrawgraphicslabel>Use Existing eDraw Widget Graphics</existingdrawgraphicslabel>
  <existingbuffergraphicslabel>Use Existing Point Buffer Widget Graphics</existingbuffergraphicslabel>
  <graphicalsearchlabel>Graphical Search</graphicalsearchlabel>
  <textsearchlabel>Text Search</textsearchlabel>
  <resultslabel>Results</resultslabel>
  <layerlabel>Search Layer:</layerlabel>
  <layerfieldlabel>Search Layer Field:</layerfieldlabel>
  <nolayerlabel>No search layer defined.</nolayerlabel>
  <submitlabel>Search</submitlabel>
  <pointlabel>Select by Point</pointlabel>
  <linelabel>Select by Line</linelabel>
  <rectanglelabel>Select by Rectangle</rectanglelabel>
  <polygonlabel>Select by Polygon</polygonlabel>
  <clearlabel>Clear</clearlabel>
  <loadinglabel>Loading...</loadinglabel>
  <selectionlabel>Features Selected:</selectionlabel>
  <gridresultsLabel>Show Results in Grid</gridresultsLabel>
  <csvdefaultname>Selected Records</csvdefaultname>
  <exportbtnlabel>Export...</exportbtnlabel>
  <export2csvoptionlabel>Export to CSV...</export2csvoptionlabel>
  <export2txtoptionlabel>Export to Txt...</export2txtoptionlabel>
  <bufferLabel>apply a search distance:</bufferLabel>
  <spatialsearchLabel>Spatial search</spatialsearchLabel>
  <applybufferlabel>Apply buffer</applybufferlabel>
  <searchlayerlabel>Search entities of:</searchlayerlabel>
  <enablemultipartsearch>enable multi-part graphics</enablemultipartsearch>
  <zoomalllabel>Zoom</zoomalllabel>
  <zoomalltip>Zoom to all results</zoomalltip>
</labels>
<symbols>
     <simplefillsymbol color="0xff0000" alpha="0.5">
      <outline color="0xff0000" alpha="0.8" width="2"/>
     </simplefillsymbol>
     <!-- You can have one or the other, either simplemarkersymbol or picturemarkersymbol
          defined for your point results NOT BOTH. picturemarkersymbol will override simplemarkersymbol
          if you do not have it commented out. -->
     <simplemarkersymbol style="square" size="12" color="0xff0000" alpha="0.5" xoffset="0" yoffset="0" angle="0">
      <outline style="solid" color="0x000000" alpha="1" width="1"/>
     </simplemarkersymbol>
<!--      <picturemarkersymbol url="assets/images/i_search.png" height="30" width="30" xoffset="0" yoffset="0" /> -->
  <simplelinesymbol color="0xff0000" alpha="0.8" width="2"/>
    </symbols>
</configuration>
Tags (2)
0 Kudos
10 Replies
RobertScheitlin__GISP
MVP Emeritus
Harriet,

   Yep a lot of people are using this widget in 2.4 as well as my live preview site that is in 2.4. If you are using the compiled version than per the instructions all you would have to do is copy the eSearch folder to the widgets folder in your flex viewer deployment and add this xml to your main config.xml:

<widget label="Enhanced Search" left="60" top="400"
                icon="assets/images/i_search.png"
                config="widgets/eSearch/SearchWidget.xml"
                url="widgets/eSearch/SearchWidget.swf"/>


A mistake that many people make is that Flex is a case sensitive language so you have to copy the folder exactly as in the instructions (i.e. eSearch).
0 Kudos