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>();
 }
예제 #2
0
 public ElementEditor(Stylesheet stylesheet, IPathResolver resolver)
 {
     _stylesheet = stylesheet;
     _resolver = resolver;
 }
예제 #3
0
        /// <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);
        }