Select to view content in your preferred language

Attribute Inspector vs regular Identify/Query

548
1
07-01-2010 08:35 AM
JoshuaKalov
Occasional Contributor
I am trying to figure out the pros/cons of using FeatureLayer and Attribute Inspector versus the "old" way of identify/query with a display table.

I am struggling to understand what the difference is and what benefits there are for using the Attribute Inspector/featurelayer system for displaying data.

Thanks
Tags (2)
0 Kudos
1 Reply
FrankRigsby
Emerging Contributor
Hi Joshua,

Wow big question...

The basic difference is how the layer is presented to your application and how you query/retrieve the underlining data:

When you use a tiled or dynamic layer the server takes care of rendering the layer to a png(depending on configuration) graphics file and this �??dumb�?� image is then rendered by you application. So when you do an  identify, you click on the map and the results of that in the form of a map point and other data is sent to the server which then returns the result data/geometry if any. How you  handle the result is up to you.(Popup, table...)

When you use the Feature(Graphics) Layer the at layer load/extent change client makes a query to the server the results are returned as geometry and data, you then render the individual elements however you want. You can also add event handlers to individual elements.So now when you click on the element no server action is required you already have that elements data and it is displayed.

Now the pros/cons;

identify/query;

Pros:
1. Server takes care of rendering layer.
Queries are taken care of as needed no �??wasted memory�?� on the client side.
Layers with large data(>500 elements) sets can be viewed and queried.

Cons:
You must use the map service layer to control the look of the layer.
You can�??t add event handlers to individual elements..no mouse over effects/context menus etc.(until the server processes the user click)

feature layer;

Pros:
The client takes care of rendering the elements.This would allow for individual users to have layers rendered in a completely different way than other users without having to change(or create more than one) the map service layer.
Event handlers can be assigned to individual elements allowing for things like changing the cursor when the mouse is over the element.
When users click on the element no request is made of the server the geometry and data for that  element are already loaded. and you application can present this data anyway you want.

Cons:
The feature(graphics) layer result is limited by the rest server to I think 500 elements there are ways to config the server to give more( I will let you look up how) I don�??t worry about this I limit the results with extents and zoom levels(Visibility).
You have full control so you have to define in the application how all the elements will look and behave.

Conclusion;

I use the feature(graphics) layer when ever I can I like the control I have particularly over the mouse events...
0 Kudos