public BruTileCustomLayer(IApplication application, TileSource tileSource, FileCache fileCache) { _tileSource = tileSource; _fileCache = fileCache; _simplefilefetcher = new SimpleFileFetcher(tileSource, fileCache); var spatialReferences = new SpatialReferences(); _dataSpatialReference = spatialReferences.GetSpatialReference(_tileSource.Schema.Srs); if (SpatialReference.FactoryCode == 0) { // zet dan de spatial ref... m_spatialRef = _dataSpatialReference; } var mxdoc = (IMxDocument)application.Document; _map = mxdoc.FocusMap; var envelope = GetDefaultEnvelope(); // If there is only one layer in the TOC zoom to this layer... if (_map.LayerCount == 0) { ((IActiveView)_map).Extent = envelope; } }
public BruTileCustomLayer(IApplication application, TileSource tileSource, FileCache fileCache) { _tileSource = tileSource; _fileCache = fileCache; _simplefilefetcher = new SimpleFileFetcher(tileSource, fileCache); var spatialReferences = new SpatialReferences(); _dataSpatialReference = spatialReferences.GetSpatialReference(_tileSource.Schema.Srs); if (SpatialReference.FactoryCode == 0) { // zet dan de spatial ref... m_spatialRef = _dataSpatialReference; } var mxdoc = (IMxDocument)application.Document; _map = mxdoc.FocusMap; var envelope = GetDefaultEnvelope(); // If there is only one layer in the TOC zoom to this layer... if (_map.LayerCount == 0) { ((IActiveView)_map).Extent = envelope; } }