Select to view content in your preferred language

Enhanced Search: Search result graphics do not display

2395
6
09-06-2013 08:10 AM
PATRICIACOSMOPOULOS
Emerging Contributor
I am using the the enhanced search in Flex viewer 3.4 and realised that the search results are not highlighted with a graphic. Also, would like to remove some tools (address, edit) from the graphic search window. Can you point me in the right dirrection?

Thanks
Patricia
Tags (2)
0 Kudos
6 Replies
RobertScheitlin__GISP
MVP Emeritus
Patricia,

   For the search result not being highlighted. You likely have the wrong symbology type specified for that layer in the eSearchWidget.xml. As far as removing button and other configurables, this is all covered in the Enhanced Search Widget XML Configuration.pdf
0 Kudos
PATRICIACOSMOPOULOS
Emerging Contributor
Where do I set the symbology for the search results? Just to explain when I use the text search the results appear in the results window and when I go through them a popup appears on the map for each result. In the case these are point projects previously the results were highlighted with a pushpin but now I am not sure where I go to set this up. I go throught the manual as well.

Thanks,

Patricia
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Patricia,

   In the eSearchWidget.xml where you configure everything else.

        <layer>
            <token/>
            <definitionexpression></definitionexpression>
            <enableexport>true</enableexport>
            <name>Louisville Zoning</name>
            <url>http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Louisville/LOJIC_LandRecords_Louisville/MapServer/2</url>
            <expressions>
                <expression alias="Zoning Type" textsearchlabel="Search Zoning Type:" isvaluerequired="true">
                    <values>
                        <!-- <value prompt="Example: OR1" isvaluerequired="true" userlist="all,OR1,C2,OTF" autosubmit="false" operator="AND">ZONING_CODE = '[value]'</value>
                        <value prompt="Example: RESIDENTIAL" isvaluerequired="true" userlist="RESIDENTIAL,OFFICE" operator="AND" autosubmit="false">ZONING_TYPE = '[value]'</value> -->
                        <value prompt="Example: OR1" uniquevalsfromfield="ZONING_CODE" isvaluerequired="true" autosubmit="false">ZONING_CODE = '[value]'</value>
                        <value prompt="Example: RESIDENTIAL" uniquevalsfromfield="ZONING_TYPE" isvaluerequired="false" autosubmit="false" operator="AND">ZONING_TYPE = '[value]'</value>
                        <value prompt="Example: none" uniquevalsfromfield="ZONING_NAME" isvaluerequired="true" autosubmit="false" operator="AND">ZONING_NAME = '[value]'</value>
                    </values>
                </expression>
                <expression alias="Zoning Code" textsearchlabel="Search Zoning:" isvaluerequired="true">
                    <values>
                        <value prompt="Example: OR1" userlist="OR1,C2,OTF,all" >ZONING_CODE = '[value]'</value>
                        <value prompt="Example: OFFICE" operator="AND">ZONING_TYPE = '[value]'</value>
                    </values>
                </expression>
                <expression alias="Zoning Name" textsearchlabel="Search Zoning Name [ Example: RES MULTI-FAMILY ]:">
                    <values>
                        <value prompt="Example: RES MULTI-FAMILY" isvaluerequired="true">upper(ZONING_NAME) LIKE upper('%[value]%')</value>
                    </values>
                </expression>
                <expression alias="Multiple Zoning Name" textsearchlabel="Search Zoning Name [ Example: RES MULTI-FAMILY ]:">
                    <values>
                        <value prompt="Example: COMMERCIAL,COMM MANUFACTURING" isvaluerequired="true">ZONING_NAME IN ('[value]')</value>
                    </values>
                </expression>
                <expression alias="Open SQL" textsearchlabel="Search by Typing Full SQL:">
                    <values>
                        <value prompt="Example: ZONING_NAME = 'COMM MANUFACTURING' AND ZONING_TYPE = 'COMMERCIAL-INDUSTRIAL'">[value]</value>
                    </values>
                </expression>
            </expressions>
            <graphicalsearchlabel>Use one of the graphical search tools to select Zoning</graphicalsearchlabel>
            <spatialsearchlayer>false</spatialsearchlayer>
            <titlefield>ZONING_NAME</titlefield>
            <fields all="true" />
            <links/>
            <zoomscale usegeometry="true" zoompercent="2"></zoomscale>
            <autoopendatagrid>false</autoopendatagrid>
            <queryattachments>false</queryattachments>
            <relates/>
            <symbology>
                <simplefillsymbol color="0xff0000" alpha="0.5">
                    <outline color="0xff0000" alpha="0.8" width="2" />
                </simplefillsymbol>
            </symbology>
        </layer>
0 Kudos
PATRICIACOSMOPOULOS
Emerging Contributor
I already have the code in the xml so I am not sure why it does not work:

<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>
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
PATRICIA,

   Wow, slow down a little and read the posts LOL. In my last post I did not say anything out the symbols element at the bottom of the eSearchWidget.xml. I gave you an example (in Red) of an actual layer configuration that has a symbology tag in it (IN THE LAYER). If you have the LAYERs symbology tag using a polyline symbol but the layer is actually a polygon layer then you will not get anything highlighed on the map (symbol type mismatch).
0 Kudos
PATRICIACOSMOPOULOS
Emerging Contributor
Okay will look into it more ..
0 Kudos