Select to view content in your preferred language

eSearch Widget search results not linning up on polygon

3183
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,

  I am looking into it. At first glance there does not seem to be anything wrong with your configuration.

BTW. There are specific places to post forum Questions in this new GeoNet community.

ArcGIS Viewer for Flex

Robert's Flex Viewer Widgets

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Lindsey,

     I have tested in FV 3.6 using my latest version of the eSearch Widget and I get the same result... I also tested queries on other layers in your map services and the geometries are still returned shifted. I would suggest that you delete and republish this map service on your ArcGIS Server.

0 Kudos
LindseyStone
Occasional Contributor III

Robert,

I deleted and republished the service. I accepted all defaults on the publishing settings. It is still returns with the results shifted. Could it be something with the map that I am publishing?

Lindsey Stone

GIS Technician

City of Hastings

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Lindsey,

  Is this the only map service exhibiting the geometry shift on your server. Have you checked other services?

0 Kudos
LindseyStone
Occasional Contributor III

This is the only one that experience the shift. However this service is the only one that uses that data. It has been happening for quite some time now and I just haven't had time to investigate. I have never had any issues with the others.

The other applications are at and all use the same eSearch widget.

http://gis.adamscounty.org/city/platbook/

http://gis.adamscounty.org/city/zoning/

http://gis.adamscounty.org/map/

Lindsey Stone

GIS Technician

City of Hastings

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Lindsey,

  I am leaning towards the data and or map as well. All I can do from here is advise you how I would go about debugging this issue.

  1. Copy the data to a new source (like a new FGDB).
  2. Start a new fresh MXD and add the new data and resymbolize it.
  3. republish the mxd using a different map service name.
  4. test the search again.

I know this is a bit of effort but it will narrow some things down.

0 Kudos
LindseyStone
Occasional Contributor III

Robert,

After playing with the mxd. I have found that my issue resides in the data frame coordinate system. I have it sets as WGS 1984 Web Mercator (auxiliary sphere). As soon as I changed the new mxd to that is when my misalignment showed up. What I don't understand is that I have all my other mxds set as the same that are in my other flex online applications.

Lindsey Stone

GIS Technician

City of Hastings

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Lindsey,

   So you are having your MXD/Mapservice reproject your data on the fly all the time? So none of the data in the other apps is actually in WebMercator they are also being reprojected on the fly? I would have to say that this is not the best route to go... I have a FGDB child replica of my data that has all the features actually in WebMercator and the child GDB just replicates from the parent (in my native State Plain Coordinate System) every night using a scheduled task. Anyway that is off topic.

Are you sure there is no difference between how you have your other MXDs data frames and this ones?

0 Kudos
LindseyStone
Occasional Contributor III

All my data is in my NAD83 Nebraska State Plane and then I just set my data frame to the WebMercator. I wouldn't be surprised if this isn't the most efficient way. I took over doing the server stuff recently from somebody else and I am slowly learning bits and pieces of it and currently using the settings the previous person always told me to use. I went tab by tab on the data frame properties with another one that is working properly and the only other difference is on the General tab my Label Engine is Maplex Label Engine on the mxd in question. When I change the Coordinate system to the NAD83 State Plane then it all works correctly, but of course it doesn't line up perfectly with my base map that I have set.

Lindsey Stone

GIS Technician

City of Hastings

0 Kudos