Enhanced Search Widget for FlexViewer 2.1

93158
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
AlexSanders
Occasional Contributor
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
0 Kudos
Stefanobruscoli
New Contributor
Hy Robert
is it possible to have a parameter in config.xml for chose if selected feature (graphic selection) must highligt all when I made the selection or when I click in datagrid or list of selected features?
It is very good if I select many polygons with one graphic selection.
Thanx.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Stefano,

     I am not 100% sure I understand the question. So let me see if I understand what you are asking for.

Sounds like you want an option to zoom to all of the returned results...? Is that it?
0 Kudos
Stefanobruscoli
New Contributor
I wrote quickly and I explained my request wrong.
I have a polys features class with many overlap from them. When I made a graphic selection I want see only the outline polygons no fill (for this I can select fill color in xml file). But when I click in results table on one feature I want render it with fill color so I can see it on map and recognized it by other.
A second question is when I draw a grapigh for search, when I have finish draw and start show result routine, the graphic draw is cleared. Is possible not clear it and clear all with clear button in draw widget?
Thanx Robert.
0 Kudos
Stefanobruscoli
New Contributor
Hy Robert
I've solved the second question:
1. add draw graphic to layer:
private function searchDrawEnd(event:DrawEvent):void
{
event.target.deactivate();
graphicsLayer.add (event.graphic); // modificato per il disegno dell'oggetto

2. no clear graphic on createSearchResults function:
private function createSearchResults(featureSet:FeatureSet, queryFields:XMLList):ArrayCollection
{
//graphicsLayer.clear(); // rem this line

3. add two line to activateSearchTool function for clean the graphics when I made another graphics

private function activateSearchTool(value:String):void
{
graphicsLayer.clear(); //modificato per mantenere il perimetro del grafico di ricerca - cancella il grafico
clearBuffer();  //modificato per mantenere il perimetro del grafico di ricerca - cancella il buffer

All seems work fine.
There's also first question....
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Stefano,

  You would have to change the graphics symbol in the highlightDataGroupItem function and back again in the unhighlightDataGroupItems.
0 Kudos
City_ofTrail
New Contributor
Hi Robert,

I was just wondering if there is a way to change the number of entries returned. It looks like right now it maxes out at 500.

Thank you,
Mark
0 Kudos
Stefanobruscoli
New Contributor
Robert
not solved.... Please can you help me?
Thanx
0 Kudos
Stefanobruscoli
New Contributor
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?
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Hi Robert,

I was just wondering if there is a way to change the number of entries returned. It looks like right now it maxes out at 500.

Thank you,
Mark


Mark,

    That is a ArcGIS Server configuration thing and has been discussed MANY time in the forum.

http://forums.arcgis.com/threads/14044-Only-500-records-returned-in-query
0 Kudos