Example #1
0
        // POST api/point
        public double[] Post(GeographicCoordinate position)
        {
            var engine = MapEngine.Engine.Instance;
            var point = engine.ResolvePoint(position);

            return new[] { point.Latitude, position.Longitude };
        }
Example #2
0
 private static GeoCoordinate ToGeoCoordinate(GeographicCoordinate geographicCoordinate)
 {
     var position = new GeoCoordinate(geographicCoordinate.Latitude, geographicCoordinate.Longitude);
     return position;
 }
Example #3
0
        public GeographicCoordinate ResolvePoint(GeographicCoordinate coordinate)
        {
            var position = ToGeoCoordinate(coordinate);
            var resolved = router.Resolve(VehicleEnum.Car, position).Location;

            return new GeographicCoordinate { Latitude = resolved.Latitude, Longitude = resolved.Longitude };
        }