AnsweredAssumed Answered

Why my ArcGISLocalFeatureLayer does not bring its graphics after Initialize?

Question asked by xtian79 on Mar 14, 2014
Latest reply on Mar 14, 2014 by xtian79
DEAR PEOPLE FROM THE FUTURE: Here's what we've figured out so far???

I have created an ArcGISLocalFeatureLayer using a local package that i already setup with some data.

var localCenterlineServiceMPK = new LocalFeatureService { Path = @"C:\myPackage.mpk",                                                                                                                            MaxRecords = 100000 };              localCenterlineServiceMPK.Start();              var lineLayer = new ArcGISLocalFeatureLayer                                 {                                     Url = localCenterlineServiceMPK.UrlFeatureService + "/0",                                      Service = localCenterlineServiceMPK,                                      ID = "MyLayer",                                      LayerName = "MyLayer",                                      Editable = true,                                      DisableClientCaching = true,                                      AutoSave = false,                                      Mode = FeatureLayer.QueryMode.Snapshot,                                      OutFields = new OutFields { "*" }                                 };              lineLayer.Initialize();


I suscribe to the initialize method:

centerlineLayer.Initialized += (sender, args) =>                     {                         var newCenterlineLayer = sender as ArcGISLocalFeatureLayer;                         centerlineLayer.Update();                         this.LayerController.CreateRouteGraphics(routes, newCenterlineLayer);                     };


if i check fot the graphics list in the object newCenterlineLayer before the update it is O;

Afther them, it is still 0

Outcomes