Esempio n. 1
0
        static void Main()
        {
            MbTilesTileSource.SetPlatform(new SQLite.Net.Platform.Win32.SQLitePlatformWin32());

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new MbTilesForm());
        }
Esempio n. 2
0
        public static ILayer CreateLayer(ISQLitePlatform platform, string path)
        {
            MbTilesTileSource.SetPlatform(platform);
            var tileSource = new MbTilesTileSource(new SQLiteConnectionString(path, false));

            return(new TileLayer(tileSource)
            {
                Name = "MbTiles"
            });
        }
Esempio n. 3
0
        public void FetchTiles()
        {
            // arrange
            MbTilesTileSource.SetPlatform(new SQLitePlatformWin32());
            const string path       = ".\\Resources\\test.mbtiles";
            var          tileSource = new MbTilesTileSource(new SQLiteConnectionString(path, false));
            var          extent     = tileSource.Extent;
            var          tileInfos  = tileSource.Schema.GetTileInfos(extent, "1").ToList();

            // act
            var data = tileSource.GetTile(tileInfos.First());

            // assert
            Assert.True(data.Length > 0);
        }