Select to view content in your preferred language

How to zoom to selection on ArcGISDynamicMapServiceLayer?

1628
2
Jump to solution
05-06-2013 01:58 PM
SebastienNicoud
New Contributor
Hello,

I am using the latest ArcGIS Javascript API. All the examples and code I've found so far only deal with geometries of a FeatureLayer. How do I automatically zoom to the visible features of a ArcGISDynamicMapServiceLayer or ArcGISTiledMapServiceLayer layer?

By visible I mean that some of the features of the layers are filtered out thanks to the layerDefinitions property.

I wish I could keep using FeatureLayer's graphics but I can't because I am running in to a wall due the sheer amount of geometry data downloaded, so I have to let the server do the rendering work and use a ArcGISDynamicMapServiceLayer to get images instead.

Thank you.
0 Kudos
1 Solution

Accepted Solutions
StephenLead
Honored Contributor
How do I automatically zoom to the visible features of a ArcGISDynamicMapServiceLayer or ArcGISTiledMapServiceLayer layer? By visible I mean that some of the features of the layers are filtered out thanks to the layerDefinitions property.


To my knowledge, that isn't possible and you'll need to work with the features in order to zoom to the combined extent of the query/definition.

You may be able to simplify this somewhat by using a featureLayer with the selectFeatures statement.

Steve

View solution in original post

0 Kudos
2 Replies
StephenLead
Honored Contributor
How do I automatically zoom to the visible features of a ArcGISDynamicMapServiceLayer or ArcGISTiledMapServiceLayer layer? By visible I mean that some of the features of the layers are filtered out thanks to the layerDefinitions property.


To my knowledge, that isn't possible and you'll need to work with the features in order to zoom to the combined extent of the query/definition.

You may be able to simplify this somewhat by using a featureLayer with the selectFeatures statement.

Steve
0 Kudos
SebastienNicoud
New Contributor
Thank you for your answer.
0 Kudos