Select to view content in your preferred language

Enhanced Search Widget for FlexViewer 2.1

108709
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
ChristopherBlinn1
Deactivated User
Robert,

I am still having trouble with the popups when I use the autocomplete control I added.  All I did was create a package called controls and added an mxml called AddressAutocomplete (see code).  The functionality of the autocomplete works and the results window does return a record.  However the popup only displays as an "x".  If you hit Zoom the page freezes.  However, if you hit Clear right after hitting Zoom, the results clear but the page does zoom in on the selected record.  If you hit Clear and do not select a record from the results, everything is fine.  However, if you click on the record in the results, the page freezes (similar to hitting Zoom however a different popup appears (see image).

Any ideas on what is going on?

Thanks in advance,
Chris

[ATTACH=CONFIG]13587[/ATTACH]

[ATTACH=CONFIG]13586[/ATTACH]
0 Kudos
GregLuersman
New Contributor
Robert,

Do you ever plan on having the Fixed widget not only export but have a print function? It would be helpful for me to have the ability to have the results printed.

Thanks
Greg Luersman
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Greg,

   There has been one other wanting this capability but the LOE and ensuring that it works for everyone in every situation is just still to great.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Chris,

   Here is your code added to the 2.5.1.6 version and working.

Don't forget to click the top arrow (promote) as shown below:
0 Kudos
ChristopherBlinn1
Deactivated User
Robert,

Thanks for the code, however I did notice a small glitch.  Once the autocomplete runs and the search is completed.  If I go to search another address, it will not use the autocomplete.

Also, the autocomplete stops filtering once the list loads.

Any ideas?

Thanks,
Chris
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Chris,

   I did not thoroughly test...

Update these blocks in the AddressAutoComplete.mxml

            protected function results_click(event:MouseEvent):void
            {
                var o:Object = myResults.selectedItem;
                if(o){
                    selectedAddress.text = o.Address;
                    myResults.visible = false;
                    myResults.height = 0;
                    dispatchEvent(new Event("addressSelected"));
                    stage.focus = null;
                }
            }


            protected function keyUp(event:KeyboardEvent):void
            {
                //Calls webservice when input reaches the 2 character minimum and webservice is loaded
                if (selectedAddress.text.length>2 && wsLoaded){
                    mySvc.addEventListener(ResultEvent.RESULT, searchResults);
                    mySvc.addEventListener(FaultEvent.FAULT, fail);
                    mySvc.findAddress(selectedAddress.text);
                }
            }


            protected function init(event:FlexEvent):void
            {
                mySvc = new mx.rpc.soap.WebService();
                mySvc.wsdl = "http://yourservice/xxxxx.asmx?wsdl";
                mySvc.loadWSDL();
                mySvc..addEventListener(LoadEvent.LOAD, load_listener);
            }
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Chris,

   Do you mind sharing your findAddress WebMethod code from the webservice?
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
All,

   I will be closing this thread as it has gotten way to long and difficult to find answers you are looking for.

If you have specific questions concerning the eSearch than you NEED to start a new thread with your question.

If you are just looking for a thread to follow that will have announcements of new releases or have a specific bug to report (not a question) than use this thread:
http://forums.arcgis.com/threads/55643-Enhanced-Search-Widget-for-FlexViewer-Part-II

Thanks
0 Kudos