<?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: add geometry to feature layer in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-geometry-to-feature-layer/m-p/224720#M20901</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;FeatureLayer inherits from GraphicsLayer, so you should be able to use the add() method. See &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi/graphicslayer.htm#add" rel="nofollow noopener noreferrer" target="_blank"&gt;http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi/graphicslayer.htm#add.&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;To create a point graphic to add, where pointX and pointY are the x and y from your form:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="color:blue;"&gt;
&lt;/SPAN&gt;&lt;SPAN style="color:Green;"&gt;// Create the Point&lt;/SPAN&gt;&lt;SPAN style="color:blue;"&gt;
&lt;/SPAN&gt;var point = new esri.geometry.Point(pointX, pointY, new esri.SpatialReference({ wkid: 4326 }));

&lt;SPAN style="color:Green;"&gt;// Create a point image symbol:&lt;/SPAN&gt;&lt;SPAN style="color:blue;"&gt;
&lt;/SPAN&gt;var symbol = new esri.symbol.PictureMarkerSymbol(&lt;SPAN style="color:maroon;"&gt;"/Images/point.png"&lt;/SPAN&gt;, widthInPixels, heightInPixels);

&lt;SPAN style="color:Green;"&gt;// Set up the template for the info window.&lt;/SPAN&gt;
var infoTemplate = new esri.InfoTemplate("Point attributes", "${*}");

&lt;SPAN style="color:Green;"&gt;// Create a graphic from the point:&lt;/SPAN&gt;
var graphic = new esri.Graphic(point, symbol, infoTemplate);

&lt;SPAN style="color:Green;"&gt;// Add the graphic&lt;/SPAN&gt;
featureLayer.add(graphic);
&lt;/PRE&gt;&lt;SPAN&gt;Substitute your own spatial reference ID for 4326.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 10:56:35 GMT</pubDate>
    <dc:creator>TimRourke</dc:creator>
    <dc:date>2021-12-11T10:56:35Z</dc:date>
    <item>
      <title>add geometry to feature layer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-geometry-to-feature-layer/m-p/224719#M20900</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am looking for an example that will take a provided lat/long and attribute from a form and then create the point (or line) feature in a feature service layer&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any help would be appreciated.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Nov 2010 02:37:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-geometry-to-feature-layer/m-p/224719#M20900</guid>
      <dc:creator>ChrisSeeger</dc:creator>
      <dc:date>2010-11-02T02:37:06Z</dc:date>
    </item>
    <item>
      <title>Re: add geometry to feature layer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-geometry-to-feature-layer/m-p/224720#M20901</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;FeatureLayer inherits from GraphicsLayer, so you should be able to use the add() method. See &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi/graphicslayer.htm#add" rel="nofollow noopener noreferrer" target="_blank"&gt;http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi/graphicslayer.htm#add.&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;To create a point graphic to add, where pointX and pointY are the x and y from your form:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="color:blue;"&gt;
&lt;/SPAN&gt;&lt;SPAN style="color:Green;"&gt;// Create the Point&lt;/SPAN&gt;&lt;SPAN style="color:blue;"&gt;
&lt;/SPAN&gt;var point = new esri.geometry.Point(pointX, pointY, new esri.SpatialReference({ wkid: 4326 }));

&lt;SPAN style="color:Green;"&gt;// Create a point image symbol:&lt;/SPAN&gt;&lt;SPAN style="color:blue;"&gt;
&lt;/SPAN&gt;var symbol = new esri.symbol.PictureMarkerSymbol(&lt;SPAN style="color:maroon;"&gt;"/Images/point.png"&lt;/SPAN&gt;, widthInPixels, heightInPixels);

&lt;SPAN style="color:Green;"&gt;// Set up the template for the info window.&lt;/SPAN&gt;
var infoTemplate = new esri.InfoTemplate("Point attributes", "${*}");

&lt;SPAN style="color:Green;"&gt;// Create a graphic from the point:&lt;/SPAN&gt;
var graphic = new esri.Graphic(point, symbol, infoTemplate);

&lt;SPAN style="color:Green;"&gt;// Add the graphic&lt;/SPAN&gt;
featureLayer.add(graphic);
&lt;/PRE&gt;&lt;SPAN&gt;Substitute your own spatial reference ID for 4326.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 10:56:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-geometry-to-feature-layer/m-p/224720#M20901</guid>
      <dc:creator>TimRourke</dc:creator>
      <dc:date>2021-12-11T10:56:35Z</dc:date>
    </item>
    <item>
      <title>Re: add geometry to feature layer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-geometry-to-feature-layer/m-p/224721#M20902</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The feature layer has an applyedits method that you can use to add new features to a feature layer. The following samples show how to use this method. &lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/help/jssamples_start.htm#jssamples/ed_feature_creation.html"&gt;http://help.arcgis.com/en/webapi/javascript/arcgis/help/jssamples_start.htm#jssamples/ed_feature_creation.html&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/help/jssamples_start.htm#jssamples/mobile_geolocaterenderer.html"&gt;http://help.arcgis.com/en/webapi/javascript/arcgis/help/jssamples_start.htm#jssamples/mobile_geolocaterenderer.html&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Nov 2010 14:48:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-geometry-to-feature-layer/m-p/224721#M20902</guid>
      <dc:creator>KellyHutchins</dc:creator>
      <dc:date>2010-11-02T14:48:38Z</dc:date>
    </item>
  </channel>
</rss>

