AnsweredAssumed Answered

How to obtain the extent of a layer programatically

Question asked by stevel on Jan 11, 2012
Latest reply on Jan 11, 2012 by stevel
Take an example of a Map Service in the REST API. This contains an Initial Extent and Full Extent:

Intial Extent:
XMin: -207.682974279982
YMin: -40.6075371681153
XMax: -37.1804225764967
YMax: 129.89501453537
Spatial Reference: 4269


When creating a new Tiled or Dynamic layer from this service, the Initial Extent and Full Extent are listed as null in FireBug. How can these values be obtained programmatically?

Feature Layer contains a fullExtent property but I can't see the equivalent for Dynamic or Tiled layers.

The goal is to zoom to the extent of the layer once it's been added.

Thanks,
Steve

Outcomes