Esempio n. 1
0
        public void RenderPointsWithDifferentSymbolTypes()
        {
            // arrange
            var map = CircleAndSquareSymbolSample.CreateMap();
            const string fileName = "vector_symbol_symboltype.png";

            // act
            var bitmap = new MapRenderer().RenderToBitmapStream(map.Viewport, map.Layers, map.BackColor);

            // aside
            File.WriteToGeneratedFolder(fileName, bitmap);

            // assert
            Assert.IsTrue(CompareBitmaps(File.ReadFromOriginalFolder(fileName), bitmap));
        }
Esempio n. 2
0
        public void RenderLine()
        {
            // arrange
            var map = LineSample.CreateMap();
            const string fileName = "line.png";

            // act
            var bitmap = new MapRenderer().RenderToBitmapStream(map.Viewport, map.Layers, map.BackColor);

            // aside
            File.WriteToGeneratedFolder(fileName, bitmap);

            // assert
            Assert.IsTrue(CompareBitmaps(File.ReadFromOriginalFolder(fileName), bitmap));
        }
Esempio n. 3
0
        public void RenderRotatedBitmapSymbolWithOffset()
        {
            // arrange
            var map = BitmapSymbolWithRotationAndOffsetSample.CreateMap();
            const string fileName = "bitmap_symbol.png";

            // act
            var bitmap = new MapRenderer().RenderToBitmapStream(map.Viewport, map.Layers, map.BackColor);

            // aside
            File.WriteToGeneratedFolder(fileName, bitmap);

            // assert
            Assert.IsTrue(CompareBitmaps(File.ReadFromOriginalFolder(fileName), bitmap, 1, 0.99));
        }
Esempio n. 4
0
        public void RenderSymbolWithWorldUnits()
        {
            // arrange
            var map = PointInWorldUnits.CreateMap();
            const string fileName = "vector_symbol_unittype.png";

            // act
            var bitmap = new MapRenderer().RenderToBitmapStream(map.Viewport, map.Layers, map.BackColor);

            // aside
            File.WriteToGeneratedFolder(fileName, bitmap);

            // assert
            Assert.IsTrue(CompareBitmaps(File.ReadFromOriginalFolder(fileName), bitmap));
        }
Esempio n. 5
0
 public MapControl()
 {
     renderer = new MapRenderer(this);
     map.Layers.Add(new TileLayer(new OsmTileSource()));
     
 }