diff --git a/MapControl/Shared/WmtsTileLayer.cs b/MapControl/Shared/WmtsTileLayer.cs index 5bbb78de..e5bf723f 100644 --- a/MapControl/Shared/WmtsTileLayer.cs +++ b/MapControl/Shared/WmtsTileLayer.cs @@ -28,8 +28,8 @@ namespace MapControl public static readonly DependencyProperty CapabilitiesUriProperty = DependencyPropertyHelper.Register(nameof(CapabilitiesUri)); - public static readonly DependencyProperty TileUriTemplateProperty = - DependencyPropertyHelper.Register(nameof(TileUriTemplate)); + public static readonly DependencyProperty UriTemplateProperty = + DependencyPropertyHelper.Register(nameof(UriTemplate)); public static readonly DependencyProperty LayerProperty = DependencyPropertyHelper.Register(nameof(Layer)); @@ -55,10 +55,10 @@ namespace MapControl /// The Uri template string used for the UriTemplate property of WmtsTileSource instances. /// Usually set internally from WmtsCapabilities requested by a Loaded event handler. /// - public string TileUriTemplate + public string UriTemplate { - get => (string)GetValue(TileUriTemplateProperty); - set => SetValue(TileUriTemplateProperty, value); + get => (string)GetValue(UriTemplateProperty); + set => SetValue(UriTemplateProperty, value); } /// @@ -131,7 +131,7 @@ namespace MapControl } else if (UpdateChildLayers(tileMatrixSet)) { - var tileSource = new WmtsTileSource(tileMatrixSet, TileUriTemplate); + var tileSource = new WmtsTileSource(UriTemplate, tileMatrixSet); var cacheName = SourceName; if (!string.IsNullOrEmpty(cacheName)) @@ -226,7 +226,7 @@ namespace MapControl } Layer = capabilities.Layer; - TileUriTemplate = capabilities.UriTemplate; + UriTemplate = capabilities.UriTemplate; UpdateTileCollection(); } diff --git a/MapControl/Shared/WmtsTileSource.cs b/MapControl/Shared/WmtsTileSource.cs index dec386cc..8fd75e7d 100644 --- a/MapControl/Shared/WmtsTileSource.cs +++ b/MapControl/Shared/WmtsTileSource.cs @@ -8,10 +8,10 @@ namespace MapControl { private readonly IList tileMatrixes; - public WmtsTileSource(WmtsTileMatrixSet tileMatrixSet, string uriTemplate) + public WmtsTileSource(string uriTemplate, WmtsTileMatrixSet tileMatrixSet) { - tileMatrixes = tileMatrixSet.TileMatrixes; UriTemplate = uriTemplate.Replace("{TileMatrixSet}", tileMatrixSet.Identifier); + tileMatrixes = tileMatrixSet.TileMatrixes; } public override Uri GetUri(int zoomLevel, int column, int row)