本文整理汇总了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;
}
示例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;
}
示例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;
}
示例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;
}
示例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 ();
}
示例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;
}