Files
win8phoneApp/CampusAppWP8/CampusAppWPortalLib8/Model/Campusmap/CBMainMapModel.cs
2013-09-05 10:52:38 +02:00

46 lines
1.5 KiB
C#

//-----------------------------------------------------------------------------
// <copyright file="CBMainMapModel.cs" company="BTU/IIT">
// Company copyright tag.
// </copyright>
// <author>fiedlchr</author>
// <sience>13.08.2013</sience>
//-----------------------------------------------------------------------------
using CampusAppWPortalLib8.Model.GeoDb;
using CampusAppWPortalLib8.Utility;
namespace CampusAppWPortalLib8.Model.Campusmap
{
/// <summary>
/// Class for the MapModel of the mainCampus of cottbus
/// </summary>
public class CBMainMapModel : MapModel
{
/// <summary>Variable for the identify of the campus.</summary>
private static readonly string Campus = "1";
/// <summary>
/// Initializes a new instance of the <see cref="CBMainMapModel" /> class.
/// </summary>
public CBMainMapModel(string xmlFilePath) : base(xmlFilePath)
{
}
/// <summary>Loads the spatial./.</summary>
/// <remarks>Stubbfel, 19.08.2013.</remarks>
protected override void LoadSpatials(string xmlFilePath)
{
SpsModel model = XmlManager.DeserializationFileToModel<SpsModel>(xmlFilePath);
this.Spatial = new SpsModel();
foreach (PlaceModel place in model.Places)
{
if (Campus.Equals(place.ParentId) || Campus.Equals(place.PlaceId))
{
this.Spatial.Places.Add(place);
}
}
}
}
}