Selection Widget for SFV2.2 (with a query builder)

5890
50
02-21-2011 11:55 AM
MarkHoyland
Occasional Contributor II
The Selection widget has a "Select by Attributes" and "Select by Location" option similar to ArcGIS.
It has options where you can set your selection type eg New Selection, Add to Selection, Remove from Selection.
Select from multiple layers that interstect/contain etc another layer.
You can view the results for each layer in a datagrid, and export to tab delimited text file.

Widget link: http://www.arcgis.com/home/item.html?id=20ed6af9ab204548bbf092d51b51fef8

I built this because it seemed like a fun project and the temptation of a Flex a Widget T-shirt was too much to resist.:o

If you download please leave feedback and rate the widgets (this should apply to any widget you download) as the feed back really helps to know what users are after.
Tags (2)
0 Kudos
50 Replies
MarkHoyland
Occasional Contributor II
Mark,

Thanks for your response. Unfortunately I didn't have this thread set to email notification so I am just seeing this now! I am aware of the ArcGIS Server setting which controls the number of features returned, however I don't think this is the culprit in my case. While my number of unique values does exceed that default limit, I am only getting ~50 unique values pulled into the selection tool. Let me know if you have an idea on what else might be going on.

Thanks!

Lisa, Here is a test application to help see if the results are what they should be.
You can add your own url and field name at run time.
Firstly it will select all features in the layer. If the ArcGISServer limit is reached it will return that amount of features. (standard flex api querytask)
Next it the passes the results of the query to a function which extracts the unique values.
There is a .swf file included, just double click the .swf in windows explorer and open in internet explorer.
Source code is also included if you want to see how it works.
Let me know if this helps.
0 Kudos
Stefanobruscoli
New Contributor
Mark
I've this problem:
in fields tag I've put Shape_Area for item search and result.
If I try a search with this item I can see values in values list. But in the result I've the item Shape_Area with no values. This for all layers (my search layer have all polygons features....)
Please can you help me?
0 Kudos
Stefanobruscoli
New Contributor
Mark
I think I have found the problem:
if some field are only in <fields> tag and not in <infowindowfields> this fields are empty in datagrid result.
Reading your readme.txt, I understood that two list are indipendent and the second is only for quick summary for info widget. It would seem not to be so.... for my try...
There's problem?
0 Kudos
SimoneCeccolini
New Contributor
This is Great widget my regards to autor, but i have a little problem when i use a pint widget like PrintSOE Widget (from TOM SCHULLER) , because the polygon of selection are hidden in final PDF.
The output result is only map without the selected polygon.
This not happend with other widget like eSearch or Draw Widget.

Please anyone help me.

Thanks forward from Simone.
0 Kudos
francescodi_vito
New Contributor
Hi mark,
I have a question! It's possible to develop this widget for a custom application and not into FV 2.2?
The same work of Robert S. For esearch.
Is there into code gallery this type of widget or you don't develop this widget for not FV 2.2?
Thanks
0 Kudos
francescodi_vito
New Contributor
Sorry Mark.
I'd need to use this great widget on a Map Service that contains a feature layer and table That Have a relationship class 1-M. What should I do to add this function? Could you help me with the code that you think should be added?
Help me please
thanks
0 Kudos
MollyAzami
New Contributor
Hi,

I was having the problem with the Layers being added to the TOC, so I added the one line in the INIT() and the one function as mentioned above.

It compiled fine.

Now the widget won't open at all. I just get a little clock going round and round...

I also tried importing the library that someone else mentioned... it didn't fix it...

any ideas?


EDIT: NEVER MIND, SEEMS TO BE A FLASH BUILDER ISSUE...won't do what I want it to...grrr...
0 Kudos
MehulChoksey
Esri Contributor
Where/How can I change the color of the selection results grid? I'd like a bit more contrast in the results. It's currently white text with an off-white background.

I'm not seeing it in the mxml. Or perhaps is based on the style tags set in the config.xml????

Thanks.


Changes from UIManager.as doesnt seem to be picked up in this case.
You will have to perform following in SelectionResults.mxml:
Add import along with other imports:
import mx.core.FlexGlobals;


Add following funtion:
 protected function dg_initializeHandler(event:FlexEvent):void
            {
               var dgBackgroundColor:uint = FlexGlobals.topLevelApplication.styleManager.getStyleDeclaration("global").getStyle('contentBackgroundColor');
               dg.setStyle("alternatingItemColors",[dgBackgroundColor,dgBackgroundColor]); 
            }


Add initialize="dg_initializeHandler(event)" in following declaration:

<mx:DataGrid id="dg" width="{dgContainer.width}" height="{dgContainer.height}"
                     horizontalScrollPolicy="on"
                     itemClick="dg_itemClickHandler(event)"
                     itemRollOver="dg_itemRollOverHandler(event)"
                     initialize="dg_initializeHandler(event)"/>

0 Kudos
LeithaSackmann
New Contributor II
Hi Daniel,

But yes a select by Graphic option like ArcGIS would be good.
I will see about adding one.
(I am also happy to include contributions and enhancements from others.)


Mark,
I am also very interested in your Selection widget if it would have a graphics option included. I am first selecting catchment basins and these do not have a readily recognized name field so a graphics selection is necessary.  Do you have any idea when you might get to this?  Or is it possible to select polygons using the standard search widget and then use your Selection widget to query other layers with these selected polygons from the first graphic selection?  Thought I'd ask before I tried it.  Still - thanks for a great widget!!
0 Kudos
MarkHoyland
Occasional Contributor II
The widget has now been updated with bug fixes and enhancements.
I have started a new thread see:
http://forums.arcgis.com/threads/30179-Selection-Widget-Updated-Version

Hopefully changes for the better.

Been a while coming. Studying, surfing (been goin off lately!) and my children have been taking up my spare time. Havent had a chance to get back to this for a while.

Still no select by graphic option, wont get a chance to look at this for a while.
Leave feedback on new thread.
0 Kudos