POST

/v1/directions

Route between pointsمسار بين نقاط

Polyline, distance, duration, and maneuvers. Costing is auto, bicycle, pedestrian, or truck.خط المسار والمسافة والمدة والتعليمات. نوع الحركة: auto أو bicycle أو pedestrian أو truck.

Parametersالمعاملات

Nameالاسم Inالموضع Requiredمطلوب Detailالوصف
locations body جسم yesنعم At least two {lat, lng} points. نقطتان على الأقل بصيغة {lat, lng}.
costing body جسم noلا auto, bicycle, pedestrian, or truck. auto أو bicycle أو pedestrian أو truck.
alternates body جسم noلا 0 to 3 extra routes. من 0 إلى 3 مسارات إضافية.

Exampleمثال

curl -X POST "https://maps.example.com/v1/directions" \
  -H "X-API-Key: YOUR_KEY" -H "Content-Type: application/json" \
  -d '{"locations":[{"lat":30.044,"lng":31.235},{"lat":30.062,"lng":31.249}],"costing":"auto"}'