Enhanced-Search-Widget-for-FlexViewer Part III

116388
776
04-30-2013 03:58 PM
RobertScheitlin__GISP
MVP Emeritus
All,

   Here is a new thread to post questions and discuss the Enhanched Search Widget. The old thread was getting too long.
Tags (2)
776 Replies
RobertScheitlin__GISP
MVP Emeritus
Bo,

   Back in 2.5 I had a PopUpRendererSkin.mxml included in the eSearch skins folder so that I could correct/add to it. In the more recent versions I have been able to just work with the API's PopUpRendererSkin without modification so it is no longer included in my widget. You will have to add it for the API source code. There are a dozen or more threads about how to go about doing this, so I won't re-write it here.
0 Kudos
AndrewHayden1
Occasional Contributor
In the configurePopUpInfo function, is there a way to access and loop through the fields configured in the xml similarly to how it's doing it with the links?
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Andrew,

   I suppose you could pass in the queryFields (with is an xmllist) just like I pass in the lyrQLinks (an Array).
0 Kudos
AndrewHayden1
Occasional Contributor
Thanks Robert,

I might be going about this wrong.  I'm not clear, where are you passing the fields to the popup?
0 Kudos
daveespinosa-aguilar
New Contributor
really loving this extended search widget. we've solved all our riddles for it so far except one: after a successful query has been completed, the resulting rows are not showing as selected features in the map. ideas? -dave
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Andrew,

   I don't have to send the fields to the popup... The popup renders its contents from the graphics attributes and my eSearch graphics have all the fields that are configured for the search layer based on the query task result. As you can see in the configurePopUpInfo function I choose to display an attribute of the graphic that I created called "content__pu__sr" which is large string as the popups description and an attribute called "title__pu__sr" as the popups title. The popup replaces these curly brace field names with actual field values when it renders. Probably does not get you any closer to what you are after but maybe it helps explain what is going on in the code.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Dave,
  
    Can you zoom your map out to the world extent and see if the graphics are in the arm-pit of Africa (i.e.at 0,0)? If so can you share your eSearchWidget.xml and let me know the WKID of your data.
0 Kudos
daveespinosa-aguilar
New Contributor
Dave,
  
    Can you zoom your map out to the world extent and see if the graphics are in the arm-pit of Africa (i.e.at 0,0)? If so can you share your eSearchWidget.xml and let me know the WKID of your data.


when zoomed out to world extent, graphics are not appearing anywhere (including the arm-pit of Africa) after successful query.
content of extended search widget xml (one layer) below.
coordinate system of the service being used (GISID) below.

grateful for your assistance with this,

-dave


<?xml version="1.0" ?>
<!-- See Enhanced Search Widget XML Configuration.pdf for detailed explanation -->
<configuration>
<layers>
<layer>
   <token/>
   <definitionexpression></definitionexpression>
   <enableexport>true</enableexport>
   <enableprintgrid title="Selected Addresses">false</enableprintgrid>
   <name>Find an Address</name>
   <url>http://arcgisprod01/ArcGIS/rest/services/Richland/GISID/MapServer/0</url>
   <expressions>
   <expression alias="Address" textsearchlabel="Search by providing an address:">
   <values>
     <value prompt="Example: 505, Swift, 505 Swift, 505 Swift Blvd, etc">upper(Landbase.dbo.ViewAddressForFlex.TheAddr) LIKE upper('%[value]%')     </value>
   </values>
   </expression>
   </expressions>
  <graphicalsearchlabel>Use one of the graphical search tools to select building(s)</graphicalsearchlabel>
   <spatialsearchlayer>false</spatialsearchlayer>
   <titlefield></titlefield>
   <linkfield></linkfield>
   <fields all="false">
                          <field name="Landbase.dbo.ViewAddressForFlex.TheAddr" gridfield="true"/>
                          <field name="Landbase.DBO.Addresses.ADDID" gridfield="true" gridfieldonly="true"/>
     <field name="Landbase.DBO.Addresses.AddressNo" gridfield="true" gridfieldonly="true"/>
     <field name="Landbase.DBO.Addresses.AddressUnit" gridfield="true" gridfieldonly="true"/>
     <field name="Landbase.DBO.Addresses.ZipCode" gridfield="true" gridfieldonly="true"/>
     <field name="Landbase.DBO.Addresses.Site" gridfield="true" gridfieldonly="true"/>
     <field name="Landbase.DBO.Addresses.Metadata" gridfield="true" gridfieldonly="true"/>
     <field name="Landbase.DBO.Addresses.GISAREA" gridfield="true" gridfieldonly="true"/>
   </fields>
   <zoomscale usegeometry="true" zoompercent="2"></zoomscale>
   <autoopendatagrid>false</autoopendatagrid>
   <relates/>
   <queryattachments>false</queryattachments>
   <symbology>
     <picturemarkersymbol url="assets/images/i_camera.png" height="30" width="30" xoffset="0" yoffset="0" />
   </symbology>
  </layer>
</layers> 

<buffervalue>2</buffervalue>
            <removeserchlayersminmaxscale>false</removeserchlayersminmaxscale>
<keepgraphicalsearchenabled>true</keepgraphicalsearchenabled>
<autozoomtoresults>false</autozoomtoresults>
<popupsdisabled>true</popupsdisabled>
<enabledatagridinteractionwithwidget>true</enabledatagridinteractionwithwidget>
<toleranceforpointgraphicalselection>6</toleranceforpointgraphicalselection><!-- value is in screen pixels -->
<tolerancebydefault>false</tolerancebydefault>
<spatialreference>102100</spatialreference>
<zoomscale>2400</zoomscale>
<csvseparator>,</csvseparator>
            <textqualifier>"</textqualifier>
<disablebuttons></disablebuttons>
<defaultselectionoption>textInput</defaultselectionoption>
<enabledrawgraphicbutton>false</enabledrawgraphicbutton>
<enablebuffergraphicbutton>false</enablebuffergraphicbutton>
        <enablelocategraphicbutton>false</enablelocategraphicbutton>
        <enablemultigraphicssearch>false</enablemultigraphicssearch>
        <enableincludetextsearch>false</enableincludetextsearch>
        <enableaddtollerance>false</enableaddtollerance>
        <enablegraphicsbuffering>false</enablegraphicsbuffering>
<selectedgraphicaltool></selectedgraphicaltool>
<multipartgraphicsearch>false</multipartgraphicsearch>
<floatorfixed>fixed</floatorfixed><!-- possible values are fixed and float -->
<relatetooltip>Show Relates</relatetooltip>
<relateicon>widgets/eSearch/assets/images/i_relate.png</relateicon>

<labels>
  <urlsearcherrormessage>URL search parameters are incorrect</urlsearcherrormessage>
  <includetextquery>include text query in selection criteria</includetextquery>
  <includetextquerywarn>Must be the same search layer in both
graphical and text search pages.</includetextquerywarn>
  <buffergrapicprops>Buffer graphic properties</buffergrapicprops>
  <bufferusergraphics>Buffer Graphic</bufferusergraphics>
  <norelatesfound>No related features found for: </norelatesfound>
  <norelatesfoundalerttitle>No Results</norelatesfoundalerttitle>
  <addtolerance>Add search tolerance to point selection</addtolerance>
  <existingdrawgraphicslabel>Use Existing Enhanced Draw Widget Graphics</existingdrawgraphicslabel>
         <existinglocategraphicslabel>Use Existing Enhanced Locate Widget Graphics</existinglocategraphicslabel>
  <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>
  <relatescsvdefaultname>Related Records</relatescsvdefaultname>
  <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>
  <bufferalpha>Fill opacity</bufferalpha>
  <buffercolor>Fill color</buffercolor>
  <nobuffercolor>No fill color</nobuffercolor>
  <bufferoutlinecolor>Outline color</bufferoutlinecolor>
  <nobufferoutlinecolor>No outline color</nobufferoutlinecolor>
  <bufferoutlinewidth>Outline Width</bufferoutlinewidth>
  <configbuffergra>Configure buffer graphic properties...</configbuffergra>
  <required>*</required>
  <requiredtooltip>This field is required.
Enter a value to enable search button</requiredtooltip>
  <selectmethodtip>Click to change the selection method</selectmethodtip>
  <newselectionmethodtip>Create new selection</newselectionmethodtip>
  <addselectionmethodtip>Add to current selection</addselectionmethodtip>
  <removeselectionmethodtip>Remove from current selection</removeselectionmethodtip>
  <pagingqueryerrormsg>Four unsucessfull attempts was made to get unique values for </pagingqueryerrormsg>
</labels>

<symbols>
  <simplefillsymbol color="0x00ffff" 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>

Coordinate System:
Name: NAD_1983_StatePlane_Washington_South_FIPS_4602_Feet
Projection: Lambert_Conformal_Conic
False_Easting: 1640416.666667
False_Northing: 0.000000
Central_Meridian: -120.500000
Standard_Parallel_1: 45.833333
Standard_Parallel_2: 47.333333
Latitude_Of_Origin: 45.333333
Linear Unit: Foot_US (0.304801)

Geographic Coordinate System: GCS_North_American_1983
Name: GCS_North_American_1983
Angular Unit: Degree (0.017453292519943295)
Prime Meridian: Greenwich (0.000000000000000000)
Datum: D_North_American_1983
  Spheroid: GRS_1980
    Semimajor Axis: 6378137.000000000000000000
    Semiminor Axis: 6356752.314140356100000000
    Inverse Flattening: 298.257222101000020000
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Dave,


  1. So are you using esri basemaps or are you only using your own data (including basemaps)?

  2. Did you find your graphics at 0,0?

  3. Is your data a joined to a database view?

0 Kudos
daveespinosa-aguilar
New Contributor
Dave,


  1. So are you using esri basemaps or are you only using your own data (including basemaps)?

  2. Did you find your graphics at 0,0?

  3. Is your data a joined to a database view?



1. we are using our own data
2. we did not find the graphics at 0,0
3. our data is joined to a database view, yes.
0 Kudos