Solved! Go to Solution.
Dan,
Just take the Polygons.rings array and set them to the paths array of a new polyline.
function polygonToPolyline(polygon:Polygon):Polyline { const polyline:Polyline = new Polyline; for each (var ring:Array in polygon.rings) { polyline.addPath(ring); } return polyline; }
function polygonToPolyline(polygon:Polygon):Polyline { const polyline:Polyline = new Polyline; for each (var ring:Array in polygon.rings) { polyline.addPath(ring); } return polyline; }
var arr:Array = fireAreas.selectedFeatures; var polyLineTemp:Polyline = polygonToPolyline( ((arr[1] as Graphic).geometry) as Polygon); var arr1:Array = []; arr1.push((arr[0] as Graphic ).geometry); geomService.cut( arr1,polyLineTemp, new AsyncResponder(onQueryResult, onQueryFault) );