<?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: Odd FeatureLayer Implementation Behavior in ArcGIS API for Silverlight Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/odd-featurelayer-implementation-behavior/m-p/468860#M12104</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for the reply Morten. Sorry, i should have been more clear about the versions we are using. We currently are running ArcGIS Server 10 (just not the final release) and we are using the 2.0 WPF/Silverlight SDK (beta).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I would like to take advantage of the editing goodness and ondemand feature loading that comes with the 2.0 FeatureLayer - which is why i chose that route rather than GraphicsLayer. Are you saying that we shouldn't attempt to inherit from FeatureLayer at all?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 08 Jul 2010 15:37:09 GMT</pubDate>
    <dc:creator>DonnieHolmes</dc:creator>
    <dc:date>2010-07-08T15:37:09Z</dc:date>
    <item>
      <title>Odd FeatureLayer Implementation Behavior</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/odd-featurelayer-implementation-behavior/m-p/468858#M12102</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have a need to implement the FeatureLayer class so that i can add my own DependencyProperties, events, etc. I've finally been able to get this to work, but i've noticed some odd behavior. If you:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; 1. Implement the FeatureLayer class as "MyFeatureLayer" (do nothing else in the class)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; 2. Add your "MyFeatureLayer" class to the map as you would a regular FeatureLayer (make all the required settings so that data should load)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; 3. Notice that when you load the app the FeatureLayer never completely loads&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Somehow i stumbled upon the workaround that if you set the map extent explicitly on the map itself rather than letting it pick up from the first layer that loads, everything seems to work fine.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So, am i try to do something that's not really supported, or is this a bug? I haven't upgraded to the 2.0 RC as we haven't yet upgraded our ArcGIS Server to the 10.0 release version. (currently using beta versions of both)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Jul 2010 13:11:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/odd-featurelayer-implementation-behavior/m-p/468858#M12102</guid>
      <dc:creator>DonnieHolmes</dc:creator>
      <dc:date>2010-07-08T13:11:11Z</dc:date>
    </item>
    <item>
      <title>Re: Odd FeatureLayer Implementation Behavior</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/odd-featurelayer-implementation-behavior/m-p/468859#M12103</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You can still use v2.0 with an ArcGIS 9.3.1 server.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If you want to create your own featurelayer, you should &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1) Inherit from GraphicsLayer&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2) Internally add a querytask that populates the Graphics collection with whatever comes back from the QueryTask.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;In other words, all a featurelayer is (at least at v1.x) is just a graphicslayer with a built-in querytask.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Jul 2010 15:09:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/odd-featurelayer-implementation-behavior/m-p/468859#M12103</guid>
      <dc:creator>dotMorten_esri</dc:creator>
      <dc:date>2010-07-08T15:09:46Z</dc:date>
    </item>
    <item>
      <title>Re: Odd FeatureLayer Implementation Behavior</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/odd-featurelayer-implementation-behavior/m-p/468860#M12104</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for the reply Morten. Sorry, i should have been more clear about the versions we are using. We currently are running ArcGIS Server 10 (just not the final release) and we are using the 2.0 WPF/Silverlight SDK (beta).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I would like to take advantage of the editing goodness and ondemand feature loading that comes with the 2.0 FeatureLayer - which is why i chose that route rather than GraphicsLayer. Are you saying that we shouldn't attempt to inherit from FeatureLayer at all?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Jul 2010 15:37:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/odd-featurelayer-implementation-behavior/m-p/468860#M12104</guid>
      <dc:creator>DonnieHolmes</dc:creator>
      <dc:date>2010-07-08T15:37:09Z</dc:date>
    </item>
    <item>
      <title>Re: Odd FeatureLayer Implementation Behavior</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/odd-featurelayer-implementation-behavior/m-p/468861#M12105</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Sorry I misunderstood. Inheriting from FeatureLayer should be fine. But you could be overriding some methods incorrectly. Are you overriding anything? (if you are make sure you call the base method as well).&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Jul 2010 22:48:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/odd-featurelayer-implementation-behavior/m-p/468861#M12105</guid>
      <dc:creator>dotMorten_esri</dc:creator>
      <dc:date>2010-07-08T22:48:42Z</dc:date>
    </item>
    <item>
      <title>Re: Odd FeatureLayer Implementation Behavior</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/odd-featurelayer-implementation-behavior/m-p/468862#M12106</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I finally figured out what is wrong, and it doesn't appear related to implementing the FeatureLayer class. It seems that if there is only a FeatureLayer in the map, then it won't pay any attention to it unless you explicitly set the map extent. Using data from the ESRI sample services:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This loads as expected:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
&amp;lt;esri:Map x:Name="MyMap"&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;esri:ArcGISTiledMapServiceLayer ID="StreetMapLayer"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Url="http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_StreetMap_World_2D/MapServer"/&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;esri:FeatureLayer ID="MyFeatureLayer"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Url="http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer/0"/&amp;gt;
&amp;lt;/esri:Map&amp;gt;
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Nothing loads for this scenario:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
&amp;lt;esri:Map x:Name="MyMap"&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;esri:FeatureLayer ID="MyFeatureLayer"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Url="http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer/0"/&amp;gt;
&amp;lt;/esri:Map&amp;gt;
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However, this does work (which does nothing more than set the map to the extent and spatial ref of the feature layer):&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
&amp;lt;esri:Map x:Name="MyMap"&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;esri:Map.Extent&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;esri:Envelope XMin="-158.064605712891" YMin="19.6961498260498" XMax="-67.986768734036" YMax="64.8691042579708" &amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;esri:Envelope.SpatialReference&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;esri:SpatialReference WKID="4326"/&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/esri:Envelope.SpatialReference&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/esri:Envelope&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/esri:Map.Extent&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;esri:FeatureLayer ID="MyFeatureLayer"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Url="http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer/0"/&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/esri:Map&amp;gt;
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This seems like a bug to me.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 20:47:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/odd-featurelayer-implementation-behavior/m-p/468862#M12106</guid>
      <dc:creator>DonnieHolmes</dc:creator>
      <dc:date>2021-12-11T20:47:22Z</dc:date>
    </item>
    <item>
      <title>Re: Odd FeatureLayer Implementation Behavior</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/odd-featurelayer-implementation-behavior/m-p/468863#M12107</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You are right the map extent is not initialized from the feature layer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;You can initialize the map extent in the featurelayer initialized event:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt; 
private void FeatureLayer_Initialized(object sender, System.EventArgs e)
{
FeatureLayer featureLayer = sender as FeatureLayer;
MyMap.Extent = featureLayer.LayerInfo.Extent;
}
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 20:47:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/odd-featurelayer-implementation-behavior/m-p/468863#M12107</guid>
      <dc:creator>DominiqueBroux</dc:creator>
      <dc:date>2021-12-11T20:47:25Z</dc:date>
    </item>
    <item>
      <title>Re: Odd FeatureLayer Implementation Behavior</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/odd-featurelayer-implementation-behavior/m-p/468864#M12108</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks Dominique. Is this behavior by design? I'm just curious as to why the map would ignore feature layers for its extent and spatial reference info.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Jul 2010 14:25:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/odd-featurelayer-implementation-behavior/m-p/468864#M12108</guid>
      <dc:creator>DonnieHolmes</dc:creator>
      <dc:date>2010-07-12T14:25:13Z</dc:date>
    </item>
  </channel>
</rss>

