eSearch Widget search results not linning up on polygon

3031
14
08-04-2014 09:25 AM
LindseyStone
Occasional Contributor III

I am using Robert Scheitlin's eSearch Widget on one of my flex apps.  When you do a search the search result outline doesn't actually line up on the polygon,  it displays to the north of it's actually location.  I am using this same widget on a couple other applications without issue,  so I can't figure out what is different here that is causing the error.  The application with the error is at City of Hastings Parkview Cemetery‌.  My code is

<?xml version="1.0" ?>
<!-- See Enhanced Search Widget XML Configuration.pdf for detailed explanation -->
<configuration>
<layers>
  <layer>
   <definitionexpression></definitionexpression>
   <enableexport>true</enableexport>
   <name>Burial Last Name</name>
   <url>http://71.8.218.158/arcgis/rest/services/city/Cemetery/MapServer/5</url>
   <expressions>
    <expression alias="Burial Last Name" textsearchlabel="Search by Burial Last Name:">
     <values>
      <value prompt="Example: Smith">upper(Lname) like
       upper('%[value]%')</value>
     </values>
    </expression>
   </expressions>
   <graphicalsearchlabel>Use one of the graphical search tools to select
    burial spaces</graphicalsearchlabel>
   <spatialsearchlayer>true</spatialsearchlayer>
   <titlefield>Last Name</titlefield>
   <fields all="false">
    <field name="Lname" alias="Last Name" />
    <field name="Fname" alias="First Name" />
    <field name="MaidenName" alias="Maiden Name" />
    <field name="DateOfBirth" alias="Date of Birth" />
    <field name="DateOfDeath" alias="Date of Death" />
    <field name="SECTION_ID" alias="Section" />
    <field name="BLOCK_NUM" alias="Block" />
    <field name="LOT_NUM" alias="Lot" />
    <field name="SPACE_NUM" alias="Space" />
   </fields>
   <links />
   <zoomscale usegeometry="true" zoompercent="6"></zoomscale>
  </layer>
  <layer>
   <definitionexpression></definitionexpression>
   <enableexport>true</enableexport>
   <name>Burial First Name</name>
   <url>http://71.8.218.158/arcgis/rest/services/city/Cemetery/MapServer/5</url>
   <expressions>
    <expression alias="Burial First Name" textsearchlabel="Search by Burial First Name:">
     <values>
      <value prompt="Example: John">upper(Fname) like
       upper('%[value]%')</value>
     </values>
    </expression>
   </expressions>
   <graphicalsearchlabel>Use one of the graphical search tools to select
    a burial space</graphicalsearchlabel>
   <spatialsearchlayer>true</spatialsearchlayer>
   <titlefield>First Name</titlefield>
   <fields all="false">
    <field name="Lname" alias="Last Name" />
    <field name="Fname" alias="First Name" />
    <field name="MaidenName" alias="Maiden Name" />
    <field name="DateOfBirth" alias="Date of Birth" />
    <field name="DateOfDeath" alias="Date of Death" />
    <field name="SECTION_ID" alias="Section" />
    <field name="BLOCK_NUM" alias="Block" />
    <field name="LOT_NUM" alias="Lot" />
    <field name="SPACE_NUM" alias="Space" />
   </fields>
   <links />
   <zoomscale usegeometry="true" zoompercent="6 "></zoomscale>
  </layer>
  <layer>
   <definitionexpression></definitionexpression>
   <enableexport>true</enableexport>
   <name>Burial Maiden Name</name>
   <url>http://71.8.218.158/arcgis/rest/services/city/Cemetery/MapServer/5</url>
   <expressions>
    <expression alias="Burial Maiden Name" textsearchlabel="Search by Burial Maiden Name:">
     <values>
      <value prompt="Example: Smith">upper(MaidenName) like
       upper('%[value]%')</value>
     </values>
    </expression>
   </expressions>
   <graphicalsearchlabel>Use one of the graphical search tools to select
    a burial space</graphicalsearchlabel>
   <spatialsearchlayer>true</spatialsearchlayer>
   <titlefield>First Name</titlefield>
   <fields all="false">
    <field name="Lname" alias="Last Name" />
    <field name="Fname" alias="First Name" />
    <field name="MaidenName" alias="Maiden Name" />
    <field name="DateOfBirth" alias="Date of Birth" />
    <field name="DateOfDeath" alias="Date of Death" />
    <field name="SECTION_ID" alias="Section" />
    <field name="BLOCK_NUM" alias="Block" />
    <field name="LOT_NUM" alias="Lot" />
    <field name="SPACE_NUM" alias="Space" />
   </fields>
   <links />
   <zoomscale usegeometry="true" zoompercent="6 "></zoomscale>
  </layer>

  <!--<layer> <definitionexpression></definitionexpression> <enableexport>true</enableexport>
   <name>Road Centerlines</name> <url>http://gislap134/ArcGIS/rest/services/Highway/MapServer/5</url>
   <expressions> <expression alias="Road Name and Zip" textsearchlabel="Search
   by Road Name and Left Zipcode and Right Zip:"> <values> <value prompt="Exmaple:
   ANDREW">RD_NAME = '[value]'</value> <value prompt="Exmaple: 36201">AND ZIP_L
   = [value]</value> <value prompt="Exmaple: 36201">AND ZIP_R = [value]</value>
   </values> </expression> <expression alias="Road Surface" textsearchlabel="Search
   by Surface Type:"> <values> <value prompt="Example: Asphalt" field="Surf_Type"
   usedomain="true">Surf_Type = [value]</value> </values> </expression> <expression
   alias="Open SQL" textsearchlabel="Search by Typing Full SQL:"> <values> <value
   prompt="Exmaple: RD_NAME = 'ANDREW' AND ZIP_L = 36201">[value]</value> </values>
   </expression> </expressions> <graphicalsearchlabel>Use one of the graphical
   search tools to select Roads</graphicalsearchlabel> <spatialsearchlayer>true</spatialsearchlayer>
   <titlefield>Name</titlefield> <fields all="false"> <field name="Name" gridfield="true"
   /> <field name="Classification" gridfield="true" /> <field name="Length_"
   numberformat="2|,|." /> <field name="Width" gridfield="true" /> <field name="L_F_ADD"
   gridfield="true" /> <field name="L_T_ADD" gridfield="true" /> <field name="R_F_ADD"
   gridfield="true" /> <field name="R_T_ADD" gridfield="true" /> <field name="PREFIX"
   gridfield="true" /> <field name="PRETYPE" gridfield="true" /> <field name="RD_NAME"
   gridfield="true" /> <field name="TYPE" gridfield="true" /> <field name="SUFFIX"
   gridfield="true" /> <field name="ZIP_L" gridfield="true" /> <field name="ZIP_R"
   gridfield="true" /> </fields> <links> <link alias="View Mon. Ref Sheet">
   <![CDATA[http://surveyor.slco.org/gis/map/map_search/mrs_test.cfm?mrspoint={Name}&lat={ZIP_L}&long={ZIP_R}]]>
   <icon><![CDATA[assets/images/w_link.png]]></icon> </link> </links> <zoomscale
   usegeometry="true" zoompercent="1.6" /> <autoopendatagrid>true</autoopendatagrid>
   <relates> <relate id="0" label="ABIMS Bridge" enableexport="true" icon="assets/images/i_hydro.png">
   <fields all="true" /> </relate> <relate id="1" label="Average Daily Traffic"
   enableexport="true" icon="assets/images/i_flag.png"> <fields all="false">
   <field name="Date_" dateformat="MM/DD/YYYY" /> <field name="Road_Name" />
   <field name="Road_ID" /> <field name="Location" /> <field name="ADT" sum="true"
   sumlabel="ADT Total Count: " /> <field name="Percent_Tr" /> </fields> </relate>
   <relate id="2" label="Railroad Crossings" enableexport="true" icon="assets/images/i_folder.png">
   <fields all="false"> <field name="Gate" /> <field name="Lights" /> <field
   name="Active" /> <field name="At_Grade" /> <field name="Clearance" /> <field
   name="Control_Mark" /> </fields> </relate> <relate id="3" label="Signs" enableexport="false"
   icon="assets/images/i_lego.png"> <fields all="false"> <field name="Type"
   /> <field name="Road_ID" /> <field name="Condition" /> <field name="P_Hyper"
   /> <field name="Image_" hyperlinkgridfield="true" hyperlinkaliastext="Get
   Sign Image" linksuffix="" linkprefix="" /> <field name="post" /> </fields>
   </relate> <relate id="4" label="Guardrails" enableexport="true" icon="assets/images/i_clock.png">
   <fields all="false"> <field name="Type" /> <field name="ID" /> <field name="Date_P"
   dateformat="MM/DD/YYYY" /> <field name="Date_R" dateformat="MM/DD/YYYY" />
   <field name="Type_end_a" /> <field name="Type_start_a" /> <field name="Comments"
   /> </fields> </relate> </relates> <queryattachments>false</queryattachments>
   </layer> -->
  <!-- <layer> <definitionexpression/> <name>Weather Obs</name> <enableexport>true</enableexport>
   <url>http://gislap134/ArcGIS/rest/services/Weather_Obs/MapServer/0</url>
   <expressions> <expression alias="all" textsearchlabel="blah blah"> <values>
   <value prompt="Example: nothing">1=1</value> </values> </expression> </expressions>
   <graphicalsearchlabel>Blah Blah</graphicalsearchlabel> <spatialsearchlayer>false</spatialsearchlayer>
   <titlefield>Type</titlefield> <fields all="false"> <field name="URL" alias="Website
   Link" hyperlinkgridfield="true" linkprefix="http://someWebSite/aspx/web/details.aspx?p_entity="
   linksuffix=".aspx"/> <field name="Type" gridfield="true"/> <field name="Temp"
   gridfield="true"/> </fields> <links> <link alias="Get Site Info"> <![CDATA[http://someWebSite/aspx/web/details.aspx?p_entity={URL}.aspx]]>
   <icon><![CDATA[]]></icon> </link> </links> <zoomscale>5000</zoomscale> </layer> -->
  <!-- <layer> <definitionexpression></definitionexpression> <name>Owner
   Parcels</name> <enableexport>true</enableexport> <url>http://gislap134/ArcGIS/rest/services/ParcelViewer/MapServer/67</url>
   <expressions> <expression alias="Parcel PPIN" textsearchlabel="Search Parcel
   by PPIN..."> <values> <value prompt="Example: 1234">PPIN = '[value]'</value>
   </values> </expression> </expressions> <graphicalsearchlabel>Use one of the
   graphical search tools to select Parcel</graphicalsearchlabel> <spatialsearchlayer>true</spatialsearchlayer>
   <titlefield>Objectid</titlefield> <fields all="false"> <field name="PPIN"
   gridfield="true" /> <field name="NAME" gridfield="true" /> <field name="STREET_ADDRESS"
   gridfield="true" /> <field name="USE_CODE" gridfield="true" /> <field name="CALC_ACRES"
   gridfield="true" /> <field name="EXEMPTION_CODE1" gridfield="true" /> <field
   name="ADDRESS_1" gridfield="true" gridfieldonly="true" /> <field name="ADDRESS_3"
   gridfield="true" gridfieldonly="true" /> <field name="PRIOR_TAX_YEAR" gridfield="true"
   /> <field name="SALE_DATE" gridfield="true" dateformat="MM/DD/YYYY" useutc="true"/>
   <field name="LAST_DEED_BOOK" gridfield="true"/> <field name="LAST_DEED_PAGE"
   gridfield="true"/> <field name="ZIPCODE_1" gridfield="true" gridfieldonly="true"/>
   <field name="NEIGHBORHOOD" gridfield="true" gridfieldonly="true"/> <field
   name="SUBDIVISION" gridfield="true"/> <field name="SALE_PRICE" gridfield="true"
   currencyformat="$|2|,|." sum="true" sumlabel="Sales Price: "/> <field name="TOTAL_TRUE"
   gridfield="true" currencyformat="$|2|,|." /> <field name="LAND_PRICE" gridfield="true"
   currencyformat="$|2|,|." /> <field name="IMPR_PRICE" gridfield="true" currencyformat="$|2|,|."
   /> <field name="ADJ_PRICE" gridfield="true" currencyformat="$|2|,|." /> <field
   name="OVER_COND" gridfield="true"/> <field name="ADJUSTMENT PRICE" gridfield="true"/>
   </fields> <links /> <zoomscale>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>
<enabledatagridinteractionwithwidget>true</enabledatagridinteractionwithwidget>
<toleranceforpointgraphicalselection>6</toleranceforpointgraphicalselection><!--
  value is in screen pixels -->
<tolerancebydefault>false</tolerancebydefault>
<spatialreference>102003</spatialreference>
<zoomscale>2400</zoomscale>
<geometryservice>http://tasks.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer</geometryservice>
<csvseparator>,</csvseparator>
<disablebuttons></disablebuttons><!--possible values one or more not all
  four search types comma separated text,graphic,spatial,grid,datagrid -->
<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>
<floatorfixed disablerelatestabinfixed="false">float</floatorfixed><!--
  possible values are fixed and float -->
<relatetooltip>Show Relates</relatetooltip>
<relateicon>widgets/eSearch/assets/images/i_relate.png</relateicon>
<labels>
  <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 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>
  <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>Adjust buffer alpha</bufferalpha>
  <buffercolor>Select buffer color</buffercolor>
</labels>
<symbols>
  <simplefillsymbol color="0x448ccb" alpha="0.2">
   <outline color="0x448ccb" 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>

0 Kudos
14 Replies
RobertScheitlin__GISP
MVP Emeritus

Lindsey,

  Your app is working fin now... You must have figured it out.

0 Kudos
LindseyStone
Occasional Contributor III

It works fine with the data frame in state plane coordinate system which you are seeing. I guess since I have no overlays on this, the slight shift I am getting between my base layer and operation layer isn't that big of deal, and I could just leave as is.

I appreciate all your help on this.

Lindsey Stone

GIS Technician

City of Hastings

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Lindsey,

   If your data and data frame are both in State Plane then ArcGIS Server will handle the re-projection when the map is requested in web mercator. Same for the Geometry from a Query. So you should be good with it this way.

If you are OK with it as it is than can you mark the reply that answered your question as "Correct Answer"

Correct-Answer.jpg

or if you believe the question is unanswered but have found any of my replies as helpful than you can use the Actions menu Link at the bottom left of a reply and choose "Mark as Helpful"

Helpful.jpg

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Don Opgenorth‌ Can you move this one to the ArcGIS Viewer for Flex‌ space please.

0 Kudos
DonOpgenorth
Esri Contributor

I've moved your post into the  Arcgis Viewer for Flex space. You will get a much better answer here as the GeoNet Help is intended for community help and feedback. I have also added in a few additional tags. You can see more
on the community structure, and what topics are under each space from the following documents:

GeoNet Community Structure

ArcGIS Discussion Forums Migration Strategy

Thanks!

Don

0 Kudos