Select to view content in your preferred language

Individual layer symbology problem with eSearch widget 3.010

639
5
Jump to solution
10-18-2012 11:42 AM
AndrewEdmonds
New Contributor III
Hey everyone.

I know I must have a simple syntax error, but I just can't figure it out.  I am running Robert Scheitlin's excellent eSearch widget on a beta site, here.  The widget is labeled "Search HPO Data" and is the first icon - the red arrow - in the toolbar.

The widget is working fine, except the individual layer symbology is not displaying.  I have followed Robert's XML Configuration PDF and thought that I placed the <symbols> code in the correct places for this to work.

My file has another <symbols> code at the end, which makes the red arrow appear for all search types.  If I comment this out, I get a syntax error message: "A problem occurred while parsing the configuration file widgets/eSearch/eSearchWidget_AllLayers.xml
Error #1085"

If you look at the second tool in the toolbar ("Searches"), you'll see the icons that should display.  The image files are all in the correct folder.

What did I get wrong?
--ASE.


<?xml version="1.0" ?> <!-- See Enhanced Search Widget XML Configuration.pdf for detailed explanation --> <configuration>  <layers>      <layer>    <definitionexpression></definitionexpression>    <enableexport>true</enableexport>    <name>All designated resources</name>    <url>http://gis.ncdcr.gov/ArcGIS/rest/services/NC_NR-SL-DOE_Designations/MapServer/0</url>    <expressions>     <expression alias="ALLsearch" textsearchlabel="Search NR, SL, and DOE resources using multiple attributes"  isvaluerequired="false">      <values>       <value prompt="Below, enter site name.  Example: Church"  isvaluerequired="false">SITE_NAME LIKE '%[value]%'</value>       <value prompt="Below, enter site ID.  Example: DH0001"  isvaluerequired="false" operator="AND">SITE_ID LIKE '%[value]%'</value>       <value prompt="Below, enter year designated.  Example: 2001"  isvaluerequired="false" operator="AND">YearListed LIKE '%[value]%'</value>       <value prompt="Pick county from the list below."   userlist="Alamance, Alexander, Alleghany, Anson, Ashe, Avery, Beaufort, Bertie, Bladen, Brunswick, Buncombe, Burke, Cabarrus, Caldwell, Camden, Carteret, Caswell, Catawba, Chatham, Cherokee, Chowan, Clay, Cleveland, Columbus, Craven, Cumberland, Currituck, Dare, Davidson, Davie, Duplin, Durham, Edgecombe, Forsyth, Franklin, Gaston, Gates, Graham, Granville, Greene, Guilford, Halifax, Harnett, Haywood, Henderson, Hertford, Hoke, Hyde, Iredell, Jackson, Johnston, Jones, Lee, Lenoir, Lincoln, Macon, Madison, Martin, McDowell, Mecklenburg, Mitchell, Montgomery, Moore, Nash, New Hanover, Northampton, Onslow, Orange, Pamlico, Pasquotank, Pender, Perquimans, Person, Pitt, Polk, Randolph, Richmond, Robeson, Rockingham, Rowan, Rutherford, Sampson, Scotland, Stanly, Stokes, Surry, Swain, Transylvania, Tyrrell, Union, Vance, Wake, Warren, Washington, Watauga, Wayne, Wilkes, Wilson, Yadkin, Yancey"  isvaluerequired="false" operator="AND">County = '[value]'</value>       <value prompt="Below, enter descriptive term.  Example: Queen Anne, or 1889"   isvaluerequired="false" operator="AND">DESCRIPTIO LIKE '%[value]%'</value>       <value prompt="Below, enter note.  Example: moved"   isvaluerequired="false" operator="AND">NOTES LIKE '%[value]%'</value>       <value prompt="Below, enter quad name.  Example: South"   isvaluerequired="false" operator="AND">QUAD_NAME LIKE '%[value]%'</value>       <value prompt="Pick status" userlist="NRD, NRHD, SLDOE"  isvaluerequired="false" operator="AND">STATUS = '[value]'</value>      </values>     </expression>    </expressions>    <graphicalsearchlabel>Use one of the graphical search tools to select a Parcel</graphicalsearchlabel>    <spatialsearchlayer>true</spatialsearchlayer>    <titlefield>SITE_NAME</titlefield>    <fields all="false">     <field name="SITE_NAME" alias="Site Name" gridfield="true" />     <field name="SITE_ID" alias="Site ID" gridfield="true" />     <field name="County" alias="County" gridfield="true" />     <field name="DESCRIPTIO" alias="Description" gridfield="true" />     <field name="YearListed" alias="Year Listed" gridfield="true" />      <field name="YearSL" alias="Year SL" gridfield="true" />      <field name="YearDOE" alias="Year DOE" gridfield="true" />      <field name="NOTES" alias="Notes" gridfield="true" />     <field name="Status" alias="Status" gridfield="false" />     <field name="QUAD_NAME" alias="Quad Name" gridfield="true" />     <!-- field name="LinkPath" gridfield="true" / -->     <field name="LocalLink" alias="Local Info" hyperlinkgridfield="true" visible="false" />      <!-- hyperlinkaliastext="Click to view local info" -->    </fields>    <links>     <link alias="View the NR nomination form">      <![CDATA[http://www.hpo.ncdcr.gov/nr/{SITE_ID}.pdf]]>      <icon><![CDATA[assets/images/i_pdf2.png]]></icon>     </link>     <link alias="View local information">      <![CDATA[{LocalLink}]]>      <icon><![CDATA[assets/images/w_link.png]]></icon>     </link>     </links>    <zoomscale usegeometry="true" zoompercent="1.6" />    <autoopendatagrid>true</autoopendatagrid>    <relates />    <queryattachments>false</queryattachments>     <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/ALLsearch-45.png" height="30" width="30" xoffset="-20" yoffset="20" />          <simplelinesymbol color="0xff0000" alpha="0.8" width="2"/>    </symbols>   </layer>      <!-- Additional layers in the file following the same order.          I've edited them out to fit the 10,000 character limit to ArcGIS forum posts -->        </layers>      <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/SearchContainer-45.png" height="30" width="30" xoffset="-20" yoffset="20" />          <simplelinesymbol color="0xff0000" alpha="0.8" width="2"/>    </symbols>    </configuration>
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus
Andrew,

   You need to pay a little closer attention... You are still using symbols as the parent element and what I have instructed you to use in the last post of mine and in the documentation is symbology. Fix that and you should be good.

View solution in original post

0 Kudos
5 Replies
RobertScheitlin__GISP
MVP Emeritus
Andrew,

   Well your issue is that you were trying to use the xml for all layers symbology in an individual layer.

It should look like this assuming the layer is a polygon:

        <layer>
            <definitionexpression></definitionexpression>
            <enableexport>true</enableexport>
            <name>All designated resources</name>
            <url>http://gis.ncdcr.gov/ArcGIS/rest/services/NC_NR-SL-DOE_Designations/MapServer/0</url>
            <expressions>
                <expression alias="ALLsearch" textsearchlabel="Search NR, SL, and DOE resources using multiple attributes"  isvaluerequired="false">
                    <values>
                        <value prompt="Below, enter site name.  Example: Church"  isvaluerequired="false">SITE_NAME LIKE '%[value]%'</value>
                        <value prompt="Below, enter site ID.  Example: DH0001"  isvaluerequired="false" operator="AND">SITE_ID LIKE '%[value]%'</value>
                        <value prompt="Below, enter year designated.  Example: 2001"  isvaluerequired="false" operator="AND">YearListed LIKE '%[value]%'</value>
                        <value prompt="Pick county from the list below."   userlist="Alamance, Alexander, Alleghany, Anson, Ashe, Avery, Beaufort, Bertie, Bladen, Brunswick, Buncombe, Burke, Cabarrus, Caldwell, Camden, Carteret, Caswell, Catawba, Chatham, Cherokee, Chowan, Clay, Cleveland, Columbus, Craven, Cumberland, Currituck, Dare, Davidson, Davie, Duplin, Durham, Edgecombe, Forsyth, Franklin, Gaston, Gates, Graham, Granville, Greene, Guilford, Halifax, Harnett, Haywood, Henderson, Hertford, Hoke, Hyde, Iredell, Jackson, Johnston, Jones, Lee, Lenoir, Lincoln, Macon, Madison, Martin, McDowell, Mecklenburg, Mitchell, Montgomery, Moore, Nash, New Hanover, Northampton, Onslow, Orange, Pamlico, Pasquotank, Pender, Perquimans, Person, Pitt, Polk, Randolph, Richmond, Robeson, Rockingham, Rowan, Rutherford, Sampson, Scotland, Stanly, Stokes, Surry, Swain, Transylvania, Tyrrell, Union, Vance, Wake, Warren, Washington, Watauga, Wayne, Wilkes, Wilson, Yadkin, Yancey"  isvaluerequired="false" operator="AND">County = '[value]'</value>
                        <value prompt="Below, enter descriptive term.  Example: Queen Anne, or 1889"   isvaluerequired="false" operator="AND">DESCRIPTIO LIKE '%[value]%'</value>
                        <value prompt="Below, enter note.  Example: moved"   isvaluerequired="false" operator="AND">NOTES LIKE '%[value]%'</value>
                        <value prompt="Below, enter quad name.  Example: South"   isvaluerequired="false" operator="AND">QUAD_NAME LIKE '%[value]%'</value>
                        <value prompt="Pick status" userlist="NRD, NRHD, SLDOE"  isvaluerequired="false" operator="AND">STATUS = '[value]'</value>
                    </values>
                </expression>
            </expressions>
            <graphicalsearchlabel>Use one of the graphical search tools to select a Parcel</graphicalsearchlabel>
            <spatialsearchlayer>true</spatialsearchlayer>
            <titlefield>SITE_NAME</titlefield>
            <fields all="false">
                <field name="SITE_NAME" alias="Site Name" gridfield="true" />
                <field name="SITE_ID" alias="Site ID" gridfield="true" />
                <field name="County" alias="County" gridfield="true" />
                <field name="DESCRIPTIO" alias="Description" gridfield="true" />
                <field name="YearListed" alias="Year Listed" gridfield="true" /> 
                <field name="YearSL" alias="Year SL" gridfield="true" /> 
                <field name="YearDOE" alias="Year DOE" gridfield="true" /> 
                <field name="NOTES" alias="Notes" gridfield="true" />
                <field name="Status" alias="Status" gridfield="false" />
                <field name="QUAD_NAME" alias="Quad Name" gridfield="true" />
                <!-- field name="LinkPath" gridfield="true" / -->
                <field name="LocalLink" alias="Local Info" hyperlinkgridfield="true" visible="false" />
                    <!-- hyperlinkaliastext="Click to view local info" -->
            </fields>
            <links>
                <link alias="View the NR nomination form">
                    <![CDATA[http://www.hpo.ncdcr.gov/nr/{SITE_ID}.pdf]]>
                    <icon><![CDATA[assets/images/i_pdf2.png]]></icon>
                </link>
                <link alias="View local information">
                    <![CDATA[{LocalLink}]]>
                    <icon><![CDATA[assets/images/w_link.png]]></icon>
                </link> 
            </links>
            <zoomscale usegeometry="true" zoompercent="1.6" />
            <autoopendatagrid>true</autoopendatagrid>
            <relates />
            <queryattachments>false</queryattachments>

            <symbology>
                <simplefillsymbol color="0x0000ff" alpha="0.5">
                    <outline color="0x00ffff" alpha="0.8" width="2" />
                </simplefillsymbol>
            </symbology>
        </layer>
0 Kudos
AndrewEdmonds
New Contributor III
Thanks, Robert.  Of course that makes sense.  I am still having an issue, though.

I made sure to only reference one symbology type within the layer, and removed the other references.  Now, instead of displaying my expected icon (NRsearch-45.png), I get pink circles -- which I don't see any code for creating.

<?xml version="1.0" ?>
<!-- See Enhanced Search Widget XML Configuration.pdf for detailed explanation -->
<configuration>
 <layers>
  <layer>
   <definitionexpression></definitionexpression>
   <enableexport>true</enableexport>
   <name>National Register</name>
   <url>http://gis.ncdcr.gov/ArcGIS/rest/services/NC_National_Register/MapServer/0</url>
   <expressions>
    <expression alias="NRsearch" textsearchlabel="Search National Register resources using multiple attributes"  isvaluerequired="false">
     <values>
      <value prompt="Below, enter site name.  Example: Church"  isvaluerequired="false">SITE_NAME LIKE '%[value]%'</value>
      <value prompt="Below, enter site ID.  Example: DH0001"  isvaluerequired="false" operator="AND">SITE_ID LIKE '%[value]%'</value>
      <value prompt="Below, enter year designated.  Example: 2001"  isvaluerequired="false" operator="AND">YearListed LIKE '%[value]%'</value>
      <value prompt="Below, enter first descriptive term.  Example: 1889"   isvaluerequired="false" operator="AND">DESCRIPTIO LIKE '%[value]%'</value>
      <value prompt="Below, enter second descriptive term.  Example: Queen Anne"   isvaluerequired="false" operator="AND">DESCRIPTIO LIKE '%[value]%'</value>
      <value prompt="Below, enter third descriptive term.  Example: 2-story"   isvaluerequired="false" operator="AND">DESCRIPTIO LIKE '%[value]%'</value>
      <value prompt="Below, enter fourth descriptive term.  Example: house"   isvaluerequired="false" operator="AND">DESCRIPTIO LIKE '%[value]%'</value>
      <value prompt="Below, enter note.  Example: moved"   isvaluerequired="false" operator="AND">NOTES LIKE '%[value]%'</value>
      <value prompt="Below, enter quad name.  Example: South"   isvaluerequired="false" operator="AND">QUAD_NAME LIKE '%[value]%'</value>
      <value prompt="Pick status: Individual (NR), Gone (NRD), District (NRHD)" userlist="NR, NRD, NRHD"  isvaluerequired="false" operator="AND">STATUS = '[value]'</value>
     </values>
    </expression>
   </expressions>
   <graphicalsearchlabel>Use one of the graphical search tools to select a Parcel</graphicalsearchlabel>
   <spatialsearchlayer>true</spatialsearchlayer>
   <titlefield>SITE_NAME</titlefield>
   <fields all="false">
    <field name="SITE_NAME" alias="Site Name" gridfield="true" />
    <field name="SITE_ID" alias="Site ID" gridfield="true" />
    <field name="County" alias="County" gridfield="true" />
    <field name="DESCRIPTIO" alias="Description" gridfield="true" />
    <field name="YearListed" alias="Year Listed" gridfield="true" /> 
    <field name="NOTES" alias="Notes" gridfield="true" />
    <field name="Status" alias="Status" gridfield="false" />
    <field name="QUAD_NAME" alias="Quad Name" gridfield="true" />
   </fields>
   <links>
    <link alias="View the NR nomination form">
     <![CDATA[http://www.hpo.ncdcr.gov/nr/{SITE_ID}.pdf]]>
     <icon><![CDATA[assets/images/i_pdf2.png]]></icon>
    </link>
    <link alias="View local information">
     <![CDATA[{LocalLink}]]>
     <icon><![CDATA[assets/images/w_link.png]]></icon>
    </link>
    <link alias="View photograph">
     <![CDATA[VIRTUAL/photos/{SITE_ID}.JPG]]>
     <icon><![CDATA[assets/images/i_camera.png]]></icon>
    </link>  
     
   </links>
   <zoomscale usegeometry="true" zoompercent="1.6" />
   <autoopendatagrid>true</autoopendatagrid>
   <relates />
   <queryattachments>false</queryattachments>

   <symbols>

    <picturemarkersymbol url="assets/images/NRsearch-45.png" height="30" width="30" xoffset="-20" yoffset="20" />

   </symbols>   

  </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>
 <keepgraphicalsearchenabled>true</keepgraphicalsearchenabled>
 <autozoomtoresults>true</autozoomtoresults>
 <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,id -->
 <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>true</multipartgraphicsearch>
 <floatorfixed>fixed</floatorfixed><!-- possible values are fixed and float -->
 <relatetooltip>Show Relates</relatetooltip>
 <relateicon>widgets/eSearch/assets/images/i_relate.png</relateicon>
 <labels>
  <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 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>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>
 </labels>


 <symbols>
  <simplefillsymbol color="0xff0000" alpha="0.5">
   <outline color="0xff0000" alpha="0.8" width="2" />
  </simplefillsymbol>

  <simplelinesymbol color="0xff0000" alpha="0.8" width="2" />
 </symbols>
</configuration>
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Andrew,

   You need to pay a little closer attention... You are still using symbols as the parent element and what I have instructed you to use in the last post of mine and in the documentation is symbology. Fix that and you should be good.
0 Kudos
AndrewEdmonds
New Contributor III
Yup, it's working.  Thanks again.

By the way, is the pink circle symbology buried somewhere as the default if one has incorrect code like I had?  Where did it come from?
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Andrew,

   That pink symbology is nothing that comes from my code.
0 Kudos