Select to view content in your preferred language

Question/Clairification about eSearch Widget v3.1

514
2
Jump to solution
10-19-2013 09:48 AM
RachelAlbritton
Frequent Contributor
I'm using eSearch widget 3.1 and for the most part it works great (Thank you!). My only question is, I was under the impression that the tool also physically selected out the searched record(s) in the specifed layer(s). Currently, the tool finds the correct record and zooms to its location, but the actual record doesn't appear to be selected. Am I wrong in thinking that the widget should actually select the record? Eventually what I'm wanting is for a geoprocessing task to run on the selected record so if this doesn't perform that step I may need to integrate in an intermediate step.
Here's a link to the draft application so you can see what I'm talking about.
My code is posted below if needed.

<?xml version="1.0" ?> <!-- See Enhanced Search Widget XML Configuration.pdf for detailed explanation --> <configuration>  <layers>   <layer>    <token/>    <definitionexpression></definitionexpression>    <enableexport>true</enableexport>    <name>Building Centroids</name>    <url>http://152.46.17.82/arcgis/rest/services/surf_city/SurfCity/MapServer/0</url>    <expressions>     <expression alias="Address" textsearchlabel="Search for Parcel by Address:">      <values>       <value prompt="Example: 123 S 3RD ST" uniquevalsfromfield="hadd" isvaluerequired="true" autosubmit="true">hadd = '[value]'</value>      </values>     </expression>     <expression alias="Parcel ID" textsearchlabel="Search by Parcel ID:" isvaluerequired="true">      <values>       <value prompt="Example: 2630" uniquevalsfromfield="id" >id = '[value]'</value>      </values>     </expression>    </expressions>    <!--graphicalsearchlabel>Use one of the graphical search tools to Search Parcels</graphicalsearchlabel -->    <!--spatialsearchlayer>false</spatialsearchlayer-->    <titlefield>hadd</titlefield>    <fields all="false">     <field name="id" gridfield="true"/>     <field name="hadd" gridfield="true"/>     <field name="floors" gridfield="true"/>    </fields>    <links/>    <zoomscale usegeometry="true" zoompercent="2"></zoomscale>    <autoopendatagrid>true</autoopendatagrid>    <queryattachments>true</queryattachments>    <relates/>    <symbology>     <simplefillsymbol color="0xff0000" alpha="0.5">      <outline color="0xff0000" alpha="0.8" width="2" />     </simplefillsymbol>    </symbology>   </layer>  </layers>    <bufferunits>   <bufferunit selected="true">    <name>UNIT_FOOT</name>    <label>Feet</label>   </bufferunit>   <bufferunit>    <name>UNIT_METER</name>    <label>Meters</label>   </bufferunit>  </bufferunits>  <buffervalue>10</buffervalue>  <printdatagrid>   <addheadertoeachpage>true</addheadertoeachpage>   <columnheaderbgcolor>0xa7a7a7</columnheaderbgcolor>   <columnheaderfontcolor>0x000000</columnheaderfontcolor>   <footer>    <pageoftext>Page ## of ##</pageoftext>    <includeprintdate format="MM-DD-YYYY L:NN A">true</includeprintdate>    <disclaimer></disclaimer><!-- be carefull of the length -->   </footer>  </printdatagrid>  <keepgraphicalsearchenabled>true</keepgraphicalsearchenabled>  <autozoomtoresults>true</autozoomtoresults>  <popupsdisabled>false</popupsdisabled>  <enabledatagridinteractionwithwidget>true</enabledatagridinteractionwithwidget>  <toleranceforpointgraphicalselection>6</toleranceforpointgraphicalselection><!-- value is in screen pixels -->  <tolerancebydefault>false</tolerancebydefault>  <spatialreference>102100</spatialreference>  <zoomscale>2400</zoomscale>  <csvseparator>,</csvseparator>  <disablebuttons></disablebuttons><!--possible values one or more not all four search types comma separated text,graphic,spatial,result,datagrid -->  <defaultselectionoption>textInput</defaultselectionoption><!--possible values only one graphicalInput or textInput or spatialInput -->  <enabledrawgraphicbutton>false</enabledrawgraphicbutton>         <enablelocategraphicbutton>false</enablelocategraphicbutton>  <enablebuffergraphicbutton>false</enablebuffergraphicbutton>  <selectedgraphicaltool></selectedgraphicaltool><!-- possible values are extent or polygon or mappoint or polyline or nothing -->  <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>   <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>  </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>
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus
Rachel,

   You are making a simple mistake in your layers configuration (one  that several people have made). Your layer has a geometry type of point  your you are using the default symbology tag that is intended for a  layer that is a polygon geometry type.
You need to change that to a simplemarkersymbol or picturemarker symbol.

        <layer>             <token/>             <definitionexpression></definitionexpression>             <enableexport>true</enableexport>             <name>Building Centroids</name>             <url>http://152.46.17.82/arcgis/rest/services/surf_city/SurfCity/MapServer/0</url>             <expressions>                 <expression alias="Address" textsearchlabel="Search for Parcel by Address:">                     <values>                         <value prompt="Example: 123 S 3RD ST" uniquevalsfromfield="hadd" isvaluerequired="true" autosubmit="true">hadd = '[value]'</value>                     </values>                 </expression>                 <expression alias="Parcel ID" textsearchlabel="Search by Parcel ID:" isvaluerequired="true">                     <values>                         <value prompt="Example: 2630" uniquevalsfromfield="id" >id = '[value]'</value>                     </values>                 </expression>             </expressions>             <!--graphicalsearchlabel>Use one of the graphical search tools to Search Parcels</graphicalsearchlabel -->             <!--spatialsearchlayer>false</spatialsearchlayer-->             <titlefield>hadd</titlefield>             <fields all="false">                 <field name="id" gridfield="true"/>                 <field name="hadd" gridfield="true"/>                 <field name="floors" gridfield="true"/>             </fields>             <links/>             <zoomscale usegeometry="true" zoompercent="2"></zoomscale>             <autoopendatagrid>true</autoopendatagrid>             <queryattachments>true</queryattachments>             <relates/>             <symbology>                 <simplefillsymbol color="0xff0000" alpha="0.5">                     <outline color="0xff0000" alpha="0.8" width="2" />                 </simplefillsymbol>             </symbology>         </layer>



as far as using a search result from the eSearch as an input for a  geoprocessing task I don't have any experience doing something like that  to be able to provide any guidance there.

View solution in original post

0 Kudos
2 Replies
RobertScheitlin__GISP
MVP Emeritus
Rachel,

   You are making a simple mistake in your layers configuration (one  that several people have made). Your layer has a geometry type of point  your you are using the default symbology tag that is intended for a  layer that is a polygon geometry type.
You need to change that to a simplemarkersymbol or picturemarker symbol.

        <layer>             <token/>             <definitionexpression></definitionexpression>             <enableexport>true</enableexport>             <name>Building Centroids</name>             <url>http://152.46.17.82/arcgis/rest/services/surf_city/SurfCity/MapServer/0</url>             <expressions>                 <expression alias="Address" textsearchlabel="Search for Parcel by Address:">                     <values>                         <value prompt="Example: 123 S 3RD ST" uniquevalsfromfield="hadd" isvaluerequired="true" autosubmit="true">hadd = '[value]'</value>                     </values>                 </expression>                 <expression alias="Parcel ID" textsearchlabel="Search by Parcel ID:" isvaluerequired="true">                     <values>                         <value prompt="Example: 2630" uniquevalsfromfield="id" >id = '[value]'</value>                     </values>                 </expression>             </expressions>             <!--graphicalsearchlabel>Use one of the graphical search tools to Search Parcels</graphicalsearchlabel -->             <!--spatialsearchlayer>false</spatialsearchlayer-->             <titlefield>hadd</titlefield>             <fields all="false">                 <field name="id" gridfield="true"/>                 <field name="hadd" gridfield="true"/>                 <field name="floors" gridfield="true"/>             </fields>             <links/>             <zoomscale usegeometry="true" zoompercent="2"></zoomscale>             <autoopendatagrid>true</autoopendatagrid>             <queryattachments>true</queryattachments>             <relates/>             <symbology>                 <simplefillsymbol color="0xff0000" alpha="0.5">                     <outline color="0xff0000" alpha="0.8" width="2" />                 </simplefillsymbol>             </symbology>         </layer>



as far as using a search result from the eSearch as an input for a  geoprocessing task I don't have any experience doing something like that  to be able to provide any guidance there.
0 Kudos
RachelAlbritton
Frequent Contributor
Thanks Robert! I'm glad it was a simple ix and thank you for the heads up on using this as an input to a geoprocessing tool...even if I don't use this tool as I'm currently intending to, its still very useful.
0 Kudos