mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-08 16:05:50 +00:00
C#14 field backed properties
This commit is contained in:
parent
5d390071c6
commit
be427c195a
20 changed files with 89 additions and 106 deletions
|
|
@ -4,22 +4,21 @@ namespace MapControl
|
|||
{
|
||||
public class UriTileSource : TileSource
|
||||
{
|
||||
private string uriTemplate;
|
||||
private string uriFormat;
|
||||
|
||||
public string UriTemplate
|
||||
{
|
||||
get => uriTemplate;
|
||||
get;
|
||||
set
|
||||
{
|
||||
uriTemplate = value;
|
||||
uriFormat = uriTemplate
|
||||
field = value;
|
||||
uriFormat = field
|
||||
.Replace("{z}", "{0}")
|
||||
.Replace("{x}", "{1}")
|
||||
.Replace("{y}", "{2}")
|
||||
.Replace("{s}", "{3}");
|
||||
|
||||
if (Subdomains == null && uriTemplate.Contains("{s}"))
|
||||
if (Subdomains == null && field.Contains("{s}"))
|
||||
{
|
||||
Subdomains = ["a", "b", "c"]; // default OpenStreetMap subdomains
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue