2012-11-22 21:42:29 +01:00
|
|
|
|
// XAML Map Control - http://xamlmapcontrol.codeplex.com/
|
2016-02-23 20:07:30 +01:00
|
|
|
|
// © 2016 Clemens Fischer
|
2012-05-04 12:52:20 +02:00
|
|
|
|
// Licensed under the Microsoft Public License (Ms-PL)
|
|
|
|
|
|
|
2012-04-25 22:02:53 +02:00
|
|
|
|
using System.Collections.ObjectModel;
|
2012-11-22 21:42:29 +01:00
|
|
|
|
using System.Linq;
|
2012-04-25 22:02:53 +02:00
|
|
|
|
|
|
|
|
|
|
namespace MapControl
|
|
|
|
|
|
{
|
2014-12-17 21:38:28 +01:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// A collection of TileLayers with a string indexer that allows
|
|
|
|
|
|
/// to retrieve individual TileLayers by their SourceName property.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public class TileLayerCollection : Collection<TileLayer>
|
2012-04-25 22:02:53 +02:00
|
|
|
|
{
|
2012-11-22 21:42:29 +01:00
|
|
|
|
public TileLayer this[string sourceName]
|
|
|
|
|
|
{
|
|
|
|
|
|
get { return this.FirstOrDefault(t => t.SourceName == sourceName); }
|
|
|
|
|
|
}
|
2012-04-25 22:02:53 +02:00
|
|
|
|
}
|
|
|
|
|
|
}
|