Yale,
at this stage, MS3 crashes randomly for different reasons.
I mean with WMK the crash is systematic.
Here is my code:
DecorsOverlay.Lock.EnterWriteLock();
try
{
RenderMap renderMaps = new RenderMap(WorldKitUtil.FullDataPath);
renderMaps.LoadLayers(DecorsOverlay.Layers, DecorsOverlay.Layers); // I’ve done no change on the provided method that I get from you in february
foreach (FeatureLayer l in DecorsOverlay.Layers)
l.FeatureSource.Projection = ProjectionHelper.GetProjection(ProjectionEnum.WGS84, ActiveProjection);
DecorsOverlay.IsVisible = true;
}
finally
{
DecorsOverlay.Lock.ExitWriteLock();
}
m_MainMap.Refresh();
The crash occurs in the refresh.
ProjectionHelper.GetProjection()
{
Proj = new Proj4Projection(
Proj4Projection.GetEpsgParametersString(4326),
GetExternalProjectionMSBugFixed());
Proj.Open();
return Proj;
}
GetExternalProjectionMSBugFixed()
{
if (IntPtr.Size == 4)
return “+proj=lcc+lat_1=46.8+lat_0=46.8+lon_0=2.3372291666985+k_0=0.99987742+x_0=600000+y_0=200000+a=6378249.2+b=6356515+towgs84=-168,-60,320,0,0,0,0+pm=paris+units=m+no_defs”;
else
return “+proj=lcc+lat_1=46.8+lat_0=46.8+lon_0=0+k_0=0.99987742+x_0=600000+y_0=200000+a=6378249.2+b=6356515+towgs84=-168,-60,320,0,0,0,0+pm=paris+units=m+no_defs”;
}
Patrick.