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) );
Dan, Just take the Polygons.rings array and set them to the paths array of a new polyline.
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.