<?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: Having trouble adding a feature to a feature service through leaflet. in Open Source Mapping Libraries Ques.</title>
    <link>https://community.esri.com/t5/open-source-mapping-libraries-ques/having-trouble-adding-a-feature-to-a-feature/m-p/845136#M249</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I was having trouble getting it to work with the server you provided, unfortunately. I keep getting a vague 500 error&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 12px;"&gt;&lt;EM&gt; {"error":{"code":500,"message":"Unable to complete operation.","details":[]}}&lt;/EM&gt;&lt;/SPAN&gt; with no details when trying to post the feature to that server, whether through the function below or &lt;A href="http://sampleserver6.arcgisonline.com/arcgis/rest/services/ServiceRequest/FeatureServer/0/addFeatures"&gt;the actual addFeatures link&lt;/A&gt;. As a result, this may not be 100% reproducible, for which I apologize. Regardless, here's the function where I'm running into trouble. I stole the jquery posting from &lt;A _jive_internal="true" href="https://community.esri.com/message/690457-re-how-to-addfeatures-operation-in-arcgis-server-rest-api-using-javascript-and-jquery?commentID=690457#comment-690457"&gt;another Geonet thread&lt;/A&gt;. If there's anything else I can try to supply for you, please let me know.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Assume that the arguments "author" and "comment" are user-defined strings, and that "latitude" and "longitude" are stored as numerical representations of coordinates, such as 21.107012104600532.&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;function addComment(latitude, longitude, author, comment) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;var url = "&lt;A class="unlinked"&gt;http://sampleserver6.arcgisonline.com/arcgis/rest/services/ServiceRequest/FeatureServer/0&lt;/A&gt;/addFeatures"; //again, I was unable to get this function to work with this server&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;var feature = {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;"geometry" : {"type" : "Point", "x": longitude, "y":latitude },&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;"attributes" : {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;"name" : author,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;"comments": comment&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;},&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;};&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;$.post(url, {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;features: JSON.stringify([feature]),&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;f: "json"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;})&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;.done(function(results) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;console.log(results);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;})&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;.fail(function(error) { &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;console.log(error); &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;});&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; }&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This function works to post it to the server I'm working with, but when it does, I believe all the coordinates are read in as measurements in meters as opposed to latitude and longitude coordinates because they're all around the origin. I've tried multiplying by different values to get closer to where these points should be, but I feel like that's not the most effective way to solve this problem. I've also tried specifying a spatialReference and wkid for the feature, but that wasn't helpful either.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 04 Aug 2017 13:18:37 GMT</pubDate>
    <dc:creator>NikolasSchmidt</dc:creator>
    <dc:date>2017-08-04T13:18:37Z</dc:date>
    <item>
      <title>Having trouble adding a feature to a feature service through leaflet.</title>
      <link>https://community.esri.com/t5/open-source-mapping-libraries-ques/having-trouble-adding-a-feature-to-a-feature/m-p/845134#M247</link>
      <description>&lt;P&gt;So, I've got a feature service that I'd like to be able to add a feature to through a Leaflet map. I've got it set up so that when the user clicks anywhere on the map, a Bootstrap modal pops up and lets them enter information about that point, to be added as attributes. The points &lt;STRONG&gt;&lt;EM&gt;are&lt;/EM&gt;&lt;/STRONG&gt;&amp;nbsp;added to the map with all the appropriate attributes, but they're all clustered around the origin (equator, prime meridian). I assumed this was an issue with the spatial reference, so I explicitly set it to a different spatial reference, but that&amp;nbsp;didn't help. I then attempted to convert from decimal degrees to meters with some rough math, which got it away from the origin, but not anywhere near close to where it should be. Is there a way to convert from decimal degrees through either the Esri Javascript API or Esri Leaflet API? Are there other ways to make sure the correct spatial reference is being used? Are there simple mathematical formulas to convert from degrees to meters? Any other suggestions?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you in advance!&lt;/P&gt;</description>
      <pubDate>Mon, 28 Aug 2023 13:18:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/open-source-mapping-libraries-ques/having-trouble-adding-a-feature-to-a-feature/m-p/845134#M247</guid>
      <dc:creator>NikolasSchmidt</dc:creator>
      <dc:date>2023-08-28T13:18:09Z</dc:date>
    </item>
    <item>
      <title>Re: Having trouble adding a feature to a feature service through leaflet.</title>
      <link>https://community.esri.com/t5/open-source-mapping-libraries-ques/having-trouble-adding-a-feature-to-a-feature/m-p/845135#M248</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;please share a small reproducible test case with the bare minimum of code necessary to demonstrate the problem. i'd be happy to take a look at it and help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you're welcome to use &lt;A href="http://sampleserver6.arcgisonline.com/arcgis/rest/services/ServiceRequest/FeatureServer/0"&gt;this demo feature service&lt;/A&gt; if yours isn't publicly accessible.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Aug 2017 17:54:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/open-source-mapping-libraries-ques/having-trouble-adding-a-feature-to-a-feature/m-p/845135#M248</guid>
      <dc:creator>JohnGravois</dc:creator>
      <dc:date>2017-08-02T17:54:44Z</dc:date>
    </item>
    <item>
      <title>Re: Having trouble adding a feature to a feature service through leaflet.</title>
      <link>https://community.esri.com/t5/open-source-mapping-libraries-ques/having-trouble-adding-a-feature-to-a-feature/m-p/845136#M249</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I was having trouble getting it to work with the server you provided, unfortunately. I keep getting a vague 500 error&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 12px;"&gt;&lt;EM&gt; {"error":{"code":500,"message":"Unable to complete operation.","details":[]}}&lt;/EM&gt;&lt;/SPAN&gt; with no details when trying to post the feature to that server, whether through the function below or &lt;A href="http://sampleserver6.arcgisonline.com/arcgis/rest/services/ServiceRequest/FeatureServer/0/addFeatures"&gt;the actual addFeatures link&lt;/A&gt;. As a result, this may not be 100% reproducible, for which I apologize. Regardless, here's the function where I'm running into trouble. I stole the jquery posting from &lt;A _jive_internal="true" href="https://community.esri.com/message/690457-re-how-to-addfeatures-operation-in-arcgis-server-rest-api-using-javascript-and-jquery?commentID=690457#comment-690457"&gt;another Geonet thread&lt;/A&gt;. If there's anything else I can try to supply for you, please let me know.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Assume that the arguments "author" and "comment" are user-defined strings, and that "latitude" and "longitude" are stored as numerical representations of coordinates, such as 21.107012104600532.&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;function addComment(latitude, longitude, author, comment) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;var url = "&lt;A class="unlinked"&gt;http://sampleserver6.arcgisonline.com/arcgis/rest/services/ServiceRequest/FeatureServer/0&lt;/A&gt;/addFeatures"; //again, I was unable to get this function to work with this server&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;var feature = {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;"geometry" : {"type" : "Point", "x": longitude, "y":latitude },&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;"attributes" : {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;"name" : author,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;"comments": comment&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;},&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;};&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;$.post(url, {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;features: JSON.stringify([feature]),&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;f: "json"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;})&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;.done(function(results) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;console.log(results);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;})&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;.fail(function(error) { &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;console.log(error); &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;});&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; }&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This function works to post it to the server I'm working with, but when it does, I believe all the coordinates are read in as measurements in meters as opposed to latitude and longitude coordinates because they're all around the origin. I've tried multiplying by different values to get closer to where these points should be, but I feel like that's not the most effective way to solve this problem. I've also tried specifying a spatialReference and wkid for the feature, but that wasn't helpful either.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Aug 2017 13:18:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/open-source-mapping-libraries-ques/having-trouble-adding-a-feature-to-a-feature/m-p/845136#M249</guid>
      <dc:creator>NikolasSchmidt</dc:creator>
      <dc:date>2017-08-04T13:18:37Z</dc:date>
    </item>
    <item>
      <title>Re: Having trouble adding a feature to a feature service through leaflet.</title>
      <link>https://community.esri.com/t5/open-source-mapping-libraries-ques/having-trouble-adding-a-feature-to-a-feature/m-p/845137#M250</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i noticed a few unexplainable errors with that sample server too, so i found a different test server to play with.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;there are several problems with your approach:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1.&amp;nbsp;&lt;SPAN style="background-color: #f6f6f6;"&gt;"type" : "Point"&lt;/SPAN&gt;&amp;nbsp; is &lt;EM&gt;not&lt;/EM&gt; valid to include within a JSON &lt;A href="http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Geometry_objects/02r3000000n1000000/"&gt;geometry object&lt;/A&gt;&lt;/P&gt;&lt;P&gt;2. you forgot to remove a trailing comma from your&amp;nbsp;&lt;SPAN style="background-color: #f6f6f6;"&gt;"attributes"&lt;/SPAN&gt; object&lt;/P&gt;&lt;P&gt;3. you absolutely &lt;EM&gt;must&lt;/EM&gt; provide a spatial reference object to let the service know you are passing lat/long coordinates when the service itself stores its data in a different CRS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV style="color: #d4d4d4; background-color: #1e1e1e; font-size: 12px;"&gt;&lt;DIV&gt;&lt;SPAN style="color: #608b4e;"&gt;{ "x" : -118.15, "y" : 33.80, "spatialReference" : { "wkid" : 4326 }}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4. i don't know why, but in my own testing i encountered more predictable, appropriate responses when i used the generic "/applyEdits" operation than when i made requests to "/addFeatures"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://jsbin.com/lafarap/edit?html,output" title="http://jsbin.com/lafarap/edit?html,output"&gt;http://jsbin.com/lafarap/edit?html,output&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;edit: i tested a bit more and realized the only reason i was having trouble with /addFeatures was because i was using it to try and add geometries that were &lt;EM&gt;way&lt;/EM&gt; outside the source extent of the original data. both endpoints are consistent, as they should be.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Aug 2017 17:01:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/open-source-mapping-libraries-ques/having-trouble-adding-a-feature-to-a-feature/m-p/845137#M250</guid>
      <dc:creator>JohnGravois</dc:creator>
      <dc:date>2017-08-04T17:01:06Z</dc:date>
    </item>
    <item>
      <title>Re: Having trouble adding a feature to a feature service through leaflet.</title>
      <link>https://community.esri.com/t5/open-source-mapping-libraries-ques/having-trouble-adding-a-feature-to-a-feature/m-p/845138#M251</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;all that said, i'd &lt;EM&gt;highly&lt;/EM&gt; recommend you consider using the functionality we built into esri leaflet for this, as it makes it substantially more straightforward to ensure the appropriate request is made.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://esri.github.io/esri-leaflet/api-reference/layers/feature-layer.html" title="http://esri.github.io/esri-leaflet/api-reference/layers/feature-layer.html" rel="nofollow noopener noreferrer" target="_blank"&gt;L.esri.FeatureLayer | Esri Leaflet&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV style="color: #d4d4d4; background-color: #1e1e1e; font-size: 12px;"&gt; &lt;/DIV&gt;&lt;DIV style="color: #d4d4d4; background-color: #1e1e1e; font-size: 12px;"&gt; &lt;/DIV&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;map&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;on&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"click"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;function&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;evt&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp; &lt;SPAN class="comment token"&gt;&lt;SPAN&gt;// &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2Fleafletjs.com%2Freference-1.1.0.html%23marker-togeojson" target="_blank"&gt;http://leafletjs.com/reference-1.1.0.html#marker-togeojson&lt;/A&gt;&lt;/SPAN&gt;
&amp;nbsp; &lt;SPAN class="keyword token"&gt;let&lt;/SPAN&gt; newFeature &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; L&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;marker&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;evt&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;latlng&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;toGeoJSON&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp; newFeature&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;properties&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;inspector &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'john'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;

&amp;nbsp; myFeatureLayer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;addFeature&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;newFeature&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;function&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;err&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; response&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; console&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;log&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;response&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp; &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;A class="link-bare" href="http://jsbin.com/kufesac/edit?html,output" title="http://jsbin.com/kufesac/edit?html,output" rel="nofollow noopener noreferrer" target="_blank"&gt;http://jsbin.com/kufesac/edit?html,output&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 10:21:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/open-source-mapping-libraries-ques/having-trouble-adding-a-feature-to-a-feature/m-p/845138#M251</guid>
      <dc:creator>JohnGravois</dc:creator>
      <dc:date>2021-12-12T10:21:22Z</dc:date>
    </item>
    <item>
      <title>Re: Having trouble adding a feature to a feature service through leaflet.</title>
      <link>https://community.esri.com/t5/open-source-mapping-libraries-ques/having-trouble-adding-a-feature-to-a-feature/m-p/845139#M252</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Alright, this worked. Thank you very much for all the help! I am going to mark your other reply as the correct answer just to encourage better practices. I'll see if I'm able to transition my work into something more along those lines. That said, this solution did resolve my issues with trying to post through jQuery and whatnot. Thanks again!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Aug 2017 10:32:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/open-source-mapping-libraries-ques/having-trouble-adding-a-feature-to-a-feature/m-p/845139#M252</guid>
      <dc:creator>NikolasSchmidt</dc:creator>
      <dc:date>2017-08-07T10:32:02Z</dc:date>
    </item>
  </channel>
</rss>

