// XAML Map Control - http://xamlmapcontrol.codeplex.com/
// Copyright © Clemens Fischer 2012-2013
// Licensed under the Microsoft Public License (Ms-PL)
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
namespace MapControl
{
///
/// A collection of geographic locations.
///
public partial class LocationCollection : ObservableCollection
{
public LocationCollection()
{
}
public LocationCollection(IEnumerable locations)
: base(locations)
{
}
public LocationCollection(List locations)
: base(locations)
{
}
public static LocationCollection Parse(string s)
{
var strings = s.Split(new char[] { ' ', ';' }, StringSplitOptions.RemoveEmptyEntries);
return new LocationCollection(strings.Select(l => Location.Parse(l)));
}
}
}