SuperMap.WindowsPhone.Mapping.TiledDynamicRESTLayer.mapService_Initialized C# (CSharp) Method

mapService_Initialized() private method

private mapService_Initialized ( ) : void
return void
        private void mapService_Initialized()
        {
            if (mapService.LastResult != null)
            {
                if (base.Error != null)
                {
                    base.Initialize();
                }
                else
                {
                    if (CRS == null)
                    {
                        CRS = new CoordinateReferenceSystem();
                        if (this.mapService.LastResult != null)
                        {
                            CRS.Unit = this.mapService.LastResult.CoordUnit;
                            if (mapService.LastResult.PrjCoordSys != null)
                            {
                                CRS.WKID = mapService.LastResult.PrjCoordSys.EpsgCode;
                                if (mapService.LastResult.PrjCoordSys.CoordSystem != null &&
                                    mapService.LastResult.PrjCoordSys.CoordSystem.Datum != null &&
                                    mapService.LastResult.PrjCoordSys.CoordSystem.Datum.Spheroid != null)
                                {
                                    CRS.DatumAxis = mapService.LastResult.PrjCoordSys.CoordSystem.Datum.Spheroid.Axis;
                                }
                            }
                        }
                    }
                    Bounds = this.mapService.LastResult.Bounds;
                    Dpi = ScaleHelper.GetSmDpi(this.mapService.LastResult.ViewBounds, this.mapService.LastResult.Viewer, this.mapService.LastResult.Scale, CRS);
                    Dpi *= AdjustFactor;
                    base.Initialize();
                }
            }
        }