Skip to content

Latest commit

 

History

History
82 lines (74 loc) · 1.69 KB

File metadata and controls

82 lines (74 loc) · 1.69 KB

Basic Tests

routes/compute Test

run this command in your terminal to test the compute routes functinality

curl -X POST http://localhost:2345/routes/compute   -H "Content-Type: application/json"   -d '{
  "locations": [
    {
      "poiId": "Q1087272",
      "lat": 37.982402,
      "lon": 23.739612
    },
    {
      "poiId": "Q1728667",
      "lat": 37.9763692,
      "lon": 23.7285966
    }
  ],
  "vehicle": "bike",
  "algorithm": "shortest",
  "format": "geojson"
}'
 {
  "name": "My Scenic Ride",
  "public": false,
  "vehicle": "bike",
  "poiSequence": [
    {
      "poiId": "Q1087272",
      "lat": 37.982402,
      "lon": 23.739612
    },
    {
      "poiId": "Q1728667",
      "lat": 37.9763692,
      "lon": 23.7285966
    }
  ],
  "geometry": {
    "type": "LineString",
    "coordinates": [
      [23.73949, 37.98228],
      [23.73927, 37.98241],
      [23.7391, 37.98231],
      [23.73868, 37.98283],
      [23.73829, 37.98333],
      [23.73781, 37.98388],
      [23.73508, 37.98252],
      [23.73482, 37.98238],
      [23.73373, 37.98185],
      [23.73244, 37.98118],
      [23.73229, 37.98111],
      [23.73196, 37.98149],
      [23.73022, 37.98058],
      [23.73019, 37.98058],
      [23.72726, 37.98106],
      [23.72698, 37.9799],
      [23.72614, 37.97671],
      [23.7261, 37.97672],
      [23.72608, 37.97666],
      [23.72599, 37.97651],
      [23.72595, 37.97638],
      [23.7268, 37.97627],
      [23.72748, 37.97612],
      [23.72757, 37.97652],
      [23.72845, 37.9764],
      [23.72845, 37.97639]
    ]
  },
  "encodedPolyline": "glyfFyr{oCYj@R`@gBrAcBlAmB~AnG`PZr@hBxEdC`GL\\kA`AtDzI?D_BhQfFv@|RfDAFJB\\PXFTiD\\gCoAQVoD@?",
  "ownerId": "string"
}