Changing Search Selection Color/Fill

829
7
Jump to solution
06-27-2013 10:16 AM
GavinMayeda
Occasional Contributor II
I am using ArcGIS Viewer for Flex Version 3.0, and I would like to know how to change the search selection color and fill.  The default is a transparent red fill with a solid red border. 

I looked in help, and the only color changes available are for the search and search result windows, not for the search selection itself.

As always, any and all help is highly appreciated.
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
RhettZufelt
MVP Frequent Contributor
Gavin,

I just installed the standard searchwidget that comes with FV3.1 and added the tags to the bottom of the searchwidget.xml.  The symbology set in the xml is definatly being honored, except for the simplemarkersymbol.  does not appear as if that is an option.
Below is a snippet from my searchwidget.xml that is working.  If I change the symbols colors, reload, re-search, all the highlights are the new color.

<?xml version="1.0" ?> <configuration label="WCH Search 2">     <layers>      <layer>    <autoopendatagrid>true</autoopendatagrid>    <definitionexpression></definitionexpression>    <enableexport>true</enableexport>    <name>Buildings</name>    <url>http://gis01.wch-rcc.com/ArcGIS/rest/services/Base/Buildings3/MapServer/0</url>                                            <expression>UPPER(name) LIKE UPPER('%[value]%')</expression>    <graphicalsearchlabel>Use one of the graphical search tools to select Zoning</graphicalsearchlabel>    <spatialsearchlayer>true</spatialsearchlayer>    <titlefield>name</titlefield>          <fields all="false">     <field name="name" alias="Name" gridfield="true" />     <field name="LONGNAME" alias="LONGNAME" gridfield="true" />     <field name="TYPE" alias="TYPE" gridfield="true" />     <field name="FAC_STATUS" alias="Status" gridfield="true" />     <field name="FAC_CONTRACTOR" alias="Contractor" gridfield="true" />     <field name="rec" alias="rec" gridfield="true" />                           </fields>       <links/>    <zoomscale usegeometry="true" zoompercent="1"></zoomscale>   </layer>     </layers>     <zoomscale>10000</zoomscale>          <symbols>   <simplefillsymbol color="0xFF0000" alpha="1.0">    <outline color="0x0404B4" alpha="0.8" width="2" />   </simplefillsymbol>   <picturemarkersymbol url="assets/images/arrow_up.png" height="20" width="20" xoffset="1" yoffset="1" />   <simplelinesymbol color="0xFA0A56" alpha="0.8" width="2" />  </symbols>          </configuration>


Hope this helps,

R_

View solution in original post

0 Kudos
7 Replies
RhettZufelt
MVP Frequent Contributor
That is set with the <symbols> tag in the SearchWidget.xml.

R_
0 Kudos
GavinMayeda
Occasional Contributor II
Thanks for the response!  Unfortunately, I am not seeing that in the SearchWidget.xml

<?xml version="1.0" ?>
<configuration>
    <zoomscale>50000</zoomscale>
    <layers>
        <layer>
            <name>APN Search</name>
            <url>http://permitstweb/ArcGIS/rest/services/Assessor/Prop8Test.4/MapServer/0</url>
            <expression>APN = '[value]'</expression>
            <textsearchlabel>123-456-789-000 (Enter with Dashes)</textsearchlabel>
            <titlefield>APN</titlefield>
            <fields>
                <field name="APN" alias="APN"/>
                <field name="STREETNUM" alias=""/>
                <field name="STREETNAME" alias=""/>
                <field name="STREETTYPE" alias=""/>
                <field name="ASMT_DESC" alias="Parcel Info"/>
                <field name="PercentDro" alias="Percent Change"/>
                <field name="GroupCo" alias="Appraisal Zone"/>
                <field name="AreaDesc" alias="General Description"/>
                <field name="AppraisalC" alias="AppraisalCode"/>
            </fields>
        </layer>
    </layers>
</configuration>

This is the script within the .xml search widget.  Are the settings located elsewhere?

Thank you!
0 Kudos
RhettZufelt
MVP Frequent Contributor
I think you want something like this, though I'm not sure the simplemarkersymbol is supported as the help page http://resources.arcgis.com/en/help/flex-viewer/concepts/index.html#/Search_widget_tags/01m300000023...  only lists picturemarkersymbol for points...

Also, not positive that this feature was included in version 3.0 as they have removed the older help documentation, though they don't say it was "added in version 3.x" so it "should" be.




<?xml version="1.0" ?>
<configuration>
 <zoomscale>50000</zoomscale>
 <layers>
  <layer>
   <name>APN Search</name>
   <url>http://permitstweb/ArcGIS/rest/services/Assessor/Prop8Test.4/MapServer/0
   </url>
   <expression>APN = '[value]'</expression>
   <textsearchlabel>123-456-789-000 (Enter with Dashes)
   </textsearchlabel>
   <titlefield>APN</titlefield>
   <fields>
    <field name="APN" alias="APN" />
    <field name="STREETNUM" alias="" />
    <field name="STREETNAME" alias="" />
    <field name="STREETTYPE" alias="" />
    <field name="ASMT_DESC" alias="Parcel Info" />
    <field name="PercentDro" alias="Percent Change" />
    <field name="GroupCo" alias="Appraisal Zone" />
    <field name="AreaDesc" alias="General Description" />
    <field name="AppraisalC" alias="AppraisalCode" />
   </fields>
  </layer>
 <symbols>
  <simplefillsymbol color="0xff0000" alpha="0.0">
   <outline color="0x00FFFF" 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="20" width="20" xoffset="1" yoffset="1" />
  <simplelinesymbol color="0x00FFFF" alpha="0.8" width="2" />
 </symbols>




R_
0 Kudos
GavinMayeda
Occasional Contributor II
Thank you again.

I tried inserting that script to the widget, but could not get the search selection result to change colors.

I'm thinking that the script is hard coded somewhere within the application and that's where I need to get to.
0 Kudos
RhettZufelt
MVP Frequent Contributor
Gavin,

I just installed the standard searchwidget that comes with FV3.1 and added the tags to the bottom of the searchwidget.xml.  The symbology set in the xml is definatly being honored, except for the simplemarkersymbol.  does not appear as if that is an option.
Below is a snippet from my searchwidget.xml that is working.  If I change the symbols colors, reload, re-search, all the highlights are the new color.

<?xml version="1.0" ?> <configuration label="WCH Search 2">     <layers>      <layer>    <autoopendatagrid>true</autoopendatagrid>    <definitionexpression></definitionexpression>    <enableexport>true</enableexport>    <name>Buildings</name>    <url>http://gis01.wch-rcc.com/ArcGIS/rest/services/Base/Buildings3/MapServer/0</url>                                            <expression>UPPER(name) LIKE UPPER('%[value]%')</expression>    <graphicalsearchlabel>Use one of the graphical search tools to select Zoning</graphicalsearchlabel>    <spatialsearchlayer>true</spatialsearchlayer>    <titlefield>name</titlefield>          <fields all="false">     <field name="name" alias="Name" gridfield="true" />     <field name="LONGNAME" alias="LONGNAME" gridfield="true" />     <field name="TYPE" alias="TYPE" gridfield="true" />     <field name="FAC_STATUS" alias="Status" gridfield="true" />     <field name="FAC_CONTRACTOR" alias="Contractor" gridfield="true" />     <field name="rec" alias="rec" gridfield="true" />                           </fields>       <links/>    <zoomscale usegeometry="true" zoompercent="1"></zoomscale>   </layer>     </layers>     <zoomscale>10000</zoomscale>          <symbols>   <simplefillsymbol color="0xFF0000" alpha="1.0">    <outline color="0x0404B4" alpha="0.8" width="2" />   </simplefillsymbol>   <picturemarkersymbol url="assets/images/arrow_up.png" height="20" width="20" xoffset="1" yoffset="1" />   <simplelinesymbol color="0xFA0A56" alpha="0.8" width="2" />  </symbols>          </configuration>


Hope this helps,

R_
0 Kudos
GavinMayeda
Occasional Contributor II
Thank very much!!

The script worked perfectly, although now I have to find the color charts to play with.  I found the red, but on my display it looks rust colored. 

Thank you again for your help.
0 Kudos
RhettZufelt
MVP Frequent Contributor
Glad to hear you got it working.

For color codes, I normally go here:  http://html-color-codes.info/

of course, this is all over the net.

R_
0 Kudos