private void mapService_Initialized(object sender, SmMapService.MapServiceInitalizeArgs e)
{
if (e.MapService.MapServiceUrl == this.Url.Trim())
{
if (base.Error != null)
{
base.Initialize();
}
else
{
this.Bounds = this.mapService.MapServiceInfo.MapBounds;
if (this.mapService.MapServiceInfo.CRS != null)
{
CRS = this.mapService.MapServiceInfo.CRS;
Dpi = ScaleHelper.GetSmDpi(this.mapService.MapServiceInfo.ReferViewBounds, this.mapService.MapServiceInfo.ReferViewer, this.mapService.MapServiceInfo.ReferScale, this.mapService.MapServiceInfo.CRS.Unit, this.mapService.MapServiceInfo.CRS.DatumAxis);
}
else if (CRS != null)
{
Dpi = ScaleHelper.GetSmDpi(this.mapService.MapServiceInfo.ReferViewBounds, this.mapService.MapServiceInfo.ReferViewer, this.mapService.MapServiceInfo.ReferScale, this.CRS.Unit, this.CRS.DatumAxis);
}
else
{
Dpi = ScaleHelper.GetSmDpi(this.mapService.MapServiceInfo.ReferViewBounds, this.mapService.MapServiceInfo.ReferViewer, this.mapService.MapServiceInfo.ReferScale);
}
Dpi *= AdjustFactor;
base.Initialize();
}
}
}