将自定义图块与 UWP MapControl 结合使用

use*_*509 5 c# xaml dictionary uwp

所以我试图显示一个本地存储在我的 UWP 应用程序中的自定义地图。目前,我的代码是:

MapZoomLevelRange range;
range.Min = 6;
range.Max = 8;
// Create a local data source.
LocalMapTileDataSource dataSource = new LocalMapTileDataSource("ms-appx:///MapTiles/{zoomlevel}/y{x}x{y}.png");
map.Center = new Geopoint(new BasicGeoposition() { Latitude = 5, Longitude = 5 });
// Create a tile source and add it to the Map control.
MapTileSource tileSource = new MapTileSource(dataSource);
tileSource.ZoomLevelRange = range;
map.TileSources.Add(tileSource);
tileSource.Layer = MapTileLayer.BackgroundReplacement;
map.Style = MapStyle.None;
map.ZoomLevel = 7;
Run Code Online (Sandbox Code Playgroud)

我遇到的小问题是没有出现地图。我如何告诉 MapControl:

-缩放级别不能大于 8 或小于 6。

- 对于比例 8,我最东南的瓷砖有 X=28 和 Y=39

- 对于比例 7,我最东南的瓷砖有 X=12 和 Y=20

- 对于比例 6,我最东南的瓷砖有 X=5 和 Y=6