/// <inheritdoc /> public void Configure(IConfigSection configSection) { _dataDirectory = configSection.GetString(@"data/elevation/local", null); _srtmSchemaPath = configSection.GetString(@"data/elevation/remote.schema", null); _srtmServer = configSection.GetString(@"data/elevation/remote.server", @"http://dds.cr.usgs.gov/srtm/version2_1/SRTM3"); _downloader = new SrtmDownloader(_srtmServer, _srtmSchemaPath, _fileSystemService, _trace); }
/// <inheritdoc /> public void Configure(IConfigSection configSection) { _dataDirectory = configSection.GetString(@"data/elevation/local", null); _srtmSchemaPath = configSection.GetString(@"data/elevation/remote.schema", null); _srtmServer = configSection.GetString(@"data/elevation/remote.server", @"http://dds.cr.usgs.gov/srtm/version2_1/SRTM3"); _downloader = new SrtmDownloader(_srtmServer, _srtmSchemaPath, _fileSystemService, _networkService, _trace); }
/// <inheritdoc /> public override void Configure(IConfigSection configSection) { _mapDataServerUri = configSection.GetString(@"data/osm/server", null); _mapDataServerQuery = configSection.GetString(@"data/osm/query", null); _mapDataFormatExtension = "." + configSection.GetString(@"data/osm/format", "xml"); _cachePath = configSection.GetString(@"data/cache", null); }
/// <inheritdoc /> public void Configure(IConfigSection configSection) { _mapDataServerUri = configSection.GetString(@"data/mapzen/ele_server", null); _mapDataApiKey = configSection.GetString(@"data/mapzen/api_key", null); _mapDataFormatExtension = "." + configSection.GetString(@"data/mapzen/ele_format", "ele"); _eleGrid = configSection.GetInt(@"data/mapzen/ele_grid", 10); _cachePath = configSection.GetString(@"data/cache", null); }
/// <inheritdoc /> public void Configure(IConfigSection configSection) { _mapDataServerUri = configSection.GetString(@"data/mapzen/server", null); _mapDataFormatExtension = "." + configSection.GetString(@"data/mapzen/format", "json"); _mapDataApiKey = configSection.GetString(@"data/mapzen/apikey", null); _mapDataLayers = configSection.GetString(@"data/mapzen/layers", null); _cachePath = configSection.GetString(@"data/cache", null); }
/// <inheritdoc /> public void Configure(IConfigSection configSection) { _mapDataServerUri = configSection.GetString(@"data/mapzen/ele_server"); _mapDataApiKey = configSection.GetString(@"data/mapzen/api_key"); _mapDataFormatExtension = "." + configSection.GetString(@"data/mapzen/ele_format", "ele"); // TODO this parameter depends on height data precision and tile size _eleGrid = configSection.GetInt(@"data/mapzen/ele_grid", 10); _elePath = configSection.GetString(@"data/elevation/local", null); }
/// <inheritdoc /> public void Configure(IConfigSection configSection) { var stringPath = _pathResolver.Resolve(configSection.GetString("data/index/strings")); var mapDataPath = _pathResolver.Resolve(configSection.GetString("data/index/spatial")); var elePath = _pathResolver.Resolve(configSection.GetString("data/elevation/local")); string errorMsg = null; CoreLibrary.Configure(stringPath, mapDataPath, elePath, error => errorMsg = error); if (errorMsg != null) { throw new MapDataException(errorMsg); } }
/// <inheritdoc /> public void Configure(IConfigSection configSection) { _mapDataLoader.Configure(configSection); var stringPath = _pathResolver.Resolve(configSection.GetString("data/index/strings")); var mapDataPath = _pathResolver.Resolve(configSection.GetString("data/index/spatial")); _mapDataStorageType = MapDataStorageType.Persistent; string errorMsg = CoreLibrary.Configure(stringPath, mapDataPath); if (!String.IsNullOrEmpty(errorMsg)) { throw new MapDataException(errorMsg); } }
/// <inheritdoc /> public void Configure(IConfigSection configSection) { _mapDataServerUri = configSection.GetString(@"remote.server", null); _mapDataServerQuery = configSection.GetString(@"remote.query", null); _mapDataFormat = configSection.GetString(@"remote.format", "xml"); _indexSettingsPath = configSection.GetString(@"index.settings", null); _tree = new RTree <TreeNode>(); var rootFolder = configSection.GetString("local", null); if (!String.IsNullOrEmpty(rootFolder)) { SearchAndReadMapIndexHeaders(_pathResolver.Resolve(rootFolder)); // create cache directory _cachePath = Path.Combine(rootFolder, ".cache"); _fileSystemService.CreateDirectory(_cachePath); } }
/// <inheritdoc /> public void Configure(IConfigSection configSection) { _tileSize = configSection.GetFloat("size", 500); _offset = configSection.GetFloat("offset", 50); _moveSensitivity = configSection.GetFloat("sensitivity", 10); var renderModeString = configSection.GetString("render_mode", "scene").ToLower(); _renderMode = renderModeString == "scene" ? RenderMode.Scene : RenderMode.Overview; var viewportConfig = configSection.GetSection("viewport"); var width = viewportConfig != null?viewportConfig.GetFloat("w", 0) : 0; var height = viewportConfig != null?viewportConfig.GetFloat("h", 0) : 0; _viewport = new Rectangle2d(0, 0, width, height); RecalculateOverviewTileCount(); _thresholdDistance = Math.Sqrt(2) * _tileSize; }
/// <inheritdoc /> public void Configure(IConfigSection configSection) { _mapDataServerUri = configSection.GetString(@"data/remote/server", null); _mapDataServerQuery = configSection.GetString(@"data/remote/query", null); _mapDataFormatExtension = "." + configSection.GetString(@"data/remote/format", "xml"); _cachePath = configSection.GetString(@"data/cache", null); var stringPath = _pathResolver.Resolve(configSection.GetString("data/index/strings")); var mapDataPath = _pathResolver.Resolve(configSection.GetString("data/index/spatial")); var elePath = _pathResolver.Resolve(configSection.GetString("data/elevation/local")); string errorMsg = null; CoreLibrary.Configure(stringPath, mapDataPath, elePath, error => errorMsg = error); if (errorMsg != null) { throw new MapDataException(errorMsg); } }
/// <inheritdoc /> public void Configure(IConfigSection configSection) { _searchPath = configSection.GetString("geocoding", DefaultServer); }
/// <inheritdoc /> public void Configure(IConfigSection configSection) { _server = configSection.GetString(@"data/srtm/server"); _schemaPath = configSection.GetString(@"data/srtm/schema"); _elePath = configSection.GetString(@"data/elevation/local"); }
/// <inheritdoc /> public void Configure(IConfigSection configSection) { _path = configSection.GetString(PathKey, null); _isSandbox = configSection.GetBool(SandboxKey, false); _stylesheet = null; }
/// <inheritdoc /> public void Configure(IConfigSection configSection) { _mapDataServerUri = configSection.GetString(@"data/remote/server", null); _mapDataServerQuery = configSection.GetString(@"data/remote/query", null); _mapDataFormatExtension = "." + configSection.GetString(@"data/remote/format", "xml"); _cachePath = configSection.GetString(@"data/cache", null); var stringPath = _pathResolver.Resolve(configSection.GetString("data/index/strings")); var mapDataPath = _pathResolver.Resolve(configSection.GetString("data/index/spatial")); var elePath = _pathResolver.Resolve(configSection.GetString("data/elevation/local")); string errorMsg = null; CoreLibrary.Configure(stringPath, mapDataPath, elePath, error => errorMsg = error); if (errorMsg != null) throw new MapDataException(errorMsg); }
/// <inheritdoc /> public void Configure(IConfigSection configSection) { _cachePath = configSection.GetString(@"data/cache", null); }
public void CanReadStringValue() { var value = _stubSection.GetString("string", null); Assert.AreEqual("string_value", value); }
/// <inheritdoc /> public void Configure(IConfigSection configSection) { _mapDataLibrary.Configure(configSection.GetString("data/index")); }
/// <inheritdoc /> public void Configure(IConfigSection configSection) { _indexSettingsPath = configSection.GetString("index.settings", null); _indexRootFolder = configSection.GetString("local", null); }
/// <inheritdoc /> public void Configure(IConfigSection configSection) { _mapDataLibrary.Configure(configSection.GetString("data/index")); _mapDataStorageType = MapDataStorageType.Persistent; }