Hi,That's correct. You might also want to listen for the InitializationFailed event.You might also consider working with the underlying LocalMapService directly - where you can set the MaxRecords property (with respect to queries). Example below - I've used both an inline handler and explicit named events - obviously which pattern you choose is up to you.
public MainWindow()
{
InitializeComponent();
LocalMapService localMapService = new LocalMapService(@"..\Maps_and_Data\Map.mpk")
{
MaxRecords=1000000
};
localMapService.StartAsync(localServiceCallback =>
{
if (localServiceCallback.Error != null)
{
// Do something with Error
return;
}
ArcGISDynamicMapServiceLayer localDynamicLayer =
new ArcGISLocalDynamicMapServiceLayer(localMapService);
localDynamicLayer.Initialized += localDynamicLayer_Initialized;
localDynamicLayer.InitializationFailed += localDynamicLayer_InitializationFailed;
MyMap.Layers.Add(localDynamicLayer);
});
}
void localDynamicLayer_InitializationFailed(object sender, System.EventArgs e)
{
}
void localDynamicLayer_Initialized(object sender, System.EventArgs e)
{
}
CheersMike