All,When I use the sample code for zooming to the extent of the graphics layer, I find that it does not work for features aligned vertically with the Y axis. By setting up an alert, I found that the xMin and xMax values change but the yMin and yMax values do not causing it to work for horizontally aligned features, but not vertically aligned features.
private function zoomToGraphics():void
{
var graphicProvider:ArrayCollection = gLayer.graphicProvider as ArrayCollection;
var graphicsExtent:Extent = GraphicUtil.getGraphicsExtent(graphicProvider.toArray());
if (graphicsExtent){
Map.extent = graphicsExtent;
Alert.show("Mheight: " + Map.extent.height + "\n Gheight: " + graphicsExtent.height
+ "\n " + "\n Mwidth: " + Map.extent.width + "\n Gwidth: " + graphicsExtent.width);
}
}
Thanks,-Dan