add openhack files
This commit is contained in:
@ -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;
|
||||
}
|
||||
}
|
@ -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; }
|
||||
}
|
||||
}
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -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; }
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user