<?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: Create an empty layer and where should i save it? Javascript API in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/create-an-empty-layer-and-where-should-i-save-it/m-p/1045946#M39417</link>
    <description>&lt;P&gt;Hi Marcus,&lt;/P&gt;&lt;P&gt;If you goal is to allow someone to draw new features (e.g. lines, polygons, or points) on the map, you would need to add either a &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GraphicsLayer.html" target="_blank" rel="noopener"&gt;GraphicsLayer&lt;/A&gt; or a &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html" target="_blank" rel="noopener"&gt;Feature Layer&lt;/A&gt; to your map. The following samples will likely help you get started:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/sample-code/layers-featurelayer-collection-edits/" target="_blank" rel="noopener"&gt;Add or remove graphics from a FeatureLayer&lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/sample-code/sketch-geometries/" target="_blank" rel="noopener"&gt;Sketch widget&lt;/A&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;However, if your goal is to save them, the easiest option is to create a Hosted Feature Layer in ArcGIS Online. You can then read and save your changes to this Hosted Feature Layer.&lt;/P&gt;&lt;P&gt;To do this, you will need an ArcGIS Online account. If you do not already have such an account, you can sign-up for a free developer account at &lt;A href="https://developers.arcgis.com/" target="_blank"&gt;https://developers.arcgis.com/&lt;/A&gt; which will provide you with a small amount of storage to get started.&lt;/P&gt;&lt;P&gt;Once on the developer site with an account, you can create a hosted feature layer by going to the &lt;EM&gt;Layers&lt;/EM&gt; section, then &lt;EM&gt;+ Create data&lt;/EM&gt; and choosing the &lt;EM&gt;New hosted layer (Feature layer)&lt;/EM&gt; option. The page will then walk you through creating a new hosted feature layer.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DavidBlanchard_0-1618240146076.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/10609i472034A83312764C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="DavidBlanchard_0-1618240146076.png" alt="DavidBlanchard_0-1618240146076.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Once you have a hosted feature layer, you can follow this tutorial to add it to your ArcGIS API for JavaScript map: &lt;A href="https://developers.arcgis.com/javascript/latest/add-a-feature-layer/" target="_blank" rel="noopener"&gt;Add a feature layer.&lt;/A&gt;&lt;/P&gt;&lt;P&gt;If you want to allow the end user to edit the features (e.g. add a new polygon), you will find instructions in the &lt;A href="https://developers.arcgis.com/javascript/latest/edit-feature-data/" target="_blank" rel="noopener"&gt;Edit feature data&lt;/A&gt; tutorial.&lt;/P&gt;&lt;P&gt;Best of luck and have fun!&lt;/P&gt;&lt;P&gt;David&lt;/P&gt;</description>
    <pubDate>Mon, 12 Apr 2021 15:12:22 GMT</pubDate>
    <dc:creator>DavidBlanchard</dc:creator>
    <dc:date>2021-04-12T15:12:22Z</dc:date>
    <item>
      <title>Create an empty layer and where should i save it? Javascript API</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/create-an-empty-layer-and-where-should-i-save-it/m-p/1045372#M39383</link>
      <description>&lt;P&gt;Hello! Me and my friend are currently working on project using JS with Arcgis API and have two questions.&lt;/P&gt;&lt;P&gt;1. How do you create a completely new empty layer that you can add geometries to in Arcgis js api?&lt;/P&gt;&lt;P&gt;2. Where should this new layer be saved? Is it a database or something like a catalog that i've read about?&lt;/P&gt;&lt;P&gt;Really enjoying the project so far and want to thank in advance for the help! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Apr 2021 08:36:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/create-an-empty-layer-and-where-should-i-save-it/m-p/1045372#M39383</guid>
      <dc:creator>MarcusBrostrm</dc:creator>
      <dc:date>2021-04-09T08:36:49Z</dc:date>
    </item>
    <item>
      <title>Re: Create an empty layer and where should i save it? Javascript API</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/create-an-empty-layer-and-where-should-i-save-it/m-p/1045946#M39417</link>
      <description>&lt;P&gt;Hi Marcus,&lt;/P&gt;&lt;P&gt;If you goal is to allow someone to draw new features (e.g. lines, polygons, or points) on the map, you would need to add either a &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GraphicsLayer.html" target="_blank" rel="noopener"&gt;GraphicsLayer&lt;/A&gt; or a &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html" target="_blank" rel="noopener"&gt;Feature Layer&lt;/A&gt; to your map. The following samples will likely help you get started:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/sample-code/layers-featurelayer-collection-edits/" target="_blank" rel="noopener"&gt;Add or remove graphics from a FeatureLayer&lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/sample-code/sketch-geometries/" target="_blank" rel="noopener"&gt;Sketch widget&lt;/A&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;However, if your goal is to save them, the easiest option is to create a Hosted Feature Layer in ArcGIS Online. You can then read and save your changes to this Hosted Feature Layer.&lt;/P&gt;&lt;P&gt;To do this, you will need an ArcGIS Online account. If you do not already have such an account, you can sign-up for a free developer account at &lt;A href="https://developers.arcgis.com/" target="_blank"&gt;https://developers.arcgis.com/&lt;/A&gt; which will provide you with a small amount of storage to get started.&lt;/P&gt;&lt;P&gt;Once on the developer site with an account, you can create a hosted feature layer by going to the &lt;EM&gt;Layers&lt;/EM&gt; section, then &lt;EM&gt;+ Create data&lt;/EM&gt; and choosing the &lt;EM&gt;New hosted layer (Feature layer)&lt;/EM&gt; option. The page will then walk you through creating a new hosted feature layer.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DavidBlanchard_0-1618240146076.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/10609i472034A83312764C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="DavidBlanchard_0-1618240146076.png" alt="DavidBlanchard_0-1618240146076.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Once you have a hosted feature layer, you can follow this tutorial to add it to your ArcGIS API for JavaScript map: &lt;A href="https://developers.arcgis.com/javascript/latest/add-a-feature-layer/" target="_blank" rel="noopener"&gt;Add a feature layer.&lt;/A&gt;&lt;/P&gt;&lt;P&gt;If you want to allow the end user to edit the features (e.g. add a new polygon), you will find instructions in the &lt;A href="https://developers.arcgis.com/javascript/latest/edit-feature-data/" target="_blank" rel="noopener"&gt;Edit feature data&lt;/A&gt; tutorial.&lt;/P&gt;&lt;P&gt;Best of luck and have fun!&lt;/P&gt;&lt;P&gt;David&lt;/P&gt;</description>
      <pubDate>Mon, 12 Apr 2021 15:12:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/create-an-empty-layer-and-where-should-i-save-it/m-p/1045946#M39417</guid>
      <dc:creator>DavidBlanchard</dc:creator>
      <dc:date>2021-04-12T15:12:22Z</dc:date>
    </item>
  </channel>
</rss>

