Select to view content in your preferred language

eSearch Zoom to results

2823
4
Jump to solution
07-25-2012 10:26 AM
MattShetzer
Deactivated User
I am trying to tweak the Esearch code a bit to auto zoom to the results that are returned.  (without the user having to click the zoom button)

If someone can give me a little help in the mxml to achieve this.

Thanks in advance.

Matt Shetzer
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus
Matt,

   Find the queryFeaturesText function and then find these lines and add the code in red:

                            if (openDataGrid && floatorfixed != "fixed")                                 showGridResults();                                                           zoomAll();                         }                         catch (error:Error){                             showMessage(error.message, false);                         }


And if you want it to do the same for the graphical then you would add the zoomAll to the same general area in the queryFeaturesGraphical function.

View solution in original post

0 Kudos
4 Replies
RobertScheitlin__GISP
MVP Emeritus
Matt,

   So you want to automatically zoom to all the returned results or just the fist result?
0 Kudos
MattShetzer
Deactivated User
Thanks for such a quick reply Robert!

I'd like to automatically zoom to all the returned results (I hope the user gets just one.  I'm working on a PLSS search.  If they get multiple, they should zoom the extent of them all)

The users want to type in the text for the search and go directly there.  (without clicking Zoom)

Thanks for your help (and all the support on this forum)

Matt


Matt,

   So you want to automatically zoom to all the returned results or just the fist result?
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Matt,

   Find the queryFeaturesText function and then find these lines and add the code in red:

                            if (openDataGrid && floatorfixed != "fixed")                                 showGridResults();                                                           zoomAll();                         }                         catch (error:Error){                             showMessage(error.message, false);                         }


And if you want it to do the same for the graphical then you would add the zoomAll to the same general area in the queryFeaturesGraphical function.
0 Kudos
MattShetzer
Deactivated User
Great.  Thanks for the help Robert !
Matt

Matt,

   Find the queryFeaturesText function and then find these lines and add the code in red:

                            if (openDataGrid && floatorfixed != "fixed")
                                showGridResults(); 
                            
                            zoomAll();
                        }
                        catch (error:Error){
                            showMessage(error.message, false);
                        }


And if you want it to do the same for the graphical then you would add the zoomAll to the same general area in the queryFeaturesGraphical function.
0 Kudos