map.setExtent and TiledMapService

Discussion created by kdoman on Oct 14, 2011
Latest reply on Oct 20, 2011 by kdoman
I have a map with a Tiled and a Dynamic layer. I have a query that queries one of the features on the dynamic layer, puts the results in a table, including a link that zooms to the extent of each feature returned. Basically, I use map.setExtent() on the extent of the feature. It works pretty good.

Here's my problem. I have a polygon that's much longer North/South than East/West (Utility repair along a north/south road, for example). when I run map.setExtent() on the extent of the polygon, it centers on the polygon and mostly shows it, but because of the tiled layer service, it cuts off the northern and southern tips of the polygon.

When I use the identify task and the popup tool on the same polygon, and click the zoom to link, it zooms out to the next lower LOD on the tiled map service, which shows the entire polygon just fine.
Any idea how I can implement this with my query results?