Enhanced Search Widget for FlexViewer 2.1

93126
767
10-25-2010 02:13 PM
RobertScheitlin__GISP
MVP Emeritus
All Here is my next widget in the FlexViewer 2.1 series

Special thanks to Erwan Caradec for contributing to this code.

The Enhanced Search Widget extends the standard search widget with a floating data grid and a new spatial query w/buffering.

http://www.arcgis.com/home/item.html?id=5d4995ccdb99429185dfd8d8fb2a513e
Tags (2)
0 Kudos
767 Replies
RobertScheitlin__GISP
MVP Emeritus
One more thing.  I changed the font size and style in the defaults.css file for the .WidgetTitle so that the Widget headings would be larger and easier to read.  I noticed that your eSearch and Identify widgets did not change the title size.  Do you have them configured to not react to that .css file?

Alex Sanders


Stuart,

    Are you using the source code for my widgets and recompiling them? I can not reproduce your issue as you can see from the attached image.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Hello Robert 
good news! We have solved!!! 

I have set resultFillSimbol with empty fill and overFillSymbol with solid fill. 

For draw fill in graphic when I click on it on result table I have write this code on clickSearchResult function (not in highlightDataGroupItem function because it is called only when I have selected datagrid float for theme): 

var pt:MapPoint = searchResult.point; 
  
   var id:Number
id = searchResult.gid;
var gra:Graphic;
gra = graphicsLayer.graphicProvider[id] as Graphic;
gra.symbol = overFillSymbol;


For clear fill I have added this lines to unhighlightDataGroupItems function: 

var gra:Graphic;
for (var ir:Number = 0; ir < graphicsLayer.graphicProvider.length; ir++)
{
gra = graphicsLayer.graphicProvider[ir] as Graphic;
gra.symbol = resultFillSymbol;
}


Robert, this work. Is it correct?


Stefano,

I added your code changes and they work fine for me as well, so I would say you are good to go.
0 Kudos
Stefanobruscoli
New Contributor
Hello Robert
thanx for reply. I've see tonight there's a little problem, a side effect, because I have write the other change to code for draw the graphic search on graphicsLayer (so I've write in my post some days ago). This change modify the gid and I've solved it with +1 to ir variable. But so when I use spatial search there's a problem because I use a feature of other theme like grapich of search (not draw it!!!). and so I highlight a wrong poly!!!. I think to solve it with a boolean variable that verify if I've draw a graphic..... Other solution my be use a graphic layer for render find object and another for draw graphic search..
I'll write here all code modified when I'll try it on my apps....
Excuse for my english, is bad.... I hope you have understood...

p.s. I hope next week I'll put the viewer (we have call it FlowViewer2011...) in a public web server.
0 Kudos
JohnBuzzard
New Contributor
Hi Robert,

Is it possible to configure this tool to perform a search on multiple fields with a single search? For example, I want a user to be able to pick "Name" from the dropdown, enter "John Smith", and have it search 3 or 4 different text fields in my layer (Owner1, Owner2, PreviousOwner, etc.). I'm trying to avoid having the user have to decide between which one to pick in the dropdown. Thanks!
0 Kudos
MarcWeinshenker1
Occasional Contributor
Hi Robert,

I hope you're still tracking this thread.  I'm looking for a way to pass the value of the queryTitleField from SearchWidget.mxml to SearchWidgetFloatDG.mxml to use in a modification I've made in the latter related to the data Export. I've read some threads about communication between widgets but I'm not sure that applies since this is in the same widget.  Can you point me in the right direction for this?

Thanks very much,
Marc
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Marc,

   In the SearchWidgetFloatDG.mxml you would need to add a public setter function:
[Bindable]
   private var _queryTitleField:String;

                        public function set queryTitleField(value:String):void
   {
    _queryTitleField = value;
   }


Then in the SearchWidget add a line like this:

myfloatdg.queryTitleField = queryTitleField;

!!! You will have to look for all the places where myfloatdg properties are being set like, queryFeaturesText, queryFeaturesGraphical, and showGridResults
0 Kudos
MarcWeinshenker1
Occasional Contributor
Robert,

Thanks very much.  Does just what I need.

Marc
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
All,

   A new version 2.3 of the Enhanced Search widget is available with almost all enhancement requests implemented. One Catch is it is ONLY for Flex Viewer 2.3. Time to upgrade.

Version 2.3 - 04/25/2011
  * This version is only for FlexViewer 2.3
  * Uses new Flex API Popup Windows
  * Added definition Query Support to xml configuration.
  * Added user lists. This for people who want to specify certain values that will appear in a dropdown
    instead of having the user type the search string. (comma seperated list)
  * Enhanced URL Search
       - Now allows for specifying the layer and expression to search
       - Now the ability to have the datagrid opened from the url search automatically.
  * Compiled widgets for older viewer versions are now no longer provided. (Time to move on people).
  * Many code changes to parallel the standards and practices that esri are putting in their widgets.
0 Kudos
EricVenden
Occasional Contributor II
Good morning Robert,
Visiting this topic again to see if you may have any ideas..Since the 2.2.11 version of your widget, and now even the FV2.3 version of this widget, there are 2 missing icons when I use the eSearch widget.  I have attached an image.  I just set up the 2.3 Viewer...the 2.2.10 version has the 2 icons - Show Results in Grid & Spatial Search...anything newer no...Can you think of any "local" issue that would cause just these 2 icons to fail.
Thank you
Eric V
Gurnee, IL
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Eric,

   What is the folder that you have the widget in widgets/eSearch/ like the instruction say?
0 Kudos