<?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 Is there a way to save the point that has been dropped on a map? in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-there-a-way-to-save-the-point-that-has-been/m-p/73927#M6681</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am dropping point on a Esri map. I want to save those point so that when I re-open the map, I can see those dropped points or pins. Is there a way to do that? I am using JavaScript. Here is my code below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;BR /&gt;&amp;lt;html&amp;gt;&lt;BR /&gt; &amp;lt;head&amp;gt;&lt;BR /&gt; &amp;lt;meta charset="utf-8" /&amp;gt;&lt;BR /&gt; &amp;lt;meta&lt;BR /&gt; name="viewport"&lt;BR /&gt; content="initial-scale=1,maximum-scale=1,user-scalable=no"&lt;BR /&gt; /&amp;gt;&lt;BR /&gt; &amp;lt;title&amp;gt;DEA GIS APPLICATION&amp;lt;/title&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;link&lt;BR /&gt; rel="stylesheet"&lt;BR /&gt; href="https://js.arcgis.com/4.12/esri/themes/light/main.css"&lt;BR /&gt; /&amp;gt;&lt;BR /&gt; &amp;lt;script src="https://js.arcgis.com/4.12/"&amp;gt;&amp;lt;/script&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;style&amp;gt;&lt;BR /&gt; html,&lt;BR /&gt; body,&lt;BR /&gt; #viewDiv {&lt;BR /&gt; padding: 0;&lt;BR /&gt; margin: 0;&lt;BR /&gt; height: 100%;&lt;BR /&gt; width: 100%;&lt;BR /&gt; }&lt;BR /&gt; &amp;lt;/style&amp;gt;&lt;BR /&gt; &amp;lt;script&amp;gt;&lt;BR /&gt; require([&lt;BR /&gt; "esri/widgets/Sketch",&lt;BR /&gt; "esri/Map",&lt;BR /&gt; "esri/layers/GraphicsLayer",&lt;BR /&gt; "esri/views/MapView"&lt;BR /&gt; ], function(Sketch, Map, GraphicsLayer, MapView) {&lt;BR /&gt; const layer = new GraphicsLayer();&lt;/P&gt;&lt;P&gt;const map = new Map({&lt;BR /&gt; basemap: "streets",&lt;BR /&gt; layers: [layer]&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;const view = new MapView({&lt;BR /&gt; container: "viewDiv",&lt;BR /&gt; map: map,&lt;BR /&gt; zoom: 5,&lt;BR /&gt; center: [90, 45]&lt;BR /&gt; });&lt;BR /&gt; &lt;BR /&gt; var symbol = {&lt;BR /&gt; type: "simple-marker", // autocasts as new SimpleMarkerSymbol()&lt;BR /&gt; style: "circle",&lt;BR /&gt; color: "blue",&lt;BR /&gt; size: "8px", // pixels&lt;BR /&gt; outline: { // autocasts as new SimpleLineSymbol()&lt;BR /&gt; color: [ 255, 255, 0 ],&lt;BR /&gt; width: 1 // points&lt;BR /&gt; }&lt;BR /&gt; };&lt;/P&gt;&lt;P&gt;const sketch = new Sketch({&lt;BR /&gt; layer: layer,&lt;BR /&gt; view: view,&lt;BR /&gt; symbol: symbol,&lt;BR /&gt; availableCreateTools: ["point"]&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;view.ui.add(sketch, "top-right");&lt;BR /&gt; &lt;BR /&gt; sketch.on('create', function(evt){&lt;BR /&gt; if(view.zoom &amp;gt;= 11)&lt;BR /&gt; {&lt;BR /&gt; evt.graphic.symbol.color = "blue";&lt;BR /&gt; console.log("X = ", evt.graphic.geometry.x);&lt;BR /&gt; console.log("Y = ", evt.graphic.geometry.y);&lt;BR /&gt; }&lt;BR /&gt; else&lt;BR /&gt; {&lt;BR /&gt; alert("please zoom in");&lt;BR /&gt; evt.graphic.layer.remove(evt.graphic);&lt;BR /&gt; }&lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; });&lt;BR /&gt; });&lt;BR /&gt; &amp;lt;/script&amp;gt;&lt;BR /&gt; &amp;lt;/head&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;body&amp;gt;&lt;BR /&gt; &amp;lt;div id="viewDiv"&amp;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>Thu, 27 Feb 2020 10:41:43 GMT</pubDate>
    <dc:creator>SiyabongaKubeka</dc:creator>
    <dc:date>2020-02-27T10:41:43Z</dc:date>
    <item>
      <title>Is there a way to save the point that has been dropped on a map?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-there-a-way-to-save-the-point-that-has-been/m-p/73927#M6681</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am dropping point on a Esri map. I want to save those point so that when I re-open the map, I can see those dropped points or pins. Is there a way to do that? I am using JavaScript. Here is my code below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;BR /&gt;&amp;lt;html&amp;gt;&lt;BR /&gt; &amp;lt;head&amp;gt;&lt;BR /&gt; &amp;lt;meta charset="utf-8" /&amp;gt;&lt;BR /&gt; &amp;lt;meta&lt;BR /&gt; name="viewport"&lt;BR /&gt; content="initial-scale=1,maximum-scale=1,user-scalable=no"&lt;BR /&gt; /&amp;gt;&lt;BR /&gt; &amp;lt;title&amp;gt;DEA GIS APPLICATION&amp;lt;/title&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;link&lt;BR /&gt; rel="stylesheet"&lt;BR /&gt; href="https://js.arcgis.com/4.12/esri/themes/light/main.css"&lt;BR /&gt; /&amp;gt;&lt;BR /&gt; &amp;lt;script src="https://js.arcgis.com/4.12/"&amp;gt;&amp;lt;/script&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;style&amp;gt;&lt;BR /&gt; html,&lt;BR /&gt; body,&lt;BR /&gt; #viewDiv {&lt;BR /&gt; padding: 0;&lt;BR /&gt; margin: 0;&lt;BR /&gt; height: 100%;&lt;BR /&gt; width: 100%;&lt;BR /&gt; }&lt;BR /&gt; &amp;lt;/style&amp;gt;&lt;BR /&gt; &amp;lt;script&amp;gt;&lt;BR /&gt; require([&lt;BR /&gt; "esri/widgets/Sketch",&lt;BR /&gt; "esri/Map",&lt;BR /&gt; "esri/layers/GraphicsLayer",&lt;BR /&gt; "esri/views/MapView"&lt;BR /&gt; ], function(Sketch, Map, GraphicsLayer, MapView) {&lt;BR /&gt; const layer = new GraphicsLayer();&lt;/P&gt;&lt;P&gt;const map = new Map({&lt;BR /&gt; basemap: "streets",&lt;BR /&gt; layers: [layer]&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;const view = new MapView({&lt;BR /&gt; container: "viewDiv",&lt;BR /&gt; map: map,&lt;BR /&gt; zoom: 5,&lt;BR /&gt; center: [90, 45]&lt;BR /&gt; });&lt;BR /&gt; &lt;BR /&gt; var symbol = {&lt;BR /&gt; type: "simple-marker", // autocasts as new SimpleMarkerSymbol()&lt;BR /&gt; style: "circle",&lt;BR /&gt; color: "blue",&lt;BR /&gt; size: "8px", // pixels&lt;BR /&gt; outline: { // autocasts as new SimpleLineSymbol()&lt;BR /&gt; color: [ 255, 255, 0 ],&lt;BR /&gt; width: 1 // points&lt;BR /&gt; }&lt;BR /&gt; };&lt;/P&gt;&lt;P&gt;const sketch = new Sketch({&lt;BR /&gt; layer: layer,&lt;BR /&gt; view: view,&lt;BR /&gt; symbol: symbol,&lt;BR /&gt; availableCreateTools: ["point"]&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;view.ui.add(sketch, "top-right");&lt;BR /&gt; &lt;BR /&gt; sketch.on('create', function(evt){&lt;BR /&gt; if(view.zoom &amp;gt;= 11)&lt;BR /&gt; {&lt;BR /&gt; evt.graphic.symbol.color = "blue";&lt;BR /&gt; console.log("X = ", evt.graphic.geometry.x);&lt;BR /&gt; console.log("Y = ", evt.graphic.geometry.y);&lt;BR /&gt; }&lt;BR /&gt; else&lt;BR /&gt; {&lt;BR /&gt; alert("please zoom in");&lt;BR /&gt; evt.graphic.layer.remove(evt.graphic);&lt;BR /&gt; }&lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; });&lt;BR /&gt; });&lt;BR /&gt; &amp;lt;/script&amp;gt;&lt;BR /&gt; &amp;lt;/head&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;body&amp;gt;&lt;BR /&gt; &amp;lt;div id="viewDiv"&amp;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>Thu, 27 Feb 2020 10:41:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-there-a-way-to-save-the-point-that-has-been/m-p/73927#M6681</guid>
      <dc:creator>SiyabongaKubeka</dc:creator>
      <dc:date>2020-02-27T10:41:43Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to save the point that has been dropped on a map?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-there-a-way-to-save-the-point-that-has-been/m-p/73928#M6682</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A href="https://community.esri.com/migrated-users/387933"&gt;Siyabonga Kubeka&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Did you already have a look at the Editor widget?&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html" title="https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html"&gt;Editor | ArcGIS API for JavaScript 4.14&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This widget allows you to either add features or edit and/or delete existing features within an editable feature layer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Would this work in your scenario?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Egge-Jan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Feb 2020 11:52:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-there-a-way-to-save-the-point-that-has-been/m-p/73928#M6682</guid>
      <dc:creator>Egge-Jan_Pollé</dc:creator>
      <dc:date>2020-02-27T11:52:07Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to save the point that has been dropped on a map?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-there-a-way-to-save-the-point-that-has-been/m-p/73929#M6683</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Two other options would be to use your browsers localStorage to persist the points, or use the applyEdits methods to add these points to a feature collection for later viewing.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Feb 2020 23:15:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-there-a-way-to-save-the-point-that-has-been/m-p/73929#M6683</guid>
      <dc:creator>Noah-Sager</dc:creator>
      <dc:date>2020-02-28T23:15:29Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to save the point that has been dropped on a map?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-there-a-way-to-save-the-point-that-has-been/m-p/73930#M6684</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;One last option is to download the points as a csv which you could load back into future applications. Here is a sample I made a while back that may be helpful:&amp;nbsp;&lt;A class="link-titled" href="https://codepen.io/benesri/pen/ZEzyQNm" title="https://codepen.io/benesri/pen/ZEzyQNm"&gt;https://codepen.io/benesri/pen/ZEzyQNm&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Mar 2020 20:18:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-there-a-way-to-save-the-point-that-has-been/m-p/73930#M6684</guid>
      <dc:creator>BenElan</dc:creator>
      <dc:date>2020-03-02T20:18:40Z</dc:date>
    </item>
  </channel>
</rss>

