<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Editor Widget, Union Tool, and Polyline features in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/editor-widget-union-tool-and-polyline-features/m-p/20385#M1819</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Anyone out there have any success getting line (polyline) features to union/merge when using the Editor Widget's edit toolbar union tool?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When I select two or more line features in my application and click the union tool, nothing happens..., firebug reveals that the application doesn't even attempt an HTTP GET to my geometry service's union endpoint.&amp;nbsp; I have point, line and polygn features in my template picker.&amp;nbsp; When I attempt the same thing with polygon features, it works as expected.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The JavaScript API documentation for the GeometryService union states that input geometries "...must be of the same type." This implies that it should work with esriPolyline types. And I was able to sucessfully test the geometry service's rest endpoint directly, by passing in a Geometry Array containing two paths and having it succesfully return a merged geometry message.&amp;nbsp; So I'm confident the issue probably lies within my code or that it is a bug in the Editor Widget itself.&amp;nbsp; Currently I'm using JS version 2.4.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Interestingly, I have not found an ESRI sample that contains both the union tool and a line type feature layer.&amp;nbsp; Anyone know of one..., ESRI or other public online example?&amp;nbsp; I'd appreciate hearing others experiences unioning features in their web map applications using the Editor Widget's union tool (i.e. toolbarOptions {mergeVisible: true}) with a polyline feature layer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in advance for your thoughts and feedback, Jason&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 06 Jan 2012 14:13:20 GMT</pubDate>
    <dc:creator>JasonMielke</dc:creator>
    <dc:date>2012-01-06T14:13:20Z</dc:date>
    <item>
      <title>Editor Widget, Union Tool, and Polyline features</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/editor-widget-union-tool-and-polyline-features/m-p/20385#M1819</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Anyone out there have any success getting line (polyline) features to union/merge when using the Editor Widget's edit toolbar union tool?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When I select two or more line features in my application and click the union tool, nothing happens..., firebug reveals that the application doesn't even attempt an HTTP GET to my geometry service's union endpoint.&amp;nbsp; I have point, line and polygn features in my template picker.&amp;nbsp; When I attempt the same thing with polygon features, it works as expected.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The JavaScript API documentation for the GeometryService union states that input geometries "...must be of the same type." This implies that it should work with esriPolyline types. And I was able to sucessfully test the geometry service's rest endpoint directly, by passing in a Geometry Array containing two paths and having it succesfully return a merged geometry message.&amp;nbsp; So I'm confident the issue probably lies within my code or that it is a bug in the Editor Widget itself.&amp;nbsp; Currently I'm using JS version 2.4.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Interestingly, I have not found an ESRI sample that contains both the union tool and a line type feature layer.&amp;nbsp; Anyone know of one..., ESRI or other public online example?&amp;nbsp; I'd appreciate hearing others experiences unioning features in their web map applications using the Editor Widget's union tool (i.e. toolbarOptions {mergeVisible: true}) with a polyline feature layer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in advance for your thoughts and feedback, Jason&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Jan 2012 14:13:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/editor-widget-union-tool-and-polyline-features/m-p/20385#M1819</guid>
      <dc:creator>JasonMielke</dc:creator>
      <dc:date>2012-01-06T14:13:20Z</dc:date>
    </item>
    <item>
      <title>Re: Editor Widget, Union Tool, and Polyline features</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/editor-widget-union-tool-and-polyline-features/m-p/20386#M1820</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Any news on this one? Still an issue in JSAPI 3.3.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Feb 2013 11:03:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/editor-widget-union-tool-and-polyline-features/m-p/20386#M1820</guid>
      <dc:creator>JonasEngedal</dc:creator>
      <dc:date>2013-02-15T11:03:07Z</dc:date>
    </item>
    <item>
      <title>Re: Editor Widget, Union Tool, and Polyline features</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/editor-widget-union-tool-and-polyline-features/m-p/20387#M1821</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I want the feature to union/merge Polyline for editor widget too. It's really useful for my work.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in advance, Sakkachin.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Mar 2013 01:24:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/editor-widget-union-tool-and-polyline-features/m-p/20387#M1821</guid>
      <dc:creator>SakkachinWongcharoen</dc:creator>
      <dc:date>2013-03-05T01:24:30Z</dc:date>
    </item>
    <item>
      <title>Re: Editor Widget, Union Tool, and Polyline features</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/editor-widget-union-tool-and-polyline-features/m-p/20388#M1822</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is somebody who &lt;SPAN lang="en"&gt;resolved&lt;/SPAN&gt; this problem?&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;Thanks in advance.&lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/blush.png" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Oct 2015 08:18:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/editor-widget-union-tool-and-polyline-features/m-p/20388#M1822</guid>
      <dc:creator>ALESSANDROCECILI</dc:creator>
      <dc:date>2015-10-22T08:18:19Z</dc:date>
    </item>
    <item>
      <title>Re: Editor Widget, Union Tool, and Polyline features</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/editor-widget-union-tool-and-polyline-features/m-p/20389#M1823</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;I haven't explored using the editor widget but here is a code sample that will merge polyline graphics into one geometry:&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;function mergeLines(graphicsArray){
&amp;nbsp;&amp;nbsp;&amp;nbsp; // merge geometries of graphics into one geometry
&amp;nbsp;&amp;nbsp;&amp;nbsp; var polyline = new Polyline(map.spatialReference);
&amp;nbsp;&amp;nbsp;&amp;nbsp; for (var i = 0; i &amp;lt; graphics.length; i++){
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var paths = graphics&lt;I&gt;.geometry.paths;&lt;/I&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for (var j = 0; j &amp;lt; paths.length; j++){ //needed for multi part lines
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; polyline.addPath(paths&lt;J&gt;);&lt;/J&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return polyline;
}

var mergedGraphicGeometry = mergeLines();&lt;/PRE&gt;&lt;P&gt;the graphicsArray could be map.graphics.graphics, featureLayer.graphics, featureLayer.getSelectedFeatures(), a manually populate array, etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 20:48:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/editor-widget-union-tool-and-polyline-features/m-p/20389#M1823</guid>
      <dc:creator>BrandonFlessner</dc:creator>
      <dc:date>2021-12-10T20:48:28Z</dc:date>
    </item>
  </channel>
</rss>

