private TmsProvider ProviderFromEntry(imageryEntry entry) { if (entry.type != type.tms) { return(null); } var provider = new TmsProvider { Url = entry.url, Id = TmsProvider.GenerateId(entry.url), Projection = Api.Enums.TileProjection.SphericalMercator, Name = entry.name.Value, }; if (entry.bounds != null) { provider.Bounds = new Envelope((double)entry.bounds.minlon, (double)entry.bounds.maxlon, (double)entry.bounds.minlat, (double)entry.bounds.maxlat); provider.UseBounds = true; } return(provider); }
private void OnGenerateClick(object sender, EventArgs e) { txtId.Text = TmsProvider.GenerateId(txtUrl.Text).ToString(CultureInfo.InvariantCulture); }