<?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: Selected features cleared in FeatureLayer after onResume({firstOccurence: true}) in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/selected-features-cleared-in-featurelayer-after/m-p/10006#M940</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did you ever figure out the appropriate methodology for this situation? &amp;nbsp;I have two feature layers representing the same entity (point and polygon) as different scales. &amp;nbsp;I call the selectFeatures method on both to keep the set in sync but whichever layer is out of scale visibility won't stay "selected"...&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 11 Nov 2016 20:50:09 GMT</pubDate>
    <dc:creator>FredSpataro</dc:creator>
    <dc:date>2016-11-11T20:50:09Z</dc:date>
    <item>
      <title>Selected features cleared in FeatureLayer after onResume({firstOccurence: true})</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/selected-features-cleared-in-featurelayer-after/m-p/10005#M939</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am trying to load an initial set of features into a FeatureLayer immediately after the map and FeatureLayer are loaded via the FeatureLayer.selectFeatures(query) call.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The FeatureLayer has a scale range that is outside of the initial map scale.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The selectFeatures call is successful and the selectedFeatures property has the list of features.&amp;nbsp; However, once the map is zoomed in past the scale range threshold, the FeatureLayer's resume() method is called from evaluateSuspension() method with evt.firstOccurence = true.&amp;nbsp; I don't quite follow the flow of events after this point, but presumably, calling the initialize() method on the layer._mode object clears out any selected features.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The end result is that selected features are cleared from the FeatureLayer and do not display on the map.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've worked around the issue by calling the private FeatureLayer._resume() and FeatureLayer._suspend() methods from my onLoad event handler but before I call the initial selectFeatures().&amp;nbsp; This works, but I'd like to avoid calling internal methods.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Also, calling the non-private resume() and suspend() methods do not work because the Layer.canResume() function always returns false because this.visibleAtMapScale is false.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any suggestions on how to perform a initial selectFeature() on a FeatureLayer?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Jan 2013 19:57:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/selected-features-cleared-in-featurelayer-after/m-p/10005#M939</guid>
      <dc:creator>LucasScharenbroich</dc:creator>
      <dc:date>2013-01-31T19:57:36Z</dc:date>
    </item>
    <item>
      <title>Re: Selected features cleared in FeatureLayer after onResume({firstOccurence: true})</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/selected-features-cleared-in-featurelayer-after/m-p/10006#M940</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did you ever figure out the appropriate methodology for this situation? &amp;nbsp;I have two feature layers representing the same entity (point and polygon) as different scales. &amp;nbsp;I call the selectFeatures method on both to keep the set in sync but whichever layer is out of scale visibility won't stay "selected"...&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Nov 2016 20:50:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/selected-features-cleared-in-featurelayer-after/m-p/10006#M940</guid>
      <dc:creator>FredSpataro</dc:creator>
      <dc:date>2016-11-11T20:50:09Z</dc:date>
    </item>
  </channel>
</rss>

