Ejemplo n.º 1
0
                /// <summary>
                /// 获取指定级别的级别信息对象,不建议使用
                /// </summary>
                /// <param name="level">瓦片级别</param>
                /// <param name="ptr1">某EarthView::World::Spatial::CTileLevelInfo对象的首地址</param>
                /// <param name="dpiPerInch">每英寸的DPI数(默认为96,用于计算比例尺和分辨率)</param>
                /// <returns>指定级别的信息对象指针,不需释放</returns>
                public EarthView.World.Spatial.TileLevelInfo GetLevelInfo(int level, IntPtr ptr1, uint dpiPerInch)
                {
                    IntPtr __ptr = EarthView_World_Spatial_CTileReference_getLevelInfo_CTileLevelInfo_ev_int32_void_ev_uint32(this.NativeObject, level, ptr1, dpiPerInch);

                    if (__ptr == IntPtr.Zero)
                    {
                        return(null);
                    }
                    EarthView.World.Spatial.TileLevelInfo csObj = new EarthView.World.Spatial.TileLevelInfo(CreatedWhenConstruct.CWC_NotToCreate);
                    csObj.BindNativeObject(__ptr, "CTileLevelInfo");
                    IClassFactory csObjClassFactory = GlobalClassFactoryMap.Get(csObj.GetCppInstanceTypeName());

                    if (csObjClassFactory != null)
                    {
                        csObj.Delegate = true;
                        csObj          = csObjClassFactory.Create() as EarthView.World.Spatial.TileLevelInfo;
                        csObj.BindNativeObject(__ptr, "CTileLevelInfo");
                    }
                    return(csObj);
                }
                /// <summary>
                /// 获取所关联的TileLevelInfo
                /// </summary>
                /// <returns></returns>
                public EarthView.World.Spatial.TileLevelInfo GetTileLevelInfo()
                {
                    IntPtr __ptr = EarthView_World_Spatial_CTilesInfo_getTileLevelInfo_CTileLevelInfo(this.NativeObject);

                    if (__ptr == IntPtr.Zero)
                    {
                        return(null);
                    }
                    EarthView.World.Spatial.TileLevelInfo csObj = new EarthView.World.Spatial.TileLevelInfo(CreatedWhenConstruct.CWC_NotToCreate);
                    csObj.BindNativeObject(__ptr, "CTileLevelInfo");
                    csObj.Delegate = true;
                    IClassFactory csObjClassFactory = GlobalClassFactoryMap.Get(csObj.GetCppInstanceTypeName());

                    if (csObjClassFactory != null)
                    {
                        csObj.Delegate = true;
                        csObj          = csObjClassFactory.Create() as EarthView.World.Spatial.TileLevelInfo;
                        csObj.BindNativeObject(__ptr, "CTileLevelInfo");
                        csObj.Delegate = true;
                    }
                    return(csObj);
                }