コード例 #1
0
 public static Dictionary <string, Func <Map> > CreateList()
 {
     return(new Dictionary <string, Func <Map> >
     {
         ["OpenStreetMap"] = () => OsmSample.CreateMap(),
         ["Simple Points"] = () => PointsSample.CreateMap(),
         ["Simple LineStrings"] = () => LineStringSample.CreateMap(),
         ["Simple Polygons"] = () => PolygonSample.CreateMap(),
         ["Various"] = () => VariousSample.CreateMap(),
         ["Labels"] = () => LabelsSample.CreateMap(),
         ["Center on location"] = () => CenterOnLocationSample.CreateMap(),
         ["Projected point"] = () => ProjectionSample.CreateMap(),
         ["Stacked labels"] = () => StackedLabelsSample.CreateMap(),
         ["Symbols"] = () => SymbolsSample.CreateMap(),
         ["Info"] = () => InfoLayersSample.CreateMap(),
         ["MbTiles"] = () => MbTilesSample.CreateMap(),
         ["Animated point movement"] = () => AnimatedPointsSample.CreateMap(),
         ["TileSources: WMTS"] = () => WmtsSample.CreateMap(),
         ["TileSources: Bing maps"] = () => BingSample.CreateMap(),
         ["TileSources: TMS"] = () => TmsSample.CreateMap(),
         // todo: find a WMS-C that is stil in service ["TileSources: WMS-C"] = () => WmscSample.CreateMap(),
         ["TileSources: regular WMS"] = () => TiledWmsSample.CreateMap(),
         ["Rasterizing Layer"] = () => RasterizingLayerSample.CreateMap(),
         ["Empty Map"] = () => EmptyMapSample.CreateMap(),
         ["Mutating triangle"] = () => MutatingTriangleSample.CreateMap(),
         ["Symbols in World Units"] = () => SymbolsInWorldUnitsSample.CreateMap(),
     });
 }
コード例 #2
0
ファイル: AllSamples.cs プロジェクト: SimonGloesitsch/Mapsui
 public static Dictionary <string, Func <Map> > CreateList()
 {
     return(new Dictionary <string, Func <Map> >
     {
         ["OpenStreetMap"] = () => OsmSample.CreateMap(),
         ["Projected point"] = () => ProjectionSample.CreateMap(),
         ["Animated point movement"] = () => AnimatedPointsSample.CreateMap(),
         ["Stacked labels"] = () => StackedLabelsSample.CreateMap(),
         ["Info"] = () => InfoLayersSample.CreateMap(),
         ["Tiled request to WMS"] = () => TiledWmsSample.CreateMap(),
         ["TMS"] = () => TmsSample.CreateMap(),
         ["Bing maps"] = () => BingSample.CreateMap(),
         ["WMS-C"] = () => WmscSample.CreateMap(),
         ["Symbols in World Units"] = () => SymbolsInWorldUnitsSample.CreateMap(),
         ["WMTS"] = () => WmtsSample.CreateMap(),
         ["Labels"] = () => LabelsSample.CreateMap(),
         ["Rasterizing Layer"] = () => RasterizingLayerSample.CreateMap(),
         ["Polygons"] = () => PolygonSample.CreateMap(),
         ["LineStrings"] = () => LineStringSample.CreateMap(),
         ["Points"] = () => PointsSample.CreateMap(),
         ["Various Layers"] = () => VariousSample.CreateMap(),
         ["Empty Map"] = () => EmptyMapSample.CreateMap(),
         ["Mutating triangle"] = () => MutatingTriangleSample.CreateMap()
     });
 }
コード例 #3
0
        public void RenderProjection()
        {
            // arrange
            using var map = ProjectionSample.CreateMap();
            var          viewport = map.Extent !.Multiply(1.1).ToViewport(600);
            const string fileName = "projection.png";

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

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

            // assert
            Assert.IsTrue(CompareBitmaps(File.ReadFromOriginalFolder(fileName), bitmap, 1, 0.99));
        }