public void Setup() { _compositionRoot = TestHelper.GetCompositionRoot(TestHelper.WorldZeroPoint, (container, _) => container.Register(Component.For<IElevationProvider>().Use<FlatElevationProvider>())); _elementEditor = _compositionRoot.GetService<IElementEditor>(); _dataLoader = _compositionRoot.GetService<IMapDataLoader>(); _stylesheet = _compositionRoot.GetService<Stylesheet>(); _projection = _compositionRoot.GetService<IProjection>(); }
public ElementEditor(Stylesheet stylesheet, IPathResolver resolver) { _stylesheet = stylesheet; _resolver = resolver; }
/// <inheritdoc /> public void AddToStore(MapStorageType storageType, string dataPath, Stylesheet stylesheet, Range<int> levelOfDetails) { var dataPathResolved = _pathResolver.Resolve(dataPath); var stylesheetPathResolved = _pathResolver.Resolve(stylesheet.Path); Trace.Info(TraceCategory, String.Format("add to {0} storage: data:{1} style: {2}", storageType, dataPathResolved, stylesheetPathResolved)); string errorMsg = null; CoreLibrary.AddToStore(storageType, stylesheetPathResolved, dataPathResolved, levelOfDetails, error => errorMsg = error); if (errorMsg != null) throw new MapDataException(errorMsg); }