Hi,
I have the same problem. Is this right approach?
in xaml
<esri:Editor x:Key="MyEditor" LayerIDs="ThreatAreas" />
..
<esri:Map x:Name="MyMap" Extent="245118,6111275,1884296,7671051" Loaded="MyMap_Loaded" WrapAround="True">
<esri:ArcGISLocalFeatureLayer ID="ThreatAreas" Path="C:\\...\map.mpk"
LayerName="ThreatAreas"
Editable="True"
AutoSave="False"
OutFields="*"
Mode="OnDemand"
DisableClientCaching="True" />
CODE:
private void MyMap_Loaded(object sender, RoutedEventArgs e)
{
LocalGeocodeService geoServ = new LocalGeocodeService("C:\\Data\\GISS\\Geodatabaser\\test\\ch_test2.mpk");
geoServ.StartCompleted += new EventHandler<System.ComponentModel.AsyncCompletedEventArgs>(geoServ_StartCompleted);
//geoServ.StartAsync();
geoServ.StartAsync(sl =>
{
geoServ.Name = "test";
....
});
}
void geoServ_StartCompleted(object sender, System.ComponentModel.AsyncCompletedEventArgs e)
{
if (e.Error != null)
{
MessageBox.Show("Failed " + e.Error);
return;
}
ESRI.ArcGIS.Client.Editor myEditor = LayoutRoot.Resources["MyEditor"] as ESRI.ArcGIS.Client.Editor;
myEditor.Map = MyMap;
}
I am geting ERROR:
{"Failed to create service ch_test22 GeocodeServer. Service failed to initialize: Error opening locator Error code: 500"}
[ESRI.ArcGIS.Client.Local.LocalServerException]: {"Failed to create service ch_test22 GeocodeServer. Service failed to initialize: Error opening locator Error code: 500"}
Data: {System.Collections.ListDictionaryInternal}
HelpLink: null
InnerException: null
Message: "Failed to create service ch_test22 GeocodeServer. Service failed to initialize: Error opening locator Error code: 500"
Source: null
StackTrace: null
TargetSite: null