mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-05 14:37:01 +00:00
Simplified sample application, set default TileLayer in Map.Loaded handler.
This commit is contained in:
parent
bb3a9cf8c3
commit
f74f4bf404
4 changed files with 78 additions and 179 deletions
|
|
@ -108,6 +108,18 @@ namespace MapControl
|
|||
AddVisualChild(tileContainer);
|
||||
TileLayers = new TileLayerCollection();
|
||||
SetValue(ParentMapProperty, this);
|
||||
|
||||
Loaded += (o, e) =>
|
||||
{
|
||||
if (MainTileLayer == null)
|
||||
{
|
||||
MainTileLayer = new TileLayer
|
||||
{
|
||||
Description = "© {y} OpenStreetMap Contributors, CC-BY-SA",
|
||||
TileSource = new OpenStreetMapTileSource { UriFormat = "http://{c}.tile.openstreetmap.org/{z}/{x}/{y}.png" }
|
||||
};
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue