mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2025-12-06 07:12:04 +01:00
39 lines
993 B
C#
39 lines
993 B
C#
// XAML Map Control - http://xamlmapcontrol.codeplex.com/
|
|
// © 2015 Clemens Fischer
|
|
// Licensed under the Microsoft Public License (Ms-PL)
|
|
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Collections.ObjectModel;
|
|
using System.Linq;
|
|
|
|
namespace MapControl
|
|
{
|
|
/// <summary>
|
|
/// A collection of geographic locations.
|
|
/// </summary>
|
|
public partial class LocationCollection : ObservableCollection<Location>
|
|
{
|
|
public LocationCollection()
|
|
{
|
|
}
|
|
|
|
public LocationCollection(IEnumerable<Location> locations)
|
|
: base(locations)
|
|
{
|
|
}
|
|
|
|
public LocationCollection(List<Location> 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)));
|
|
}
|
|
}
|
|
}
|