Terjemahan disediakan oleh mesin penerjemah. Jika konten terjemahan yang diberikan bertentangan dengan versi bahasa Inggris aslinya, utamakan versi bahasa Inggris.
Posisi tidak terletak di jalan di Lokasi Amazon
Saat menggunakan CalculateRoute
atauCalculateRouteMatrix
, jika Anda menentukan posisi keberangkatan, tujuan, atau titik jalan yang tidak terletak di jalan Amazon Lokasi memindahkan posisi ke jalan terdekat.
CalculateRoute
Permintaan berikut menentukan posisi keberangkatan dan posisi tujuan yang tidak terletak di jalan:
POST /routes/v0/calculators/
ExampleCalculator
/calculate/route Content-type: application/json { "DeparturePosition": [-123.128014, 49.298472
], "DestinationPosition": [-123.134701, 49. 294315
] }
Respons yang dihasilkan mengembalikan posisi yang tersentak ke jalan terdekat:
{ "Legs": [ { "StartPosition": [
-123.12815, 49.29717
], "EndPosition": [-123.13375, 49.2926
], "Distance": 4.223, "DurationSeconds": 697, "Steps": [ { "StartPosition": [ -123.12815, 49.29717 ], "EndPosition": [ -123.12806, 49.29707 ], "Distance": 0.013, "DurationSeconds": 8 }, { "StartPosition": [ -123.12806, 49.29707 ], "EndPosition": [ -123.1288, 49.29659 ], "Distance": 0.082, "DurationSeconds": 36 }, { "StartPosition": [ -123.1288, 49.29659 ], "EndPosition": [ -123.12021, 49.29853 ], "Distance": 0.742, "DurationSeconds": 128 }, { "StartPosition": [ -123.12021, 49.29853 ], "EndPosition": [ -123.1201, 49.29959 ], "Distance": 0.131, "DurationSeconds": 26 }, { "StartPosition": [ -123.1201, 49.29959 ], "EndPosition": [ -123.13562, 49.30681 ], "Distance": 1.47, "DurationSeconds": 238 }, { "StartPosition": [ -123.13562, 49.30681 ], "EndPosition": [ -123.13693, 49.30615 ], "Distance": 0.121, "DurationSeconds": 28 }, { "StartPosition": [ -123.13693, 49.30615 ], "EndPosition": [ -123.13598, 49.29755 ], "Distance": 0.97, "DurationSeconds": 156 }, { "StartPosition": [ -123.13598, 49.29755 ], "EndPosition": [ -123.13688, 49.29717 ], "Distance": 0.085, "DurationSeconds": 15 }, { "StartPosition": [ -123.13688, 49.29717 ], "EndPosition": [ -123.13375, 49.2926 ], "Distance": 0.609, "DurationSeconds": 62 } ] } ], "Summary": { "RouteBBox": [ -123.13693, 49.2926, -123.1201, 49.30681 ], "DataSource": "Here", "Distance": 4.223, "DurationSeconds": 697, "DistanceUnit": "Kilometers" } }