add openhack files

This commit is contained in:
Ryan Peters
2022-11-03 16:41:13 -04:00
commit b2c9f7e29f
920 changed files with 118861 additions and 0 deletions

View File

@ -0,0 +1,20 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for details.
using CoreLocation;
using MapKit;
namespace MyDriving.iOS
{
public class BaseCustomAnnotation : MKAnnotation
{
readonly CLLocationCoordinate2D coordinate;
public BaseCustomAnnotation(CLLocationCoordinate2D annotationLocation)
{
coordinate = annotationLocation;
}
public override CLLocationCoordinate2D Coordinate => coordinate;
}
}

View File

@ -0,0 +1,18 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for details.
using CoreLocation;
using UIKit;
namespace MyDriving.iOS
{
public class CarAnnotation : BaseCustomAnnotation
{
public CarAnnotation(CLLocationCoordinate2D annotationLocation, UIColor color) : base(annotationLocation)
{
Color = color;
}
public UIColor Color { get; set; }
}
}

View File

@ -0,0 +1,34 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for details.
using CoreLocation;
using MyDriving.DataObjects;
namespace MyDriving.iOS
{
public class PoiAnnotation : BaseCustomAnnotation
{
public PoiAnnotation(POI pointOfInterest, CLLocationCoordinate2D coordinate) : base(coordinate)
{
PointOfInterest = pointOfInterest;
}
public POI PointOfInterest { get; set; }
public string Description
{
get
{
switch (PointOfInterest.POIType)
{
case POIType.HardAcceleration:
return "Hard Acceleration";
case POIType.HardBrake:
return "Hard Brake";
default:
return string.Empty;
}
}
}
}
}

View File

@ -0,0 +1,17 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for details.
using CoreLocation;
namespace MyDriving.iOS
{
public class WaypointAnnotation : BaseCustomAnnotation
{
public WaypointAnnotation(CLLocationCoordinate2D annotationLocation, string waypoint) : base(annotationLocation)
{
Waypoint = waypoint;
}
public string Waypoint { get; set; }
}
}