<?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: Feature Layer must be visible when using editing widget? in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/feature-layer-must-be-visible-when-using-editing/m-p/362461#M33580</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The layer must be visible to edit, kind of...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You can still create objects with a template picker, and if you have an attribute inspector the attributes can be edited initially.&amp;nbsp; But any editing of geometry or selecting in the map requires the layer be visible.&amp;nbsp; Events that trigger editing linked to events on the graphics.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I can conceptualize some ways to possibly overcome editing with the layer hidden.&amp;nbsp; It is possible to query, select, update, etc with the layer hidden.&amp;nbsp; But it's a lot more complicated than than just having the layer visible, particularly editing geometry or interacting with the map.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've edited attributes by identifying via map service and then making a manual call to the REST Apply Edits of the corresponding feature service to update attributes without a feature layer loaded.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You can set &lt;/SPAN&gt;&lt;STRONG&gt;visible&lt;/STRONG&gt;&lt;SPAN&gt; to &lt;/SPAN&gt;&lt;STRONG&gt;false&lt;/STRONG&gt;&lt;SPAN&gt; when creating a feature layer just like a dynamic layer instead of calling hide after adding the layer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;var layer = new esri.layers.FeatureLayer(url, {
&amp;nbsp; mode: 1,
&amp;nbsp; outFields: ['*'],
&amp;nbsp; &lt;STRONG&gt;visible: false&lt;/STRONG&gt;
});
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 16:53:30 GMT</pubDate>
    <dc:creator>BenFousek</dc:creator>
    <dc:date>2021-12-11T16:53:30Z</dc:date>
    <item>
      <title>Feature Layer must be visible when using editing widget?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/feature-layer-must-be-visible-when-using-editing/m-p/362460#M33579</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have an application where I have a couple of feature layers to edit.&amp;nbsp; They are loaded into the map.&amp;nbsp; I also have a table of contents where I have a dynamic map services that you can turn the layers on and off.&amp;nbsp; These layers are the same as what is displayed in the feature layer.&amp;nbsp; However, I do not want the feature layer on at all, so I can view the complete symbology for all graphics.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;To work around my display problem, I added in the following code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map.addLayers([plantingsites, publictreeinventory]);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; plantingsites.hide();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; publictreeinventory.hide();&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This block of code adds in the feature layer, but hides it.&amp;nbsp; I can still use the dynamic map service in the TOC to turn on and off layers.&amp;nbsp; When hiding the feature layer, the edit toolbar does not work.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Anyone have and ideas how I can hid the display of the feature layers, but still be able to use the editor widget?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Aug 2013 19:27:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/feature-layer-must-be-visible-when-using-editing/m-p/362460#M33579</guid>
      <dc:creator>IanPeebles</dc:creator>
      <dc:date>2013-08-23T19:27:33Z</dc:date>
    </item>
    <item>
      <title>Re: Feature Layer must be visible when using editing widget?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/feature-layer-must-be-visible-when-using-editing/m-p/362461#M33580</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The layer must be visible to edit, kind of...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You can still create objects with a template picker, and if you have an attribute inspector the attributes can be edited initially.&amp;nbsp; But any editing of geometry or selecting in the map requires the layer be visible.&amp;nbsp; Events that trigger editing linked to events on the graphics.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I can conceptualize some ways to possibly overcome editing with the layer hidden.&amp;nbsp; It is possible to query, select, update, etc with the layer hidden.&amp;nbsp; But it's a lot more complicated than than just having the layer visible, particularly editing geometry or interacting with the map.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've edited attributes by identifying via map service and then making a manual call to the REST Apply Edits of the corresponding feature service to update attributes without a feature layer loaded.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You can set &lt;/SPAN&gt;&lt;STRONG&gt;visible&lt;/STRONG&gt;&lt;SPAN&gt; to &lt;/SPAN&gt;&lt;STRONG&gt;false&lt;/STRONG&gt;&lt;SPAN&gt; when creating a feature layer just like a dynamic layer instead of calling hide after adding the layer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;var layer = new esri.layers.FeatureLayer(url, {
&amp;nbsp; mode: 1,
&amp;nbsp; outFields: ['*'],
&amp;nbsp; &lt;STRONG&gt;visible: false&lt;/STRONG&gt;
});
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 16:53:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/feature-layer-must-be-visible-when-using-editing/m-p/362461#M33580</guid>
      <dc:creator>BenFousek</dc:creator>
      <dc:date>2021-12-11T16:53:30Z</dc:date>
    </item>
    <item>
      <title>Re: Feature Layer must be visible when using editing widget?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/feature-layer-must-be-visible-when-using-editing/m-p/362462#M33581</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I was thinking about this some more, and I'm not at a workstation where I can test it, but I wonder if setting the feature layer mode to esri.layers.FeatureLayer.MODE_SELECTION might work.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;var layer = new esri.layers.FeatureLayer(url, {
&amp;nbsp; mode: esri.layers.FeatureLayer.MODE_SELECTION,
&amp;nbsp; outFields: ['*']
});&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've never used the editor with a MODE_SELECTION layer, but I think it might be simple solution for your problem.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Don't hide the layer.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 16:53:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/feature-layer-must-be-visible-when-using-editing/m-p/362462#M33581</guid>
      <dc:creator>BenFousek</dc:creator>
      <dc:date>2021-12-11T16:53:33Z</dc:date>
    </item>
    <item>
      <title>Re: Feature Layer must be visible when using editing widget?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/feature-layer-must-be-visible-when-using-editing/m-p/362463#M33582</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;As Ben pointed out, I don't think you can hide the feature layers and still able to edit them. One thing you may be able to do is to display the feature layers when in edit mode only, and hide them when not. Here is the workflow at conceptual level.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;UL&gt;&lt;BR /&gt;&lt;LI&gt;Hide all the feature layers to be edited initially.&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;Show the feature layer(s) in edit when the app enters the edit mode. In doing so, the app should provide a way to trigger that, like click a button, or select an editing layer from a list, or click the feature template, etc.&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;Hide the feature layer(s) when the app exits the edit mode. Again, the app should have a way for doing that.&lt;/LI&gt;&lt;BR /&gt;&lt;/UL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Aug 2013 23:50:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/feature-layer-must-be-visible-when-using-editing/m-p/362463#M33582</guid>
      <dc:creator>JasonZou</dc:creator>
      <dc:date>2013-08-23T23:50:13Z</dc:date>
    </item>
  </channel>
</rss>

