<?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 copy features from one layer to another? in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/copy-features-from-one-layer-to-another/m-p/752962#M69600</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have polygons in one layer, I'd like a user to be able to select them, and copy them into a new layer, and hopefully dissolve, making aggregate polygons.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm using the draw toolbar to create the selection polygon...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tb = new esri.toolbars.Draw(map);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tb.activate(esri.toolbars.Draw.POLYGON);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dojo.connect(tb, "onDrawEnd", addGraphic);

&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I can query the polygon layer...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; function addGraphic(geometry){
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tb.deactivate();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var polySymbol = new esri.symbol.SimpleFillSymbol(esri.symbol.SimpleFillSymbol.STYLE_SOLID, new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID, new dojo.Color([0,0,255]), 2), new dojo.Color([255,255,0,0.25]));
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var polyGraphic = new esri.Graphic(geometry, polySymbol);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map.graphics.add(polyGraphic);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var queryPolyTask = new esri.tasks.QueryTask(serverVar + "/ArcGIS/rest/services/IndivTerritoriesOnly/CurrentAll/MapServer/1");
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var polyQuery = new esri.tasks.Query();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; polyQuery.spatialRelationship = esri.tasks.Query.SPATIAL_REL_INTERSECTS;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; polyQuery.outSpatialReference = {"wkid": 102100};
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; polyQuery.returnGeometry = true;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; polyQuery.geometry = geometry;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; polyQuery.outFields = ["ziptext"];
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; queryPolyTask.execute(polyQuery); 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dojo.connect(queryPolyTask, "onComplete", function(results){
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; doZipManager(results);
&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; };
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;and I've created a graphic layer to display it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; function doZipManager(results){
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var items = dojo.map(results,function(result){
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var graphic = result.feature;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; zoomSelExtent = graphic.geometry.getExtent(); 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; graphic.setSymbol(symbol);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map.graphics.add(graphic);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return result.feature.attributes;
&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; var selectedZipGraphic = new esri.layers.GraphicsLayer();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var selectedZipSymbol = new esri.symbol.SimpleFillSymbol(esri.symbol.SimpleFillSymbol.STYLE_SOLID, new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID, new dojo.Color([0,122,122]), 2), new dojo.Color([180,200,0,0.25]));
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var zipResultFeatures = results.features;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; selectedZipGraphic.setRenderer(selectedZipSymbol);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dojo.forEach(zipResultFeatures, function (feature) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var graphic = feature;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; graphic.setSymbol(selectedZipSymbol);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; selectedZipGraphic.add(graphic);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; items.push(feature.attributes);
&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; map.addLayer(selectedZipGraphic);

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; };
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But is it possible to save this selection for long term use?&amp;nbsp; I've seen suggestions of saving a cookie or using local storage, but thats just not working for me.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I'd like to save these selections in the database, if possible.&amp;nbsp; This is to be a distributed app, and the central office would like access to what users are creating.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I dont care if its a feature class or a table.&amp;nbsp; Creating a webservice has been suggested, but I can't even wrap my head around it.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm using Javascript and HTML, SQL Server 2008.&amp;nbsp; I dont know anything about .net, and I don't have time to start learning it now.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you to any and all insight.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Really in a bind here....&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;E&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 27 Aug 2012 22:00:45 GMT</pubDate>
    <dc:creator>evanpicard</dc:creator>
    <dc:date>2012-08-27T22:00:45Z</dc:date>
    <item>
      <title>copy features from one layer to another?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/copy-features-from-one-layer-to-another/m-p/752962#M69600</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have polygons in one layer, I'd like a user to be able to select them, and copy them into a new layer, and hopefully dissolve, making aggregate polygons.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm using the draw toolbar to create the selection polygon...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tb = new esri.toolbars.Draw(map);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tb.activate(esri.toolbars.Draw.POLYGON);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dojo.connect(tb, "onDrawEnd", addGraphic);

&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I can query the polygon layer...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; function addGraphic(geometry){
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tb.deactivate();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var polySymbol = new esri.symbol.SimpleFillSymbol(esri.symbol.SimpleFillSymbol.STYLE_SOLID, new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID, new dojo.Color([0,0,255]), 2), new dojo.Color([255,255,0,0.25]));
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var polyGraphic = new esri.Graphic(geometry, polySymbol);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map.graphics.add(polyGraphic);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var queryPolyTask = new esri.tasks.QueryTask(serverVar + "/ArcGIS/rest/services/IndivTerritoriesOnly/CurrentAll/MapServer/1");
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var polyQuery = new esri.tasks.Query();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; polyQuery.spatialRelationship = esri.tasks.Query.SPATIAL_REL_INTERSECTS;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; polyQuery.outSpatialReference = {"wkid": 102100};
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; polyQuery.returnGeometry = true;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; polyQuery.geometry = geometry;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; polyQuery.outFields = ["ziptext"];
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; queryPolyTask.execute(polyQuery); 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dojo.connect(queryPolyTask, "onComplete", function(results){
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; doZipManager(results);
&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; };
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;and I've created a graphic layer to display it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; function doZipManager(results){
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var items = dojo.map(results,function(result){
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var graphic = result.feature;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; zoomSelExtent = graphic.geometry.getExtent(); 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; graphic.setSymbol(symbol);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map.graphics.add(graphic);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return result.feature.attributes;
&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; var selectedZipGraphic = new esri.layers.GraphicsLayer();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var selectedZipSymbol = new esri.symbol.SimpleFillSymbol(esri.symbol.SimpleFillSymbol.STYLE_SOLID, new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID, new dojo.Color([0,122,122]), 2), new dojo.Color([180,200,0,0.25]));
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var zipResultFeatures = results.features;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; selectedZipGraphic.setRenderer(selectedZipSymbol);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dojo.forEach(zipResultFeatures, function (feature) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var graphic = feature;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; graphic.setSymbol(selectedZipSymbol);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; selectedZipGraphic.add(graphic);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; items.push(feature.attributes);
&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; map.addLayer(selectedZipGraphic);

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; };
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But is it possible to save this selection for long term use?&amp;nbsp; I've seen suggestions of saving a cookie or using local storage, but thats just not working for me.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I'd like to save these selections in the database, if possible.&amp;nbsp; This is to be a distributed app, and the central office would like access to what users are creating.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I dont care if its a feature class or a table.&amp;nbsp; Creating a webservice has been suggested, but I can't even wrap my head around it.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm using Javascript and HTML, SQL Server 2008.&amp;nbsp; I dont know anything about .net, and I don't have time to start learning it now.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you to any and all insight.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Really in a bind here....&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;E&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Aug 2012 22:00:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/copy-features-from-one-layer-to-another/m-p/752962#M69600</guid>
      <dc:creator>evanpicard</dc:creator>
      <dc:date>2012-08-27T22:00:45Z</dc:date>
    </item>
    <item>
      <title>Re: copy features from one layer to another?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/copy-features-from-one-layer-to-another/m-p/752963#M69601</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Presumably you could do what you want with with AGS, - 'web editing' implemented through a Feature Service, assuming you have a license &amp;gt; Basic?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is that what you're after?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Aug 2012 07:24:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/copy-features-from-one-layer-to-another/m-p/752963#M69601</guid>
      <dc:creator>__Rich_</dc:creator>
      <dc:date>2012-08-28T07:24:06Z</dc:date>
    </item>
    <item>
      <title>Re: copy features from one layer to another?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/copy-features-from-one-layer-to-another/m-p/752964#M69602</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Presumably you could do what you want with with AGS, - 'web editing' implemented through a Feature Service, assuming you have a license &amp;gt; Basic?&lt;BR /&gt;&lt;BR /&gt;Is that what you're after?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Yes, precisely.&amp;nbsp; I have AGS.&amp;nbsp; Just trying to figure out the nitty gritty.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Aug 2012 11:00:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/copy-features-from-one-layer-to-another/m-p/752964#M69602</guid>
      <dc:creator>evanpicard</dc:creator>
      <dc:date>2012-08-28T11:00:27Z</dc:date>
    </item>
    <item>
      <title>Re: copy features from one layer to another?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/copy-features-from-one-layer-to-another/m-p/752965#M69603</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I know you have already written code to enable drawing and capturing of features etc. but could the Editor widget be of any use?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Have a look at this sample:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/help/jssamples/ed_default_editingwidget.html"&gt;http://help.arcgis.com/en/webapi/javascript/arcgis/help/jssamples/ed_default_editingwidget.html&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Aug 2012 11:26:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/copy-features-from-one-layer-to-another/m-p/752965#M69603</guid>
      <dc:creator>__Rich_</dc:creator>
      <dc:date>2012-08-28T11:26:28Z</dc:date>
    </item>
    <item>
      <title>Re: copy features from one layer to another?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/copy-features-from-one-layer-to-another/m-p/752966#M69604</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I know you have already written code to enable drawing and capturing of features etc. but could the Editor widget be of any use?&lt;BR /&gt;&lt;BR /&gt;Have a look at this sample:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/help/jssamples/ed_default_editingwidget.html" rel="nofollow noopener noreferrer" target="_blank"&gt;http://help.arcgis.com/en/webapi/javascript/arcgis/help/jssamples/ed_default_editingwidget.html&lt;/A&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Yes, thats what I'm using, but I can't figure out how to get my selection of zipcodes, copied into new empty Featurelayer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;No editor tools ever "appear" in the tool bar.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Hint?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;2 other issues - &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1. from the sample - &lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
&amp;nbsp; &amp;lt;body class="claro"&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;div id="mainWindow" data-dojo-type="dijit.layout.BorderContainer" data-dojo-props="design:'headline',gutters:false" style="width:100%; height:100%;"&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;div id="map" data-dojo-type="dijit.layout.ContentPane" data-dojo-props="region:'right'"&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/div&amp;gt; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;div data-dojo-type="dijit.layout.ContentPane" id="templatePickerPane" data-dojo-props="region:'left'"&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;div id="panelHeader"&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Default Editor
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/div&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;div style="padding:10px;" id="editorDiv"&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/div&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/div&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/div&amp;gt;
&amp;nbsp; &amp;lt;/body&amp;gt;
&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;I get the editor below my map window.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I can't get the editor window on the left, and the map on the right, no idea why.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;2.&amp;nbsp; After I draw my polygon, and it queries the layer, the map zooms again, but I never coded that.&amp;nbsp; Any ideas why?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks all.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;E&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 07:57:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/copy-features-from-one-layer-to-another/m-p/752966#M69604</guid>
      <dc:creator>evanpicard</dc:creator>
      <dc:date>2021-12-12T07:57:54Z</dc:date>
    </item>
    <item>
      <title>Re: copy features from one layer to another?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/copy-features-from-one-layer-to-another/m-p/752967#M69605</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;So you have Layer "A", and you want to copy a selection of features to Layer "B", is that correct?&amp;nbsp; And, you have a graphics layer holding all of your selected features, right? (selectedZipGraphic).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What you could do is&amp;nbsp; store all of your graphics in an array (they might already be in one by default) and&amp;nbsp; then "ADD" them to Layer "B".&amp;nbsp; Check out FeatureLayer.applyedits(adds?, updates?, deletes?, Callback?, errback?);&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi_start.htm#jsapi/featurelayer.htm#applyEdits"&gt;http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi_start.htm#jsapi/featurelayer.htm#applyEdits&lt;BR /&gt;&lt;BR /&gt;&lt;/A&gt;&lt;SPAN&gt;You'll only need to call the "Adds" parameter and essentially Add each of the graphics..&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Aug 2012 17:51:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/copy-features-from-one-layer-to-another/m-p/752967#M69605</guid>
      <dc:creator>deleted-user-ATjHIWsdQYmT</dc:creator>
      <dc:date>2012-08-28T17:51:05Z</dc:date>
    </item>
    <item>
      <title>Re: copy features from one layer to another?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/copy-features-from-one-layer-to-another/m-p/752968#M69606</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;&lt;BR /&gt;I'd like to save these selections in the database, if possible.&lt;BR /&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;MySQl and PHP is an easy way to save graphics, maps, bookmarks, notes and more. I've tried SQL and .net, but it seemed like 10x the work with poorer results. The api is great because it allows you to create json from DOM objects, e.g. all the graphics on a specific graphics layer. For saving maps I create my own DOM object with all the map params, layer states, etc, and save it as plain text in MySQL via PHP. As a side note, my apps require the user to be logged in as to identify what belongs to who. An admin account can view everything.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;------------------------------------&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;app.map._layers.gl_measure.add(app.map._layers.gl_identify.graphics[0])&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;This is an easy way to copy a graphic to another gl. I did this on console's command line to copy the first graphic in my identify layer to my measure layer. You have to refresh the map to get it to display or it will show up after next zoom or pan.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Aug 2012 20:01:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/copy-features-from-one-layer-to-another/m-p/752968#M69606</guid>
      <dc:creator>BenFousek</dc:creator>
      <dc:date>2012-08-28T20:01:45Z</dc:date>
    </item>
    <item>
      <title>Re: copy features from one layer to another?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/copy-features-from-one-layer-to-another/m-p/752969#M69607</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Am I being too simplistic in thinking the most straightforward way for the OP to save features that have been added client-side is to follow the bog standard editing roadmap?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/help/jshelp/inside_editing.htm"&gt;http://help.arcgis.com/en/webapi/javascript/arcgis/help/jshelp/inside_editing.htm&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;He has ArcGIS Server available, all he needs to do is setup a feature service, backed by an ArcSDE-managed geodatabase (compatible with several RDBMSs e.g. SQL Server) and use the Editor widget.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Seems to me that this way he gets everything he wants out-of-the-box with no server-side programming required...&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Aug 2012 07:18:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/copy-features-from-one-layer-to-another/m-p/752969#M69607</guid>
      <dc:creator>__Rich_</dc:creator>
      <dc:date>2012-08-29T07:18:51Z</dc:date>
    </item>
    <item>
      <title>Re: copy features from one layer to another?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/copy-features-from-one-layer-to-another/m-p/752970#M69608</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;It's easy for me to say "mySQL and PHP" and you to say "SDE and feature service", but it's going to require some work server and client side either way. I know he wants to save graphics, but not his overall goal, e.g. is it spatial information or just user markup?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've been saving graphics, maps, bookmarks, etc this way before the api had feature layers and native editing support. I will continue a use and advocate this approach as it fits my needs and is in my view the most expedient.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This isn't the first time I've seen questions about this sort of thing on the forums and in reality it's hard to give an quality answer to such a question. So I'm going to create a example for the code gallery where user graphics can be saved and retrieved using mySQL and PHP with all the code for download. Expect it by the end of October. I'll post in forum when finished.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;@geos_rfleet If you're up for a little friendly competition do the same with feature layers and editor. &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Aug 2012 18:18:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/copy-features-from-one-layer-to-another/m-p/752970#M69608</guid>
      <dc:creator>BenFousek</dc:creator>
      <dc:date>2012-08-29T18:18:57Z</dc:date>
    </item>
    <item>
      <title>Re: copy features from one layer to another?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/copy-features-from-one-layer-to-another/m-p/752971#M69609</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Easy for me to say ASP.NET + SQL Server or various other combinations of programming platform + RDBMS &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&amp;nbsp; (I can't see how PHP + MySQL is any less or more work to be honest, anyway, I digress...)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Sounds like he doesn't want to get into any server-side programming, hence my suggestion for merely 'configuring' the server side stuff using ArcGIS Desktop (ArcSDE is part of desktop) to author the database/services etc. for you via a nice friendly *cough* GUI.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Rolling your own is fine who are comfortable with all the technologies involved at each tier and definitely required if the software provide doesn't do what you want off the shelf and you can't buy in something to fill the gap.&amp;nbsp; Once the software 'catches up' with you then you can always re-evaluate whether to ditch the proprietary approach and migrate to the stock components.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Interoperability with other people's systems might be a consideration too e.g. the OP mentions a "central office" that needs to see what the users have created - what tools do the people at "central office" use?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;How much effort would it be for the OP to expose any standard interfaces either public (like the OGC specs) or proprietary like ArcGIS Server via a home-grown solution?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;All I'm trying to do is present the OP with options then he can make a more informed choice appropriate to his skill set etc.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Not much point in me providing an example of how to save edits back to a database through a feature service when there's already examples available, something about wheels and re-inventing them &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp; (though I am envious if you have spare time to spend creating your sample!)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;We can all (ok, maybe not all!) write custom software either simple or complex and make it stand on its head, it's choosing the right horse for the right course, of course &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Suggest we let the OP digest the information and come back if he needs anything further...&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Aug 2012 19:01:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/copy-features-from-one-layer-to-another/m-p/752971#M69609</guid>
      <dc:creator>__Rich_</dc:creator>
      <dc:date>2012-08-29T19:01:41Z</dc:date>
    </item>
  </channel>
</rss>

