Select to view content in your preferred language

Identify Info Window/Tabs with 14 layers

2210
15
09-05-2012 03:12 PM
DorotheaKnigge
Deactivated User
Hi,

My application is based on jsapi version3.0. It features a GIS Server service called "All_Services2012" which has 14 layers. An 'on-click' event identifies the 14 layers and displays them in an info window with tabs. The problem is that it takes between 35-45 seconds for the info window to display.  I'm afraid that the client will not want to wait that long for the information to come up.
Is it possible to add an "hour glass" or somthing to show the process is working?  Better yet, what can I do to speed up the info window display?

I was wondering if maybe the duplication of the variable declaration
(var i=0, il=layerResults.features.length; i<il; i++)
in each 'case'  was  part of the problem. If so, how would I structure the code? 

Would it be better to have the client turn on the layers he would like to identify?

I would very much appreciate someone looking at the attached code.

Many thanks,

Dorothea

The identify portion  is based on this sample:
http://help.arcgis.com/en/webapi/javascript/arcgis/demos/find/find_drilldown.html
0 Kudos
15 Replies
AdrianMarsden
Honored Contributor
updated file and CSS - revised screen shot showing alternating styles

[ATTACH=CONFIG]17547[/ATTACH]
0 Kudos
DorotheaKnigge
Deactivated User
Yes, I will be having fun working through all the offered suggestions.  Adrian, all our Services data exist on the SDE and I work using the ArcInfo platform so I may have to take a look at simplifying polygon features.  Your code (from that old forum post) is really intriguing and I will definitely be using it in another application.

George, I love how you structured the identify window with the "Show me" drop-down list and link buttons.  How did you incorporate the drop down list?  Are all your identify layers in one service? The "Identify" button is also a nice feature.
Thank you for the snippet on the Progress Bar.  I will try that out.

Dorothea
0 Kudos
DorotheaKnigge
Deactivated User
Hi Adrian, I just saw your new post.  Thank you for the new files.  Will take some time today to go through the added info....

Dorothea
0 Kudos
GeorgeSimpson
Regular Contributor
Dorothea, All of my layers are in one service.  I have tables in the database which dictate what users have permissions to view.  When the user logs in, I query the database and get a list of what we called "Result Groups" that are the logical groupings of layers.  These values are what you see in the dropdown.  On the client, there are objects called ResultGroups that I use to interact with the other elements such as layers and their related business data tables, along with the reports, images, scanned documents, etc.  You could probably populate the dropdown with the layers themselves, or use group layers in your service.  If you open the application and look at it through Firebug, you can add breakpoints and follow everything that is going on behind the scenes.
0 Kudos
AdrianMarsden
Honored Contributor
Dorothea - just a thought I had this morning.

Have you the ability to test in both Chrome and IE7 or IE8?  If so, then is there any difference in speed?  If there is a speed difference (and I'd hope Chrome would be faster) then it will be down to some JavaScript issue, as Chrome is so much faster than IE7/8.  If there isn't much time difference, then the issue, as you suspect, is the time the server is spent processing the request.

Cheers

ACM
0 Kudos
DorotheaKnigge
Deactivated User
Good morning,

Thank you for your thought Adrian.  I honestly haven't taken the time to look at the Chrome development interface and tools but I do intend to. I really do need to hone my development skills.  Right now I am restructuring my application to only Identify the layers that are turned on in the table of contents.

I have also been trying to incorporate a progress function so the user knows the application is working.  I have opted for a progress icon versus a bar.  It works for the opening of my application but doesn't show up during the identify event.  Where should the  "show" and "hide"  portions  of the progress bar function be inserted to make it work for the identify process specifically? 

Cheers,

Dorothea
0 Kudos