다음을 통해 공유


Azure Maps Route 1.0 API 마이그레이션

이 문서에서는 Azure Maps Route v1.0 API를 Azure Maps Route v2025-01-01 API로 마이그레이션하는 방법을 설명합니다. 다음 표에서는 Route v1.0 API 및 마이그레이션 옵션을 보여 줍니다.

Azure Maps 경로 v1.0 Azure Maps Route v2025-01-01 마이그레이션 옵션
경로 방향 가져오기  경로 설명 게시: 경로 설명 받기는 더 이상 지원되지 않습니다.
경로 안내 일괄 처리 가져오기  경로 방향 비동기 일괄 처리를 현재 사용할 수 없습니다. 대신 경로 지침 일괄 처리를 사용합니다.
우편 경로 지침  우편 경로 지침  
경로 방향 일괄 처리  경로 방향 일괄 처리 후: 경로 방향 비동기 일괄 처리를 현재 사용할 수 없습니다. 대신 동기화 일괄 처리를 사용합니다.
경로 경로 경로 게시 일괄 동기화  경로 방향 일괄 처리 
경로 매트릭스 가져오기  경로 작업 결과 가져오기: Route Matrix 비동기 호출의 결과를 가져오는 데 사용합니다.
경로 작업 상태 가져오기: 경로 행렬 비동기 호출의 상태를 가져오는 데 사용합니다.
우편 경로 매트릭스  포스트 경로 매트릭스 비동기 
경로 매트릭스 동기화 후  우편 경로 매트릭스 
경로 범위 가져오기  우편 경로 범위: 요청 GET는 더 이상 지원되지 않습니다.

주요 차이점

경로 방향의 주목할 만한 차이점

특징 v1.0 v2025-01-01
일괄 작업 동기화 및 비동기 요청 동기화 요청
좌표 형식 위도/경도 GeoJSON에서 정의한 경도/위도입니다.
전기 소비 모델 지원됨 지원되지 않음
지역화 "language" 매개 변수를 사용하여 경로 명령의 언어를 지역화합니다. "Accept-Language" 요청 헤더를 사용하여 지역화 코드를 입력하여 경로 명령의 언어를 지역화합니다.
요청 유형 가져오기, 게시 게시하기
응답 형식 XML, JSON 지오JSON
이동 모드 자동차, 트럭, 보행자.
베타 프로필: 버스, 자전거, 오토바이, 택시, 밴.
자동차, 트럭, 보행자.
웨이포인트 최적화 지원됨 현재는 트럭 라우팅에만 지원됩니다.
웨이포인트 지원됨 지원됨. 또한 운전 및 보행 모드에서 viaWaypoints 를 지원합니다.

경로 매트릭스 주목할 만한 차이점

특징 v1.0 v2025-01-01
좌표 형식 경도/위도 경도/위도
전기 소비 모델 지원됨 지원되지 않음
입력 좌표 입력 좌표에 GeoJSON MultiPoint 기능을 사용하지만 요청은 JSON에 있습니다. 유효한 GeoJSON MultiPoint 기하 도형 형식입니다.
행렬: 비동기 요청 최대 700개 셀 최대 50,000개의 셀
매트릭스: 동기 요청 최대 100 셀 최대 2,500개의 셀
응답 형식 JSON (자바스크립트 객체 표기법) GeoJSON(입력 및 응답)
이동 모드 자동차, 트럭, 보행자.
베타 프로필: 버스, 자전거, 오토바이, 택시, 밴.
자동차, 트럭, 보행자.

경로 범위 주목할 만한 차이점

특징 v1.0 v2025-01-01
좌표 형식 위도/경도 GeoJSON에서 정의한 경도/위도입니다.
전기 소비 모델 지원됨 지원되지 않음
요청 유형 가져오기, 게시 게시하기
응답 형식 XML, JSON GeoJSON(입력 및 응답)
이동 모드 자동차, 트럭.
베타 프로필: 버스, 오토바이, 택시, 밴
자동차, 트럭

트랜잭션 사용량

트랜잭션을 계산하는 방법에 대한 자세한 내용은 Azure Maps 트랜잭션 이해를 참조하세요.

경로 서비스 예제

이 섹션에서는 경로 방향, 경로 매트릭스 및 경로 범위 API에 대한 버전 1.0 및 2025-01-01 모두에 대한 예제 요청 및 응답을 제공합니다.

경로 방향 예제

Route Directions 버전 1.0 예제 요청

버전 1.0의 경로 방향 API는 HTTP GET 요청입니다. 모든 매개 변수는 쿼리 문자열 매개 변수로 전달됩니다.

https://atlas.microsoft.com/route/directions/json?api-version=1.0&query=52.50931,13.42936:52.50895,13.42904&subscription-key={Your-Azure-Maps-Subscription-key}

Route Directions 버전 2025-01-01 예제 요청

버전 2025-01-01의 경로 방향 API는 HTTP POST 요청입니다. 매개 변수는 API 호출에 쿼리 문자열 매개 변수로 포함할 수 있으며, GeoJSON 형식을 사용하여 요청 본문에 더 많은 매개 변수가 제공됩니다.

https://atlas.microsoft.com/route/directions/json?api-version=2025-01-01&subscription-key={Your-Azure-Maps-Subscription-key}

HTTP POST 요청 본문에 포함된 매개 변수는 GeoJSON으로 제공됩니다.

{ 
  "type": "FeatureCollection", 
  "features": [ 
    { 
      "type": "Feature", 
      "geometry": { 
        "coordinates": [ 
        13.42936,52.50931 
        ], 
        "type": "Point" 
      }, 
      "properties": { 
        "pointIndex": 0, 
        "pointType": "waypoint" 
      } 
    }, 
    { 
      "type": "Feature", 
      "geometry": { 
        "coordinates": [ 
         13.42904,52.50895 
        ], 
        "type": "Point" 
      }, 
      "properties": { 
        "pointIndex": 1, 
        "pointType": "waypoint" 
      } 
    } 
  ] 
} 

Route Directions 버전 1.0 응답 예제

{ 
  "formatVersion": "0.0.12", 
  "routes": [ 
    { 
      "summary": { 
        "lengthInMeters": 46, 
        "travelTimeInSeconds": 4, 
        "trafficDelayInSeconds": 0, 
        "trafficLengthInMeters": 0, 
        "departureTime": "2025-02-19T05:40:44+01:00", 
        "arrivalTime": "2025-02-19T05:40:47+01:00" 
      }, 
      "legs": [ 
        { 
          "summary": { 
            "lengthInMeters": 46, 
            "travelTimeInSeconds": 4, 
            "trafficDelayInSeconds": 0, 
            "trafficLengthInMeters": 0, 
            "departureTime": "2025-02-19T05:40:44+01:00", 
            "arrivalTime": "2025-02-19T05:40:47+01:00" 
          }, 
          "points": [ 
            { 
              "latitude": 52.50931, 
              "longitude": 13.42937 
            }, 
            { 
              "latitude": 52.50904, 
              "longitude": 13.42913 
            }, 
            { 
              "latitude": 52.50895, 
              "longitude": 13.42904 
            } 
          ]
        } 
      ], 
      "sections": [ 
        { 
          "startPointIndex": 0, 
          "endPointIndex": 2, 
          "sectionType": "TRAVEL_MODE", 
          "travelMode": "car" 
        } 
      ] 
    } 
  ] 
} 

Route Directions 버전 2025-01-01 응답 예제

{ 
  "type": "FeatureCollection", 
  "features": [ 
    { 
      "type": "Feature", 
      "geometry": { 
        "type": "Point", 
        "coordinates": [ 
          13.429368, 
          52.509303 
        ] 
      }, 
      "properties": { 
        "routePathPoint": { 
          "legIndex": 0, 
          "pointIndex": 0 
        }, 
        "order": { 
          "inputIndex": 0 
        }, 
        "type": "Waypoint" 
      } 
    }, 
    { 
      "type": "Feature", 
      "geometry": { 
        "type": "Point", 
        "coordinates": [ 
          13.429045, 
          52.50895 
        ] 
      }, 
      "properties": { 
        "routePathPoint": { 
          "legIndex": 0, 
          "pointIndex": 3 
        }, 
        "order": { 
          "inputIndex": 1 
        }, 
        "type": "Waypoint" 
      } 
    }, 
    { 
      "type": "Feature", 
      "geometry": { 
        "type": "MultiLineString", 
        "coordinates": [ 
          [ 
            [ 
              13.429368, 
              52.509302 
            ], 
            [ 
              13.429225, 
              52.509145 
            ], 
            [ 
              13.429128, 
              52.509038 
            ], 
            [ 
              13.429044, 
              52.50895 
            ] 
          ] 
        ], 
        "bbox": [ 
          13.429044, 
          52.50895, 
          13.429368, 
          52.509302 
        ] 
      }, 
      "properties": { 
        "resourceId": "v70,h822083589,i0,a0,cen-US,dAAAAAAAAAAA1,y0,s1,m1,o1,t0,wTMPwETFBSkDPa-wS1dsqQA2~~~~~~~~~~v12,wTKYKRiVBSkAIWoEhq9sqQA2~~~~~~~~~~v12,k1,qatt:1", 
        "trafficCongestion": "Heavy", 
        "trafficDataUsed": "None", 
        "distanceInMeters": 44, 
        "durationInSeconds": 3, 
        "departureAt": "2025-02-19T05:41:07+00:00", 
        "arrivalAt": "2025-02-19T05:41:10+00:00", 
        "type": "RoutePath", 
        "legs": [ 
          { 
            "distanceInMeters": 44, 
            "durationInSeconds": 3, 
            "departureAt": "2025-02-19T05:41:07+00:00", 
            "arrivalAt": "2025-02-19T05:41:10+00:00", 
            "routePathRange": { 
              "legIndex": 0, 
              "range": [ 
                0, 
                3 
              ] 
            }, 
            "description": "An der Schillingbrücke" 
          } 
        ] 
      } 
    } 
  ] 
} 

경로 매트릭스 예제

Route Matrix 버전 1.0 예제 요청

버전 1.0의 Post Route Matrix Sync API는 HTTP POST 요청입니다. 매개 변수는 GeoJSON 형식을 사용하여 쿼리 문자열 매개 변수 및 요청 본문으로 전달될 수 있습니다.

https://atlas.microsoft.com/route/matrix/sync/json?api-version=1.0&travelMode=car&subscription-key={Your-Azure-Maps-Subscription-key}

HTTP POST 요청 본문에 포함된 매개 변수는 JSON으로 제공됩니다.

{ 
  "origins": { 
    "type": "MultiPoint", 
    "coordinates": [ 
      [ 
        4.85106,
        52.36006 
      ], 
      [ 
        4.85056, 
        52.36187 
      ] 
    ] 
  }, 
  "destinations": { 
    "type": "MultiPoint", 
    "coordinates": [ 
      [ 
        4.85003, 
        52.36241 
      ] 
    ] 
  } 
} 

Route Matrix 버전 2025-01-01 예제 요청

버전 2025-01-01의 Route Matrix API는 HTTP POST 요청입니다. 매개 변수는 GeoJSON 형식을 사용하여 쿼리 문자열 매개 변수 및 요청 본문으로 전달됩니다.

https://atlas.microsoft.com/route/matrix/json?api-version=2025-01-01&subscription-key={Your-Azure-Maps-Subscription-key}

HTTP POST 요청 본문에 포함된 매개 변수는 GeoJSON으로 제공됩니다.

{ 
  "type": "FeatureCollection", 
  "features": [ 
    { 
      "type": "Feature", 
      "geometry": { 
        "type": "MultiPoint", 
        "coordinates": [ 
          [ 
            4.85106, 
            52.36006 
          ], 
          [ 
            4.85056, 
            52.36187 
          ] 
        ] 
      }, 
      "properties": { 
        "pointType": "origins" 
      } 
    }, 
    { 
      "type": "Feature", 
      "geometry": { 
        "type": "MultiPoint", 
        "coordinates": [ 
          [ 
            4.85003, 
            52.36241 
          ] 
        ] 
      }, 
      "properties": { 
        "pointType": "destinations" 
      } 
    } 
  ], 
  "travelmode":"driving" 
} 

Route Matrix 버전 1.0 응답 예제

{ 
  "formatVersion": "0.0.1", 
  "matrix": [ 
    [ 
      { 
        "statusCode": 200, 
        "response": { 
          "routeSummary": { 
            "lengthInMeters": 494, 
            "travelTimeInSeconds": 124, 
            "trafficDelayInSeconds": 0, 
            "trafficLengthInMeters": 0, 
            "departureTime": "2025-02-19T06:30:23+01:00", 
            "arrivalTime": "2025-02-19T06:32:27+01:00" 
          } 
        } 
      } 
    ], 
    [ 
      { 
        "statusCode": 200, 
        "response": { 
          "routeSummary": { 
            "lengthInMeters": 337, 
            "travelTimeInSeconds": 106, 
            "trafficDelayInSeconds": 0, 
            "trafficLengthInMeters": 0, 
            "departureTime": "2025-02-19T06:30:23+01:00", 
            "arrivalTime": "2025-02-19T06:32:08+01:00" 
          } 
        } 
      } 
    ] 
  ], 
  "summary": { 
    "successfulRoutes": 2, 
    "totalRoutes": 2 
  } 
} 

Route Matrix 버전 2025-01-01 응답 예제

{ 
  "type": "Feature", 
  "geometry": null, 
  "properties": { 
    "summary": { 
      "totalCount": 2, 
      "successfulCount": 2 
    }, 
    "matrix": [ 
      { 
        "statusCode": 200, 
        "originIndex": 0, 
        "destinationIndex": 0, 
        "durationTrafficInSeconds": 129, 
        "durationInSeconds": 129, 
        "distanceInMeters": 494 
      }, 
      { 
        "statusCode": 200, 
        "originIndex": 1, 
        "destinationIndex": 0, 
        "durationTrafficInSeconds": 110, 
        "durationInSeconds": 110, 
        "distanceInMeters": 338 
      } 
    ] 
  } 
} 

경로 범위 예제

경로 범위 버전 1.0 예제 요청

버전 1.0의 경로 범위 API는 HTTP GET 요청입니다. 모든 매개 변수는 쿼리 문자열 매개 변수로 전달됩니다.

https://atlas.microsoft.com/route/range/json?api-version=1.0&query=50.97452,5.86605&travelmode=car&distanceBudgetInMeters=15&subscription-key={Your-Azure-Maps-Subscription-key}

경로 범위 버전 2025-01-01 예제 요청

버전 2025-01-01의 경로 범위 API는 HTTP POST 요청입니다. 매개 변수는 API 호출에 쿼리 문자열 매개 변수로 포함할 수 있으며, GeoJSON 형식을 사용하여 요청 본문에 더 많은 매개 변수가 제공됩니다.

https://atlas.microsoft.com/route/range?api-version=2025-01-01&subscription-key={Your-Azure-Maps-Subscription-key}

HTTP POST 요청 본문에 포함된 매개 변수는 GeoJSON으로 제공됩니다.

{ 
    "type": "Feature", 
    "geometry": { 
        "type": "Point", 
        "coordinates": [ 
            5.86605,50.97452 
        ] 
    }, 
    "properties": { 
        "distanceBudgetInMeters": 15, 
        "travelMode": "driving" 
    } 
} 

경로 범위 버전 1.0 응답 예제

응답 결과는 간결함을 위해 요약됩니다.

{ 
  "formatVersion": "0.0.1", 
  "reachableRange": { 
    "center": { 
      "latitude": 50.97452, 
      "longitude": 5.86605 
    }, 
    "boundary": [ 
      { 
        "latitude": 50.97452, 
        "longitude": 5.86605
      }, 
      { 
        "latitude": 50.97452, 
        "longitude": 5.86605 
      }, 
      { 
        "latitude": 50.97452, 
        "longitude": 5.86605 
      }, 
      { 
        "latitude": 50.97452, 
        "longitude": 5.86605 
      } 
    ] 
  } 
} 

경로 범위 버전 2025-01-01 응답 예제

응답 결과는 간결함을 위해 요약됩니다.

{ 
  "type": "FeatureCollection", 
  "features": [ 
    { 
      "type": "Feature", 
      "geometry": { 
        "type": "Point", 
        "coordinates": [ 
          5.86605, 
          50.97452 
        ] 
      }, 
      "properties": { 
        "type": "center" 
      } 
    }, 
    { 
      "type": "Feature", 
      "geometry": { 
        "type": "Polygon", 
        "coordinates": [ 
          [ 
            [ 
              5.86605,50.97452 
            ], 
            [ 
              5.8659, 50.97454 
            ], 
            [ 
              5.86584, 50.9745 
            ], 
            [ 
              5.86588, 50.97448 
            ] 
          ] 
        ], 
        "bbox": [ 
          5.86584, 
          50.97447, 
          5.86626, 
          50.97454 
        ] 
      }, 
      "properties": { 
        "type": "boundary" 
      } 
    } 
  ] 
}