My application uses a tiled map service as the base and I want to zoom to a particular extent that would contain all of the graphics on it. I set the extent and zoom to it, but depending on the browser size, not all of the graphics are shown as expected. I'm using the line if (!mapMain.extent.contains(newExtent)) mapMain.level--;to zoom out one level, but that doesn't always seem to work. The attached graphics shows the results of two different browser sizes.Here's the test code to create this (using Flex 4.6 and the 3.0 API)<?xml version="1.0" encoding="utf-8"?><s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" xmlns:esri="http://www.esri.com/2008/ags" creationComplete="application1_creationCompleteHandler(event)"> <fx:Script> <=!=[=C=D=A=T=A=[ import com.esri.ags.Graphic; import com.esri.ags.geometry.Extent; import com.esri.ags.geometry.WebMercatorExtent; import com.esri.ags.geometry.WebMercatorMapPoint; import mx.events.FlexEvent; protected function application1_creationCompleteHandler(event:FlexEvent):void { var newExtent:Extent = new WebMercatorExtent(-179, -14, -64, 25); var graphic:Graphic; graphic = new Graphic(new WebMercatorMapPoint(-179, -14)); layerGraphics.add(graphic); graphic = new Graphic(new WebMercatorMapPoint(-64, 25)); layerGraphics.add(graphic); mapMain.extent = newExtent; if (!mapMain.extent.contains(newExtent)) mapMain.level--; } ]=]=> </fx:Script> <fx:Declarations> <!-- Place non-visual elements (e.g., services, value objects) here --> </fx:Declarations> <esri:Map id="mapMain" wrapAround180="true"> <esri:ArcGISTiledMapServiceLayer id="layerOceans" alpha="1.0" url="http://server.arcgisonline.com/ArcGIS/rest/services/Ocean_Basemap/MapServer" visible="true"/> <esri:GraphicsLayer id="layerGraphics" buttonMode="true"/> </esri:Map> </s:Application>