1. It seems that when I set the widgets loading mode to 'float' the widget manager won't recognize the 'left | top | right | buttom ' parameters set to the widget. Am I missing something or it is a bug?2. I think the function below (which is in QueryWidget.mxml) needs some modifications because the path count of one specific polyline is not always bigger than 2, 'const pathIndex:int = int(pathCount / 2) - 1;' may raises an error.
private function getGeomCenter(gra:Graphic):MapPoint
{
var pt:MapPoint;
switch (gra.geometry.type)
{
case Geometry.MAPPOINT:
pt = gra.geometry as MapPoint;
break;
case Geometry.MULTIPOINT:
const multipoint:Multipoint = gra.geometry as Multipoint;
pt = multipoint.points[0] as MapPoint;
break;
case Geometry.POLYLINE:
const pl:Polyline = gra.geometry as Polyline;
const pathCount:Number = pl.paths.length;
const pathIndex:int = int(pathCount / 2) - 1;
const midPath:Array = pl.paths[pathIndex];
const ptCount:Number = midPath.length;
const ptIndex:int = int(ptCount / 2) - 1;
pt = pl.getPoint(pathIndex, ptIndex);
break;
case Geometry.POLYGON:
const poly:Polygon = gra.geometry as Polygon;
pt = poly.extent.center;
break;
}
return pt;
}