コード例 #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 };
        }
コード例 #2
0
ファイル: Engine.cs プロジェクト: kwilson/OsmSharpTests
 private static GeoCoordinate ToGeoCoordinate(GeographicCoordinate geographicCoordinate)
 {
     var position = new GeoCoordinate(geographicCoordinate.Latitude, geographicCoordinate.Longitude);
     return position;
 }
コード例 #3
0
ファイル: Engine.cs プロジェクト: kwilson/OsmSharpTests
        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 };
        }