当前位置: 首页>>代码示例>>C#>>正文


C# Map.LoadMap方法代码示例

本文整理汇总了C#中Map.LoadMap方法的典型用法代码示例。如果您正苦于以下问题:C# Map.LoadMap方法的具体用法?C# Map.LoadMap怎么用?C# Map.LoadMap使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Map的用法示例。


在下文中一共展示了Map.LoadMap方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: LoadMap

        public static Map LoadMap(FileInfo location)
        {
            Map newMap = new Map();
            newMap.LoadMap(location);

            MapManager.CurrentMapLocation = location;
            return newMap;
        }
开发者ID:NullSoldier,项目名称:Griffin,代码行数:8,代码来源:MapManager.cs

示例2: MapnikVectorTileProvider

        public MapnikVectorTileProvider(string xmlConfig, Layer tileSource, int buffer, string pngOptions, string jpegOptions)
        {
            if (string.IsNullOrEmpty(xmlConfig))
            {
                throw new ArgumentNullException("MapnikVectorProvider xmlConfig cannot be null or empty");
            }

            if (tileSource == null )
            {
                throw new ArgumentNullException("MapnikVectorProvider tileSource cannot be null");
            }
            else
            {
                this._tileSource = tileSource;
            }

            // set jpegOptions
            if (jpegOptions == null)
            {
                this._jpegOptions = "jpeg";
            }
            else
            {
                this._jpegOptions = jpegOptions;
            }

            // set pngOptions
            if (pngOptions == null)
            {
                this._pngOptions = "png";
            }
            else
            {
                this._pngOptions = pngOptions;
            }

            this._map = new Map();
            _map.LoadMap(xmlConfig);
            this._map.Buffer = buffer;
        }
开发者ID:jbrwn,项目名称:tc,代码行数:40,代码来源:MapnikVectorTileProvider.cs

示例3: MapnikProvider

        public MapnikProvider(string xmlConfig, int buffer, string pngOptions, string jpegOptions, int gridLayerIndex, int gridResolution, List<string> gridFields, string compression)
        {
            if (string.IsNullOrEmpty(xmlConfig))
            {
                throw new ArgumentNullException("MapnikProvider xmlConfig cannot be null or empty");
            }

            // set jpegOptions
            if (jpegOptions == null)
            {
                this._jpegOptions = "jpeg";
            }
            else
            {
                this._jpegOptions = jpegOptions;
            }

            // set pngOptions
            if (pngOptions == null)
            {
                this._pngOptions = "png";
            }
            else
            {
                this._pngOptions = pngOptions;
            }

            // set gridLayerIndex
            this._gridLayerIndex = gridLayerIndex;

            // set gridResolution
            if (gridResolution == 0)
            {
                this._gridResolution = 4;
            }
            else
            {
                this._gridResolution = gridResolution;
            }

            // set gridFields
            if (gridFields == null)
            {
                this._gridFields = new List<string>();
            }
            else
            {
                this._gridFields = gridFields;
            }

            // set compression
            if (compression == null)
            {
                this._compression = "gzip";
            }
            else
            {
                this._compression = compression;
            }

            // create internal mapnik object
            this._map = new Map();
            _map.LoadMap(xmlConfig);
            this._map.Buffer = buffer;
        }
开发者ID:jbrwn,项目名称:tc,代码行数:65,代码来源:MapnikProvider.cs

示例4: LoadMap

 private void LoadMap()
 {
     _currentMap = new Map();
     _currentMap.LoadMap(openFileDialog.OpenFile());
     _currentMap.ContentBasePath = Path.GetDirectoryName(Path.GetDirectoryName(openFileDialog.FileName));
     _currentMap.LoadTexture(_currentMap.TexturePath);
     LoadTexturePanel();
     pbMap.Width = _currentMap.ContentMap.MapWidthInPixels;
     pbMap.Height = _currentMap.ContentMap.MapHeightInPixels;
     DrawMap();
     tsbHideBaseLayer.Enabled = true;
     tsbHideSecondBaseLayer.Enabled = true;
     tsbHideFringeLayer.Enabled = true;
     tsbHideObjectLayer.Enabled = true;
     toolStripDropDownButton1.Enabled = true;
 }
开发者ID:stevemanderson,项目名称:azureacres,代码行数:16,代码来源:MainForm.cs

示例5: Start

	// Use this for initialization
	void Start () {
		//Debug.Log (Application.persistentDataPath); C:/Users/Guillermo/AppData/LocalLow/DefaultCompany/Advance Wars 2
		map = new Map ();
		map.LoadMap ();
	}
开发者ID:joordimp,项目名称:AdvanceWars,代码行数:6,代码来源:GameManager.cs

示例6: LoadMap

        ///<summary>
        ///sets up the game environment from map file
        ///</summary>
        ///<param name="filename"></param>
        ///<returns></returns>
        public bool LoadMap(string filename)
        {
            //clear any current bots and projectiles
            Clear();

            _map = new Map();

            //make sure the entity manager is reset
            EntityManager.Instance.Reset();

            //load the new map data
            if (_map.LoadMap(filename, out _mapData))
            {
                _pathManager =
                    new PathManager(
                        Parameters.MaxSearchCyclesPerUpdateStep);

                AddBots(Parameters.NumBots);

                return true;
            }

            return false;
        }
开发者ID:funkjunky,项目名称:Raven,代码行数:29,代码来源:old_GameManager.cs


注:本文中的Map.LoadMap方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。