LayerDef Extent

2602
1
10-06-2010 08:40 AM
KeithNightlinger
New Contributor III
I have a dynamic map service with three layers that I am applying a Layer Definition to in code behind based on user input.  After the data is filtered (which is working) I want to pan/zoom to the extent of the visible features. 

using Map.ZoomTo(dmsLayer.FullExtent); takes to the extent of the dynamic map service, not the visible features, nor is there a updated handler for a dynamic map service to try and call after the layer def is completed.

What would be the best way to accomplish this?

Thanks,
Keith
0 Kudos
1 Reply
DominiqueBroux
Esri Frequent Contributor

using Map.ZoomTo(dmsLayer.FullExtent); takes to the extent of the dynamic map service, not the visible features,

There is no way with the REST API and so with the SL API to get a layer extent taking in care the layer definition.



is there a updated handler for a dynamic map service to try and call after the layer def is completed

No, because the request with a layer def is stateless. It's only used for one exportmap operation.


What would be the best way to accomplish this?

A GP tool or a Server Object Extension (SOE) should be able to accomplish this.
0 Kudos