Select to view content in your preferred language

Having problem with the Enhanced Search Widget...

1533
18
02-02-2011 04:33 PM
DanielOchoa
Regular Contributor
First - thanks to Robert for this great widget!

So far I've got it working almost 100%. The only issue I'm having is this - one of my map services (dynamic) has layers that appear from query tables converted to layers. These update dynamically from a sql database. I can use the enhanced search by text to find the features no problem.  I can coresponding table data shows up in the results/grid just fine...however....when I click on the returned result(s) in order to have the map zoom to one of them, I am sent to the prime meridian! Hover-over does not show a pop-up bubble either.

Now, when I select items from a different map service using the spatial tools, selecting and zooming to them is no problem, and pop-ups work just fine.  Its just this specific map service with the table-based layers that has the issue with zooming. All the map services have the same projection (102100), its set correctly in the eSearch xml, and all the points show up when turned on in the map. The individual layer table coordinate systems are set correctly (done when turning the table into a layer), as is the data frame. I've also confirmed it in the REST directory - everything is set correctly. However, I still zoom to the PM when these features are selected/clicked on. 

Any thoughts or links to an answer somewhere else in this forum?  I know I can just turn off "search by spatial...", but I'd like my users to have this option. 

Any help is appreciated,

Thanks!
Tags (2)
0 Kudos
18 Replies
RobertScheitlin__GISP
MVP Emeritus
Daniel,

   Can you please try that particular map service in esri's search widget and see if it exhibits the same behavior?
0 Kudos
DanielOchoa
Regular Contributor
Robert,

Tried it just now, same thing - spatial search (selecting features by drawing a box around them) selects the correct items but then when you click on them in the results list, the zoom brings the map to the prime meridian (0.00000, 0.00000). I 'm fully prepared to accept that its not the tool, but the map serivce, but I dont understand why its doing this if the projection is set correctly.

Thanks,

` D
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Daniel,


   I don't have any experience with QueryLayers but based on what is happening it is definitely a Spatial reference issue. Have you tried adding the layer to ArcMap and identifying the layer to verify that the coordinates are what you expect?
0 Kudos
DanielOchoa
Regular Contributor
Rob,

There are some definite projection shenanegains going on; too much to type up right now. . I'll write it up tommorrow and post...I think its safe to say its that and not your seach widget.

Thanks for your help and guidance!

~ D
0 Kudos
DanielOchoa
Regular Contributor
Rob,

I think I have a possible solution for this. 

Right now, in the MXD I am publishing as a map service, I am displaying the results of a Query table turned into a layer.  The mxd and the the version of ArcGIS Server is 9.3.1.  I don't have Arc 10 yet, so I was not aware of some of the new features, including Query Layers, which seem to work differently than Query Tables.

I just saw a different thread that you were posting to that discusses this very topic.:

http://forums.arcgis.com/threads/20699-Is-dynamic-data-in-website-possible?p=74710#post74710

My next step will be to upgrade to 10 and see if this solves the problem by using query layers.

So, unless someone else has a solution or some different advice, using published MXDs in 9.3.1 with query tables that are used to display dynamically-changing data from a database will provide mixed results when using them in conjunction with the search/select/zoom tools that come with flex. The tools will find them, but zooming to them by clicking on the result will not work. The possible solution(unconfirmed) is to use Query Layers after upgrading to 10.

Thanks Rob! I appreciate your help.
0 Kudos
DanielOchoa
Regular Contributor
Rob,

One thing I just found.  If I use the Identify tool and select a point from the aforementioned map service, I can click on it and it works correctly; It goes to the point on the map and not the prime meridian.  So, the ESRI search and your enhanced search have a problem with the map service/points, the Identify tool does not.  I'm at a loss.

~ D
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Daniel,

   The identify task handles thing WAY different on the server end than does the query task. That is probably why it works.
0 Kudos
DanielOchoa
Regular Contributor
Rob,

Good to know.  I'd love to know why and how, and if it will ever change, but thats for another time...

Thanks for all your help!

~ D
0 Kudos
DanielOchoa
Regular Contributor
Rob -

Just tried ver 2.2.7, and right out of box (no changes) I get error #2036 when first starting up the widget; but thats it, just once and then it works fine after dismissing the error message. The error message never comes back, unless you restart the viewer. This error didn't occur with 2.2.6 (which I just re-tested - works fine).  Assets folder is in there, copied all images, etc.  I'm using the compiled 2.2 version & since I'm using the compiled version, I just dropped the folder in the directory without adding it to the modules (did this last time no problems). I know (or at least I think I do) that #2036 is URL not found, but as far as I can tell everything is correct.


Any thoughts? I have a feeling I'm missing something obvious.

Thx
0 Kudos