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 zoom to the visible features of an ArcGISDynamicMapServiceLayer or an 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 FeatureLayers 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.