<?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 Re: Polyline editing in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/polyline-editing/m-p/663121#M61888</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Robert,&lt;/P&gt;&lt;P&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; I am unable to do applyedits for the second time when i click on map &amp;nbsp;i am using &amp;nbsp;javascript version 3.18&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2Fwww.w3.org%2FTR%2Fxhtml1%2FDTD%2Fxhtml1-transitional.dtd" rel="nofollow" target="_blank"&gt;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&lt;/A&gt;&lt;SPAN&gt;"&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;html xmlns="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml" rel="nofollow" target="_blank"&gt;http://www.w3.org/1999/xhtml&lt;/A&gt;&lt;SPAN&gt;"&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&amp;lt;head&amp;gt;&lt;BR /&gt; &amp;lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8"&amp;gt;&lt;BR /&gt;&lt;SPAN&gt; &amp;lt;link rel="stylesheet" href="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fjs.arcgis.com%2F3.18%2Fdijit%2Fthemes%2Fclaro%2Fclaro.css" rel="nofollow" target="_blank"&gt;https://js.arcgis.com/3.18/dijit/themes/claro/claro.css&lt;/A&gt;&lt;SPAN&gt;"&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &amp;lt;link rel="stylesheet" href="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fjs.arcgis.com%2F3.18%2Fesri%2Fcss%2Fesri.css" rel="nofollow" target="_blank"&gt;https://js.arcgis.com/3.18/esri/css/esri.css&lt;/A&gt;&lt;SPAN&gt;"&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt; &amp;lt;meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no"&amp;gt;&lt;BR /&gt; &amp;lt;title&amp;gt;Landuse&amp;lt;/title&amp;gt;&lt;BR /&gt;&lt;SPAN&gt; &amp;lt;link rel="stylesheet" href="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fjs.arcgis.com%2F3.18%2Fdijit%2Fthemes%2Fclaro%2Fclaro.css" rel="nofollow" target="_blank"&gt;https://js.arcgis.com/3.18/dijit/themes/claro/claro.css&lt;/A&gt;&lt;SPAN&gt;"&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &amp;lt;link rel="stylesheet" href="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fjs.arcgis.com%2F3.18%2Fesri%2Fcss%2Fesri.css" rel="nofollow" target="_blank"&gt;https://js.arcgis.com/3.18/esri/css/esri.css&lt;/A&gt;&lt;SPAN&gt;"&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt; &amp;lt;style&amp;gt;&lt;BR /&gt; html, body&lt;BR /&gt; {&lt;BR /&gt; height: 100%;&lt;BR /&gt; width: 100%;&lt;BR /&gt; margin: 0;&lt;BR /&gt; padding: 0;&lt;BR /&gt; overflow: hidden;&lt;BR /&gt; }&lt;BR /&gt; &lt;BR /&gt; .btn&lt;BR /&gt; {&lt;BR /&gt; background: #3f3f3f;&lt;BR /&gt; color: #fff;&lt;BR /&gt; font-family: Tahoma;&lt;BR /&gt; font-size: 11px;&lt;BR /&gt; height: 18px;&lt;BR /&gt; }&lt;BR /&gt; .lbl&lt;BR /&gt; {&lt;BR /&gt; color: #000;&lt;BR /&gt; font-family: Tahoma;&lt;BR /&gt; font-size: 11px;&lt;BR /&gt; font-weight: 200;&lt;BR /&gt; }&lt;BR /&gt; #header&lt;BR /&gt; {&lt;BR /&gt; border: solid 2px #462d44;&lt;BR /&gt; background: #fff;&lt;BR /&gt; color: #444;&lt;BR /&gt; -moz-border-radius: 4px;&lt;BR /&gt; border-radius: 4px;&lt;BR /&gt; font-family: sans-serif;&lt;BR /&gt; font-size: 1.1em padding-left:20px;&lt;BR /&gt; }&lt;BR /&gt; #map&lt;BR /&gt; {&lt;BR /&gt; padding: 1px;&lt;BR /&gt; border: solid 2px #444;&lt;BR /&gt; -moz-border-radius: 4px;&lt;BR /&gt; border-radius: 4px;&lt;BR /&gt; }&lt;BR /&gt; #rightPane&lt;BR /&gt; {&lt;BR /&gt; border: none;&lt;BR /&gt; padding: 0;&lt;BR /&gt; width: 228px;&lt;BR /&gt; }&lt;BR /&gt; .templatePicker&lt;BR /&gt; {&lt;BR /&gt; border: solid 2px #444;&lt;BR /&gt; }&lt;BR /&gt; &amp;lt;/style&amp;gt;&lt;BR /&gt;&lt;SPAN&gt; &amp;lt;script src="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fjs.arcgis.com%2F3.18%2F" rel="nofollow" target="_blank"&gt;https://js.arcgis.com/3.18/&lt;/A&gt;&lt;SPAN&gt;"&amp;gt;&amp;lt;/script&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt; &amp;lt;script type="text/javascript"&amp;gt;&lt;BR /&gt; var map;&lt;BR /&gt; require([&lt;BR /&gt; "dojo/dom", "dojo/on",&lt;BR /&gt; "esri/map",&lt;BR /&gt; "esri/layers/ArcGISDynamicMapServiceLayer",&lt;BR /&gt; "esri/toolbars/draw",&lt;BR /&gt; "esri/toolbars/edit",&lt;BR /&gt; "esri/graphic",&lt;BR /&gt; "esri/config",&lt;BR /&gt; "esri/tasks/QueryTask",&lt;BR /&gt; "esri/tasks/query",&lt;BR /&gt; "esri/Color",&lt;BR /&gt; "esri/geometry/Polyline",&lt;BR /&gt; "esri/geometry/Point",&lt;/P&gt;&lt;P&gt;"esri/layers/FeatureLayer",&lt;/P&gt;&lt;P&gt;"esri/symbols/SimpleMarkerSymbol",&lt;/P&gt;&lt;P&gt;"esri/symbols/SimpleLineSymbol",&lt;BR /&gt; "esri/symbols/SimpleFillSymbol",&lt;BR /&gt; "esri/symbols/CartographicLineSymbol",&lt;/P&gt;&lt;P&gt;"esri/dijit/editing/TemplatePicker",&lt;/P&gt;&lt;P&gt;"dojo/_base/array",&lt;BR /&gt; "dojo/_base/event",&lt;BR /&gt; "dojo/_base/lang",&lt;BR /&gt; "dojo/parser",&lt;BR /&gt; "dijit/registry",&lt;BR /&gt; "dojo/_base/Color",&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; "dijit/layout/BorderContainer", "dijit/layout/ContentPane",&lt;BR /&gt; "dijit/form/Button", "dojo/domReady!"&lt;BR /&gt; ], function (&lt;BR /&gt; dom, on, Map, ArcGISDynamicMapServiceLayer, Draw, Edit, Graphic, esriConfig, QueryTask, Query, Color, Polyline, Point,&lt;BR /&gt; FeatureLayer,&lt;BR /&gt; SimpleMarkerSymbol, SimpleLineSymbol, SimpleFillSymbol, CartographicLineSymbol,&lt;BR /&gt; TemplatePicker,&lt;BR /&gt; arrayUtils, event, lang, parser, registry, Color&lt;BR /&gt; ) {&lt;BR /&gt; parser.parse();&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;// refer to "Using the Proxy Page" for more information: &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fdevelopers.arcgis.com%2Fjavascript%2F3%2Fjshelp%2Fags_proxy.html" rel="nofollow" target="_blank"&gt;https://developers.arcgis.com/javascript/3/jshelp/ags_proxy.html&lt;/A&gt;&lt;BR /&gt; esriConfig.defaults.io.proxyUrl = "/proxy/";&lt;/P&gt;&lt;P&gt;// This service is for development and testing purposes only. We recommend that you create your own geometry service for use within your applications.&lt;BR /&gt;&lt;SPAN&gt; esriConfig.defaults.geometryService = new esri.tasks.GeometryService("&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Futility.arcgisonline.com%2FArcGIS%2Frest%2Fservices%2FGeometry%2FGeometryServer" rel="nofollow" target="_blank"&gt;https://utility.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer&lt;/A&gt;&lt;SPAN&gt;");&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;map = new Map("map", {&lt;/P&gt;&lt;P&gt;center: [-83.244, 42.581],&lt;BR /&gt; zoom: 15&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; var executeQueryTask;&lt;BR /&gt; var line;&lt;BR /&gt; var lineSymbol;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;SPAN&gt; var dynamicMapServiceLayer = new ArcGISDynamicMapServiceLayer("&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2Flocalhost%3A6080%2Farcgis%2Frest%2Fservices%2Fedit%2FMapServer" rel="nofollow" target="_blank"&gt;http://localhost:6080/arcgis/rest/services/edit/MapServer&lt;/A&gt;&lt;SPAN&gt;");&lt;/SPAN&gt;&lt;BR /&gt; map.addLayer(dynamicMapServiceLayer);&lt;/P&gt;&lt;P&gt;//initialize query task&lt;BR /&gt;&lt;SPAN&gt; var queryTask = new QueryTask("&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2Flocalhost%3A6080%2FArcGIS%2Frest%2Fservices%2Fedit%2FMapServer%2F20" rel="nofollow" target="_blank"&gt;http://localhost:6080/ArcGIS/rest/services/edit/MapServer/20&lt;/A&gt;&lt;SPAN&gt;");&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;//initialize query&lt;BR /&gt; var query = new Query();&lt;BR /&gt; query.returnGeometry = true;&lt;BR /&gt; query.outFields = ["LTP_ID", "OBJECTID"];&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; symbol = new SimpleMarkerSymbol();&lt;BR /&gt; symbol.setStyle(SimpleMarkerSymbol.STYLE_SQUARE);&lt;BR /&gt; symbol.setSize(10);&lt;BR /&gt; symbol.setColor(new Color([255, 255, 0, 0.5]));&lt;/P&gt;&lt;P&gt;on(dom.byId("execute"), "click", execute);&lt;/P&gt;&lt;P&gt;on(dom.byId("ltext"), "click", ltext);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;var landusePointLayer = new FeatureLayer("&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2Flocalhost%3A6080%2Farcgis%2Frest%2Fservices%2Fedit%2FFeatureServer%2F20" rel="nofollow" target="_blank"&gt;http://localhost:6080/arcgis/rest/services/edit/FeatureServer/20&lt;/A&gt;&lt;SPAN&gt;", {&lt;/SPAN&gt;&lt;BR /&gt; mode: FeatureLayer.MODE_SNAPSHOT,&lt;BR /&gt; outFields: ["*"]&lt;BR /&gt; });&lt;BR /&gt;&lt;SPAN&gt; var landuseLineLayer = new FeatureLayer("&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2Flocalhost%3A6080%2Farcgis%2Frest%2Fservices%2Fedit%2FFeatureServer%2F34" rel="nofollow" target="_blank"&gt;http://localhost:6080/arcgis/rest/services/edit/FeatureServer/34&lt;/A&gt;&lt;SPAN&gt;", {&lt;/SPAN&gt;&lt;BR /&gt; mode: FeatureLayer.MODE_SNAPSHOT,&lt;BR /&gt; outFields: ["*"]&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; // map.on("layers-add-result",setupEditor);&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; map.addLayers([landusePointLayer, landuseLineLayer]);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; function execute() {&lt;BR /&gt; debugger;&lt;BR /&gt; query.text = dom.byId("stateName").value;&lt;BR /&gt; queryTask.execute(query, showResults);&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; function showResults(featureSet) {&lt;BR /&gt; debugger;&lt;/P&gt;&lt;P&gt;map.graphics.clear();&lt;/P&gt;&lt;P&gt;//Performance enhancer - assign featureSet array to a single variable.&lt;BR /&gt; var resultFeatures = featureSet.features;&lt;/P&gt;&lt;P&gt;//Loop through each feature returned&lt;BR /&gt; for (var i = 0, il = resultFeatures.length; i &amp;lt; il; i++) {&lt;BR /&gt; //Get the current feature from the featureSet.&lt;BR /&gt; //Feature is a graphic&lt;BR /&gt; var graphic = resultFeatures&lt;I&gt;;&lt;BR /&gt; graphic.setSymbol(symbol);&lt;/I&gt;&lt;/P&gt;&lt;P&gt;//Set the infoTemplate.&lt;BR /&gt; //graphic.setInfoTemplate(infoTemplate);&lt;/P&gt;&lt;P&gt;//Add graphic to the map graphics layer.&lt;BR /&gt; map.graphics.add(graphic);&lt;/P&gt;&lt;P&gt;if (graphic.geometry.type === 'point') {&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; map.centerAndZoom(graphic.geometry, 0.001);&lt;/P&gt;&lt;P&gt;}&lt;BR /&gt; }&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; function ltext() {&lt;BR /&gt; debugger;&lt;/P&gt;&lt;P&gt;line = new Polyline(map.spatialReference);&lt;BR /&gt; lineSymbol = new CartographicLineSymbol(&lt;BR /&gt; CartographicLineSymbol.STYLE_SOLID,&lt;BR /&gt; new Color([255, 0, 0]), 10,&lt;BR /&gt; CartographicLineSymbol.CAP_ROUND,&lt;BR /&gt; CartographicLineSymbol.JOIN_MITER, 5&lt;BR /&gt; );&lt;/P&gt;&lt;P&gt;pointSymbol = new SimpleMarkerSymbol().setColor(new Color([255, 0, 0, 0.5]));&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; dojo.connect(map, "onClick", addPt);&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;function addPt(e) {&lt;BR /&gt; debugger;&lt;/P&gt;&lt;P&gt;var pathCount = line.paths.length;&lt;BR /&gt; console.log(pathCount);&lt;BR /&gt; // console.log(e.mapPoint.y);&lt;BR /&gt; // console.log(e.mapPoint.x);&lt;BR /&gt; if (pathCount == 0) {&lt;BR /&gt; var point1 = new Point(218966.696, 1173294.233, map.spatialReference);&lt;BR /&gt; var point2 = new Point(e.mapPoint.x, e.mapPoint.y, map.spatialReference);&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; line.addPath([point1, point2]);&lt;/P&gt;&lt;P&gt;map.graphics.add(new Graphic(point1, pointSymbol));&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; map.graphics.add(new Graphic(point2, pointSymbol));&lt;BR /&gt; map.graphics.add(new Graphic(line, lineSymbol));&lt;/P&gt;&lt;P&gt;var template = landusePointLayer.templates[0];&lt;BR /&gt; var newAttributes = lang.mixin({}, template.prototype.attributes);&lt;BR /&gt; var newGraphic = new Graphic(point2, null, newAttributes);&lt;BR /&gt; landusePointLayer.applyEdits([newGraphic], null, null);&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; var template1 = landuseLineLayer.templates[0];&lt;BR /&gt; var newAttributes = lang.mixin({}, template1.prototype.attributes);&lt;BR /&gt; var newGraphicss = new Graphic(line, null, newAttributes);&lt;BR /&gt; landuseLineLayer.applyEdits([newGraphicss], null, null);&lt;BR /&gt; }&lt;BR /&gt; else {&lt;/P&gt;&lt;P&gt;var getX = line.paths[pathCount - 1][line.paths[pathCount - 1].length - 1][0],&lt;BR /&gt; getY = line.paths[pathCount - 1][line.paths[pathCount - 1].length - 1][1],&lt;BR /&gt; mapPointX = e.mapPoint.x, mapPointY = e.mapPoint.y;&lt;BR /&gt; var pointS = new Point(getX, getY, map.spatialReference);&lt;BR /&gt; var pointD = new Point(mapPointX, mapPointY, map.spatialReference);&lt;/P&gt;&lt;P&gt;line.addPath([pointS, pointD]);&lt;/P&gt;&lt;P&gt;///////////////////////////////////////////////////////////////////////////////////////////////&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;map.graphics.add(new Graphic(pointS, pointSymbol));&lt;BR /&gt; map.graphics.add(new Graphic(pointD, pointSymbol));&lt;BR /&gt; map.graphics.add(new Graphic(line, pointSymbol));&lt;/P&gt;&lt;P&gt;var template1 = landusePointLayer.templates[0];&lt;BR /&gt; var newAttributes = lang.mixin({}, template1.prototype.attributes);&lt;BR /&gt; var newGraphic = new Graphic(pointD, null, newAttributes);&lt;BR /&gt; landusePointLayer.applyEdits([newGraphic], null, null);&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; var template1 = landuseLineLayer.templates[0];&lt;BR /&gt; var newAttributessss = lang.mixin({}, template1.prototype.attributes);&lt;BR /&gt; var newGraphicss = new Graphic(line, null, newAttributessss);&lt;BR /&gt; landuseLineLayer.applyEdits([newGraphicss], null, null);&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; }&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &amp;lt;/script&amp;gt;&lt;BR /&gt;&amp;lt;/head&amp;gt;&lt;BR /&gt;&amp;lt;body class="claro"&amp;gt;&lt;BR /&gt; &amp;lt;div style="height: 30px; border: solid 1px; border-color: #e4e4e4; width: 100%;&lt;BR /&gt; background: #f0ebff"&amp;gt;&lt;BR /&gt; Header&lt;BR /&gt; &amp;lt;/div&amp;gt;&lt;BR /&gt; &amp;lt;div style="height: 25px; border: solid 1px; border-color: #e4e4e4; width: 100%;&lt;BR /&gt; background: #d2d2d2; text-align: center"&amp;gt;&lt;BR /&gt; ToolBar&lt;BR /&gt; &amp;lt;/div&amp;gt;&lt;BR /&gt; &amp;lt;div data-dojo-type="dijit/layout/BorderContainer" data-dojo-props="gutters:true, design:'headline'"&lt;BR /&gt; style="width: 100%; height: 100%;"&amp;gt;&lt;BR /&gt; &lt;BR /&gt; &amp;lt;div id="map" data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region:'center'"&amp;gt;&lt;BR /&gt; &amp;lt;/div&amp;gt;&lt;BR /&gt; &amp;lt;div id="rightPane" data-dojo-type="dijit.layout.ContentPane" data-dojo-props="region:'right'"&amp;gt;&lt;BR /&gt; &amp;lt;span class="lbl"&amp;gt;Enter Value :&amp;lt;/span&amp;gt;&lt;BR /&gt; &amp;lt;input type="text" id="stateName" &amp;gt;&lt;BR /&gt; &amp;lt;input id="execute" type="button" value="Get Details"&amp;gt;&lt;BR /&gt; &lt;BR /&gt; &amp;lt;input id="ltext" type="button" value="Start LT Ext" /&amp;gt;&lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; &amp;lt;/div&amp;gt;&lt;BR /&gt; &amp;lt;/div&amp;gt;&lt;BR /&gt;&amp;lt;/body&amp;gt;&lt;BR /&gt;&amp;lt;/html&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 06 Dec 2016 10:20:26 GMT</pubDate>
    <dc:creator>bharathreddy</dc:creator>
    <dc:date>2016-12-06T10:20:26Z</dc:date>
    <item>
      <title>Polyline editing</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/polyline-editing/m-p/663117#M61884</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;while applying edits to the polyline feature im getting the following (error:unable to complete operation index:15)&lt;/P&gt;&lt;P&gt;even after attributes and geometry are filling&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here is the code im applying edits for point and line feature at the same time&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var newGraphic = new esri.Graphic(ltp, null, attributes);&lt;BR /&gt; landusePointLayer.applyEdits([newGraphic]);&lt;/P&gt;&lt;P&gt;var newGraphicss= new esri.Graphic(kkk,null,attributes1);&lt;BR /&gt; landuseLineLayer.applyEdits([newGraphicss])&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Nov 2016 06:50:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/polyline-editing/m-p/663117#M61884</guid>
      <dc:creator>bharathreddy</dc:creator>
      <dc:date>2016-11-29T06:50:31Z</dc:date>
    </item>
    <item>
      <title>Re: Polyline editing</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/polyline-editing/m-p/663118#M61885</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;sounds like there is something wrong with your geometry for the line then.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Nov 2016 13:21:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/polyline-editing/m-p/663118#M61885</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2016-11-29T13:21:54Z</dc:date>
    </item>
    <item>
      <title>Re: Polyline editing</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/polyline-editing/m-p/663119#M61886</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is there anything like apply edits works for only while drawing for me apply edits working when i draw a polyline but onclick i'm unable to apply edits&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Nov 2016 15:14:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/polyline-editing/m-p/663119#M61886</guid>
      <dc:creator>bharathreddy</dc:creator>
      <dc:date>2016-11-29T15:14:52Z</dc:date>
    </item>
    <item>
      <title>Re: Polyline editing</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/polyline-editing/m-p/663120#M61887</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It is likely that you are just not forming a valid polyline in your code&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Nov 2016 15:25:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/polyline-editing/m-p/663120#M61887</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2016-11-29T15:25:31Z</dc:date>
    </item>
    <item>
      <title>Re: Polyline editing</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/polyline-editing/m-p/663121#M61888</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Robert,&lt;/P&gt;&lt;P&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; I am unable to do applyedits for the second time when i click on map &amp;nbsp;i am using &amp;nbsp;javascript version 3.18&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2Fwww.w3.org%2FTR%2Fxhtml1%2FDTD%2Fxhtml1-transitional.dtd" rel="nofollow" target="_blank"&gt;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&lt;/A&gt;&lt;SPAN&gt;"&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;html xmlns="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml" rel="nofollow" target="_blank"&gt;http://www.w3.org/1999/xhtml&lt;/A&gt;&lt;SPAN&gt;"&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&amp;lt;head&amp;gt;&lt;BR /&gt; &amp;lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8"&amp;gt;&lt;BR /&gt;&lt;SPAN&gt; &amp;lt;link rel="stylesheet" href="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fjs.arcgis.com%2F3.18%2Fdijit%2Fthemes%2Fclaro%2Fclaro.css" rel="nofollow" target="_blank"&gt;https://js.arcgis.com/3.18/dijit/themes/claro/claro.css&lt;/A&gt;&lt;SPAN&gt;"&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &amp;lt;link rel="stylesheet" href="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fjs.arcgis.com%2F3.18%2Fesri%2Fcss%2Fesri.css" rel="nofollow" target="_blank"&gt;https://js.arcgis.com/3.18/esri/css/esri.css&lt;/A&gt;&lt;SPAN&gt;"&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt; &amp;lt;meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no"&amp;gt;&lt;BR /&gt; &amp;lt;title&amp;gt;Landuse&amp;lt;/title&amp;gt;&lt;BR /&gt;&lt;SPAN&gt; &amp;lt;link rel="stylesheet" href="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fjs.arcgis.com%2F3.18%2Fdijit%2Fthemes%2Fclaro%2Fclaro.css" rel="nofollow" target="_blank"&gt;https://js.arcgis.com/3.18/dijit/themes/claro/claro.css&lt;/A&gt;&lt;SPAN&gt;"&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &amp;lt;link rel="stylesheet" href="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fjs.arcgis.com%2F3.18%2Fesri%2Fcss%2Fesri.css" rel="nofollow" target="_blank"&gt;https://js.arcgis.com/3.18/esri/css/esri.css&lt;/A&gt;&lt;SPAN&gt;"&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt; &amp;lt;style&amp;gt;&lt;BR /&gt; html, body&lt;BR /&gt; {&lt;BR /&gt; height: 100%;&lt;BR /&gt; width: 100%;&lt;BR /&gt; margin: 0;&lt;BR /&gt; padding: 0;&lt;BR /&gt; overflow: hidden;&lt;BR /&gt; }&lt;BR /&gt; &lt;BR /&gt; .btn&lt;BR /&gt; {&lt;BR /&gt; background: #3f3f3f;&lt;BR /&gt; color: #fff;&lt;BR /&gt; font-family: Tahoma;&lt;BR /&gt; font-size: 11px;&lt;BR /&gt; height: 18px;&lt;BR /&gt; }&lt;BR /&gt; .lbl&lt;BR /&gt; {&lt;BR /&gt; color: #000;&lt;BR /&gt; font-family: Tahoma;&lt;BR /&gt; font-size: 11px;&lt;BR /&gt; font-weight: 200;&lt;BR /&gt; }&lt;BR /&gt; #header&lt;BR /&gt; {&lt;BR /&gt; border: solid 2px #462d44;&lt;BR /&gt; background: #fff;&lt;BR /&gt; color: #444;&lt;BR /&gt; -moz-border-radius: 4px;&lt;BR /&gt; border-radius: 4px;&lt;BR /&gt; font-family: sans-serif;&lt;BR /&gt; font-size: 1.1em padding-left:20px;&lt;BR /&gt; }&lt;BR /&gt; #map&lt;BR /&gt; {&lt;BR /&gt; padding: 1px;&lt;BR /&gt; border: solid 2px #444;&lt;BR /&gt; -moz-border-radius: 4px;&lt;BR /&gt; border-radius: 4px;&lt;BR /&gt; }&lt;BR /&gt; #rightPane&lt;BR /&gt; {&lt;BR /&gt; border: none;&lt;BR /&gt; padding: 0;&lt;BR /&gt; width: 228px;&lt;BR /&gt; }&lt;BR /&gt; .templatePicker&lt;BR /&gt; {&lt;BR /&gt; border: solid 2px #444;&lt;BR /&gt; }&lt;BR /&gt; &amp;lt;/style&amp;gt;&lt;BR /&gt;&lt;SPAN&gt; &amp;lt;script src="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fjs.arcgis.com%2F3.18%2F" rel="nofollow" target="_blank"&gt;https://js.arcgis.com/3.18/&lt;/A&gt;&lt;SPAN&gt;"&amp;gt;&amp;lt;/script&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt; &amp;lt;script type="text/javascript"&amp;gt;&lt;BR /&gt; var map;&lt;BR /&gt; require([&lt;BR /&gt; "dojo/dom", "dojo/on",&lt;BR /&gt; "esri/map",&lt;BR /&gt; "esri/layers/ArcGISDynamicMapServiceLayer",&lt;BR /&gt; "esri/toolbars/draw",&lt;BR /&gt; "esri/toolbars/edit",&lt;BR /&gt; "esri/graphic",&lt;BR /&gt; "esri/config",&lt;BR /&gt; "esri/tasks/QueryTask",&lt;BR /&gt; "esri/tasks/query",&lt;BR /&gt; "esri/Color",&lt;BR /&gt; "esri/geometry/Polyline",&lt;BR /&gt; "esri/geometry/Point",&lt;/P&gt;&lt;P&gt;"esri/layers/FeatureLayer",&lt;/P&gt;&lt;P&gt;"esri/symbols/SimpleMarkerSymbol",&lt;/P&gt;&lt;P&gt;"esri/symbols/SimpleLineSymbol",&lt;BR /&gt; "esri/symbols/SimpleFillSymbol",&lt;BR /&gt; "esri/symbols/CartographicLineSymbol",&lt;/P&gt;&lt;P&gt;"esri/dijit/editing/TemplatePicker",&lt;/P&gt;&lt;P&gt;"dojo/_base/array",&lt;BR /&gt; "dojo/_base/event",&lt;BR /&gt; "dojo/_base/lang",&lt;BR /&gt; "dojo/parser",&lt;BR /&gt; "dijit/registry",&lt;BR /&gt; "dojo/_base/Color",&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; "dijit/layout/BorderContainer", "dijit/layout/ContentPane",&lt;BR /&gt; "dijit/form/Button", "dojo/domReady!"&lt;BR /&gt; ], function (&lt;BR /&gt; dom, on, Map, ArcGISDynamicMapServiceLayer, Draw, Edit, Graphic, esriConfig, QueryTask, Query, Color, Polyline, Point,&lt;BR /&gt; FeatureLayer,&lt;BR /&gt; SimpleMarkerSymbol, SimpleLineSymbol, SimpleFillSymbol, CartographicLineSymbol,&lt;BR /&gt; TemplatePicker,&lt;BR /&gt; arrayUtils, event, lang, parser, registry, Color&lt;BR /&gt; ) {&lt;BR /&gt; parser.parse();&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;// refer to "Using the Proxy Page" for more information: &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fdevelopers.arcgis.com%2Fjavascript%2F3%2Fjshelp%2Fags_proxy.html" rel="nofollow" target="_blank"&gt;https://developers.arcgis.com/javascript/3/jshelp/ags_proxy.html&lt;/A&gt;&lt;BR /&gt; esriConfig.defaults.io.proxyUrl = "/proxy/";&lt;/P&gt;&lt;P&gt;// This service is for development and testing purposes only. We recommend that you create your own geometry service for use within your applications.&lt;BR /&gt;&lt;SPAN&gt; esriConfig.defaults.geometryService = new esri.tasks.GeometryService("&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Futility.arcgisonline.com%2FArcGIS%2Frest%2Fservices%2FGeometry%2FGeometryServer" rel="nofollow" target="_blank"&gt;https://utility.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer&lt;/A&gt;&lt;SPAN&gt;");&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;map = new Map("map", {&lt;/P&gt;&lt;P&gt;center: [-83.244, 42.581],&lt;BR /&gt; zoom: 15&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; var executeQueryTask;&lt;BR /&gt; var line;&lt;BR /&gt; var lineSymbol;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;SPAN&gt; var dynamicMapServiceLayer = new ArcGISDynamicMapServiceLayer("&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2Flocalhost%3A6080%2Farcgis%2Frest%2Fservices%2Fedit%2FMapServer" rel="nofollow" target="_blank"&gt;http://localhost:6080/arcgis/rest/services/edit/MapServer&lt;/A&gt;&lt;SPAN&gt;");&lt;/SPAN&gt;&lt;BR /&gt; map.addLayer(dynamicMapServiceLayer);&lt;/P&gt;&lt;P&gt;//initialize query task&lt;BR /&gt;&lt;SPAN&gt; var queryTask = new QueryTask("&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2Flocalhost%3A6080%2FArcGIS%2Frest%2Fservices%2Fedit%2FMapServer%2F20" rel="nofollow" target="_blank"&gt;http://localhost:6080/ArcGIS/rest/services/edit/MapServer/20&lt;/A&gt;&lt;SPAN&gt;");&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;//initialize query&lt;BR /&gt; var query = new Query();&lt;BR /&gt; query.returnGeometry = true;&lt;BR /&gt; query.outFields = ["LTP_ID", "OBJECTID"];&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; symbol = new SimpleMarkerSymbol();&lt;BR /&gt; symbol.setStyle(SimpleMarkerSymbol.STYLE_SQUARE);&lt;BR /&gt; symbol.setSize(10);&lt;BR /&gt; symbol.setColor(new Color([255, 255, 0, 0.5]));&lt;/P&gt;&lt;P&gt;on(dom.byId("execute"), "click", execute);&lt;/P&gt;&lt;P&gt;on(dom.byId("ltext"), "click", ltext);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;var landusePointLayer = new FeatureLayer("&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2Flocalhost%3A6080%2Farcgis%2Frest%2Fservices%2Fedit%2FFeatureServer%2F20" rel="nofollow" target="_blank"&gt;http://localhost:6080/arcgis/rest/services/edit/FeatureServer/20&lt;/A&gt;&lt;SPAN&gt;", {&lt;/SPAN&gt;&lt;BR /&gt; mode: FeatureLayer.MODE_SNAPSHOT,&lt;BR /&gt; outFields: ["*"]&lt;BR /&gt; });&lt;BR /&gt;&lt;SPAN&gt; var landuseLineLayer = new FeatureLayer("&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2Flocalhost%3A6080%2Farcgis%2Frest%2Fservices%2Fedit%2FFeatureServer%2F34" rel="nofollow" target="_blank"&gt;http://localhost:6080/arcgis/rest/services/edit/FeatureServer/34&lt;/A&gt;&lt;SPAN&gt;", {&lt;/SPAN&gt;&lt;BR /&gt; mode: FeatureLayer.MODE_SNAPSHOT,&lt;BR /&gt; outFields: ["*"]&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; // map.on("layers-add-result",setupEditor);&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; map.addLayers([landusePointLayer, landuseLineLayer]);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; function execute() {&lt;BR /&gt; debugger;&lt;BR /&gt; query.text = dom.byId("stateName").value;&lt;BR /&gt; queryTask.execute(query, showResults);&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; function showResults(featureSet) {&lt;BR /&gt; debugger;&lt;/P&gt;&lt;P&gt;map.graphics.clear();&lt;/P&gt;&lt;P&gt;//Performance enhancer - assign featureSet array to a single variable.&lt;BR /&gt; var resultFeatures = featureSet.features;&lt;/P&gt;&lt;P&gt;//Loop through each feature returned&lt;BR /&gt; for (var i = 0, il = resultFeatures.length; i &amp;lt; il; i++) {&lt;BR /&gt; //Get the current feature from the featureSet.&lt;BR /&gt; //Feature is a graphic&lt;BR /&gt; var graphic = resultFeatures&lt;I&gt;;&lt;BR /&gt; graphic.setSymbol(symbol);&lt;/I&gt;&lt;/P&gt;&lt;P&gt;//Set the infoTemplate.&lt;BR /&gt; //graphic.setInfoTemplate(infoTemplate);&lt;/P&gt;&lt;P&gt;//Add graphic to the map graphics layer.&lt;BR /&gt; map.graphics.add(graphic);&lt;/P&gt;&lt;P&gt;if (graphic.geometry.type === 'point') {&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; map.centerAndZoom(graphic.geometry, 0.001);&lt;/P&gt;&lt;P&gt;}&lt;BR /&gt; }&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; function ltext() {&lt;BR /&gt; debugger;&lt;/P&gt;&lt;P&gt;line = new Polyline(map.spatialReference);&lt;BR /&gt; lineSymbol = new CartographicLineSymbol(&lt;BR /&gt; CartographicLineSymbol.STYLE_SOLID,&lt;BR /&gt; new Color([255, 0, 0]), 10,&lt;BR /&gt; CartographicLineSymbol.CAP_ROUND,&lt;BR /&gt; CartographicLineSymbol.JOIN_MITER, 5&lt;BR /&gt; );&lt;/P&gt;&lt;P&gt;pointSymbol = new SimpleMarkerSymbol().setColor(new Color([255, 0, 0, 0.5]));&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; dojo.connect(map, "onClick", addPt);&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;function addPt(e) {&lt;BR /&gt; debugger;&lt;/P&gt;&lt;P&gt;var pathCount = line.paths.length;&lt;BR /&gt; console.log(pathCount);&lt;BR /&gt; // console.log(e.mapPoint.y);&lt;BR /&gt; // console.log(e.mapPoint.x);&lt;BR /&gt; if (pathCount == 0) {&lt;BR /&gt; var point1 = new Point(218966.696, 1173294.233, map.spatialReference);&lt;BR /&gt; var point2 = new Point(e.mapPoint.x, e.mapPoint.y, map.spatialReference);&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; line.addPath([point1, point2]);&lt;/P&gt;&lt;P&gt;map.graphics.add(new Graphic(point1, pointSymbol));&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; map.graphics.add(new Graphic(point2, pointSymbol));&lt;BR /&gt; map.graphics.add(new Graphic(line, lineSymbol));&lt;/P&gt;&lt;P&gt;var template = landusePointLayer.templates[0];&lt;BR /&gt; var newAttributes = lang.mixin({}, template.prototype.attributes);&lt;BR /&gt; var newGraphic = new Graphic(point2, null, newAttributes);&lt;BR /&gt; landusePointLayer.applyEdits([newGraphic], null, null);&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; var template1 = landuseLineLayer.templates[0];&lt;BR /&gt; var newAttributes = lang.mixin({}, template1.prototype.attributes);&lt;BR /&gt; var newGraphicss = new Graphic(line, null, newAttributes);&lt;BR /&gt; landuseLineLayer.applyEdits([newGraphicss], null, null);&lt;BR /&gt; }&lt;BR /&gt; else {&lt;/P&gt;&lt;P&gt;var getX = line.paths[pathCount - 1][line.paths[pathCount - 1].length - 1][0],&lt;BR /&gt; getY = line.paths[pathCount - 1][line.paths[pathCount - 1].length - 1][1],&lt;BR /&gt; mapPointX = e.mapPoint.x, mapPointY = e.mapPoint.y;&lt;BR /&gt; var pointS = new Point(getX, getY, map.spatialReference);&lt;BR /&gt; var pointD = new Point(mapPointX, mapPointY, map.spatialReference);&lt;/P&gt;&lt;P&gt;line.addPath([pointS, pointD]);&lt;/P&gt;&lt;P&gt;///////////////////////////////////////////////////////////////////////////////////////////////&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;map.graphics.add(new Graphic(pointS, pointSymbol));&lt;BR /&gt; map.graphics.add(new Graphic(pointD, pointSymbol));&lt;BR /&gt; map.graphics.add(new Graphic(line, pointSymbol));&lt;/P&gt;&lt;P&gt;var template1 = landusePointLayer.templates[0];&lt;BR /&gt; var newAttributes = lang.mixin({}, template1.prototype.attributes);&lt;BR /&gt; var newGraphic = new Graphic(pointD, null, newAttributes);&lt;BR /&gt; landusePointLayer.applyEdits([newGraphic], null, null);&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; var template1 = landuseLineLayer.templates[0];&lt;BR /&gt; var newAttributessss = lang.mixin({}, template1.prototype.attributes);&lt;BR /&gt; var newGraphicss = new Graphic(line, null, newAttributessss);&lt;BR /&gt; landuseLineLayer.applyEdits([newGraphicss], null, null);&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; }&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &amp;lt;/script&amp;gt;&lt;BR /&gt;&amp;lt;/head&amp;gt;&lt;BR /&gt;&amp;lt;body class="claro"&amp;gt;&lt;BR /&gt; &amp;lt;div style="height: 30px; border: solid 1px; border-color: #e4e4e4; width: 100%;&lt;BR /&gt; background: #f0ebff"&amp;gt;&lt;BR /&gt; Header&lt;BR /&gt; &amp;lt;/div&amp;gt;&lt;BR /&gt; &amp;lt;div style="height: 25px; border: solid 1px; border-color: #e4e4e4; width: 100%;&lt;BR /&gt; background: #d2d2d2; text-align: center"&amp;gt;&lt;BR /&gt; ToolBar&lt;BR /&gt; &amp;lt;/div&amp;gt;&lt;BR /&gt; &amp;lt;div data-dojo-type="dijit/layout/BorderContainer" data-dojo-props="gutters:true, design:'headline'"&lt;BR /&gt; style="width: 100%; height: 100%;"&amp;gt;&lt;BR /&gt; &lt;BR /&gt; &amp;lt;div id="map" data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region:'center'"&amp;gt;&lt;BR /&gt; &amp;lt;/div&amp;gt;&lt;BR /&gt; &amp;lt;div id="rightPane" data-dojo-type="dijit.layout.ContentPane" data-dojo-props="region:'right'"&amp;gt;&lt;BR /&gt; &amp;lt;span class="lbl"&amp;gt;Enter Value :&amp;lt;/span&amp;gt;&lt;BR /&gt; &amp;lt;input type="text" id="stateName" &amp;gt;&lt;BR /&gt; &amp;lt;input id="execute" type="button" value="Get Details"&amp;gt;&lt;BR /&gt; &lt;BR /&gt; &amp;lt;input id="ltext" type="button" value="Start LT Ext" /&amp;gt;&lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; &amp;lt;/div&amp;gt;&lt;BR /&gt; &amp;lt;/div&amp;gt;&lt;BR /&gt;&amp;lt;/body&amp;gt;&lt;BR /&gt;&amp;lt;/html&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Dec 2016 10:20:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/polyline-editing/m-p/663121#M61888</guid>
      <dc:creator>bharathreddy</dc:creator>
      <dc:date>2016-12-06T10:20:26Z</dc:date>
    </item>
  </channel>
</rss>

