I haven't explored using the editor widget but here is a code sample that will merge polyline graphics into one geometry:
function mergeLines(graphicsArray){ // merge geometries of graphics into one geometry var polyline = new Polyline(map.spatialReference); for (var i = 0; i < graphics.length; i++){ var paths = graphics.geometry.paths; for (var j = 0; j < paths.length; j++){ //needed for multi part lines polyline.addPath(paths); } } return polyline; } var mergedGraphicGeometry = mergeLines();
the graphicsArray could be map.graphics.graphics, featureLayer.graphics, featureLayer.getSelectedFeatures(), a manually populate array, etc.
Hope that helps!
Is somebody who resolved this problem?
Thanks in advance.
Les membres connectés peuvent publier, suivre les mises à jour, et plus encore. Nouveau ici ? Inscrivez-vous gratuitement.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.