コード例 #1
0
        public MapData(IOptions <PathOptions> pathOptions,
                       ILogger <MapData> logger,
                       ITileStorage tileStorage,
                       IGeoJsonStorage geoJsonStorage,
                       IStyleStorage styleStorage,
                       IPackStorage packStorage,
                       IFontStorage fontStorage,
                       IWorkspaceTileCache tileCache,
                       IWorkspaceStyleCache styleCache,
                       ILoggerFactory loggerFactory)
        {
            _layerDict   = new Dictionary <string, ILayer>();
            _pathOptions = pathOptions.Value;
            _logger      = logger;
            _logger.LogDebug($"Creating MapData root={_pathOptions.Root}");
            _loggerFactory = loggerFactory;

            _tileStorage    = tileStorage;
            _fontStorage    = fontStorage;
            _geoJsonStorage = geoJsonStorage;
            _styleStorage   = styleStorage;
            _packStorage    = packStorage;

            _tileCache  = tileCache;
            _styleCache = styleCache;

            CheckDirectories();
            PopulateFonts();
            OpenTiles();
        }
コード例 #2
0
ファイル: Layer.cs プロジェクト: gispeople/gruntimaps
 public Layer(string workspaceId, string layerId, IWorkspaceTileCache tileCache, IWorkspaceStyleCache styleCache, ILogger <Layer> logger)
 {
     Id          = layerId;
     WorkspaceId = workspaceId;
     _tileCache  = tileCache;
     _styleCache = styleCache;
     _logger     = logger;
     try
     {
         _connection = GetConnection(true);
         Source      = PopulateSourceInfo();
         Styles      = TryFetchLocalStyleInfo() ?? PopulateStyleInfo();
     }
     catch (Exception e)
     {
         throw new Exception("Could not create layer source object", e);
     }
 }