<?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 a feature layer using code in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/create-a-feature-layer-using-code/m-p/137543#M12801</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Chiru,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; Like ZachLiu said, you'll need to create an empty feature class and publish it as a map service in order to be able to create features and save them as edits.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;One way you could make something that works like mapsengine would be to add a field to your new feature class called something like "EngineLayerId".&amp;nbsp; Then when your user creates a new layer, what you do is just add a query ("definition expression") to the feature service for the new EngineLayerId that would return just the features marked for that sort of "virtual" layer.&amp;nbsp; (I would also create another table called "EngineLayer" where you track these id's and most likely give them a name and associate them with your users, etc.).&amp;nbsp; This way, you are only showing a specific set of features at a time, which to your users would be very much like their own layer.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here's the FeatureLayer.setDefinitionExpression docs: &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://developers.arcgis.com/en/javascript/jsapi/featurelayer-amd.html#setdefinitionexpression" rel="nofollow" target="_blank"&gt;https://developers.arcgis.com/en/javascript/jsapi/featurelayer-amd.html#setdefinitionexpression&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;There are probably other ways to do it, but making virtual layers with a query from a single feature service would be simple and might do just what you want.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Good luck!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;ken.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 18 Sep 2013 14:23:53 GMT</pubDate>
    <dc:creator>KenBurcham</dc:creator>
    <dc:date>2013-09-18T14:23:53Z</dc:date>
    <item>
      <title>Create a feature layer using code</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/create-a-feature-layer-using-code/m-p/137540#M12798</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;as in the&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://developers.arcgis.com/en/javascript/jssamples/fl_featureCollection.html" rel="nofollow" target="_blank"&gt;tutorial&lt;/A&gt;&lt;SPAN&gt; we can create a feature layer thorugh code itself, and we can add the fetature on those.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;my question is how i can save these feature layer in my online arcgis server, any API or REST or SOAP API's for this?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;-Chiru&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Sep 2013 18:06:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/create-a-feature-layer-using-code/m-p/137540#M12798</guid>
      <dc:creator>ChiranjeeviGK</dc:creator>
      <dc:date>2013-09-17T18:06:57Z</dc:date>
    </item>
    <item>
      <title>Re: Create a feature layer using code</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/create-a-feature-layer-using-code/m-p/137541#M12799</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Not very sure if this is what you want. It looks like you want to save a collection of features generated in the application.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Possible solution:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You can publish an empty feature service, add it to your app as a feature layer, and then save the features you want to &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;the service using featureLayer.applyEdit() method.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Sep 2013 21:41:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/create-a-feature-layer-using-code/m-p/137541#M12799</guid>
      <dc:creator>ZachLiu1</dc:creator>
      <dc:date>2013-09-17T21:41:04Z</dc:date>
    </item>
    <item>
      <title>Re: Create a feature layer using code</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/create-a-feature-layer-using-code/m-p/137542#M12800</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;i want to do somthing like &lt;/SPAN&gt;&lt;A href="https://mapsengine.google.com/map/"&gt;map engine&lt;/A&gt;&lt;SPAN&gt; when i go to that page it will create default layer and we can add the points on it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;if we need another layer we can create by add layer button&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So i dont want to make a empty layer from Online arcGIS, or else i need to make a empty layer from the code.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Chiru&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Sep 2013 05:05:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/create-a-feature-layer-using-code/m-p/137542#M12800</guid>
      <dc:creator>ChiranjeeviGK</dc:creator>
      <dc:date>2013-09-18T05:05:39Z</dc:date>
    </item>
    <item>
      <title>Re: Create a feature layer using code</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/create-a-feature-layer-using-code/m-p/137543#M12801</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Chiru,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; Like ZachLiu said, you'll need to create an empty feature class and publish it as a map service in order to be able to create features and save them as edits.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;One way you could make something that works like mapsengine would be to add a field to your new feature class called something like "EngineLayerId".&amp;nbsp; Then when your user creates a new layer, what you do is just add a query ("definition expression") to the feature service for the new EngineLayerId that would return just the features marked for that sort of "virtual" layer.&amp;nbsp; (I would also create another table called "EngineLayer" where you track these id's and most likely give them a name and associate them with your users, etc.).&amp;nbsp; This way, you are only showing a specific set of features at a time, which to your users would be very much like their own layer.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here's the FeatureLayer.setDefinitionExpression docs: &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://developers.arcgis.com/en/javascript/jsapi/featurelayer-amd.html#setdefinitionexpression" rel="nofollow" target="_blank"&gt;https://developers.arcgis.com/en/javascript/jsapi/featurelayer-amd.html#setdefinitionexpression&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;There are probably other ways to do it, but making virtual layers with a query from a single feature service would be simple and might do just what you want.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Good luck!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;ken.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Sep 2013 14:23:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/create-a-feature-layer-using-code/m-p/137543#M12801</guid>
      <dc:creator>KenBurcham</dc:creator>
      <dc:date>2013-09-18T14:23:53Z</dc:date>
    </item>
    <item>
      <title>Re: Create a feature layer using code</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/create-a-feature-layer-using-code/m-p/137544#M12802</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;This is good idea,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;i will try this thank you ..&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Sep 2013 14:43:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/create-a-feature-layer-using-code/m-p/137544#M12802</guid>
      <dc:creator>ChiranjeeviGK</dc:creator>
      <dc:date>2013-09-18T14:43:44Z</dc:date>
    </item>
  </channel>
</rss>

