다음을 통해 공유


Bing Maps 트럭 경로 계산 API를 마이그레이션하십시오

이 문서에서는 Bing Maps Calculate a Truck Route API를 Azure Maps 경로 방향 API로 마이그레이션하는 방법을 설명합니다. Azure Maps 경로 방향 API는 현지 법률, 차량 차원, 화물 유형, 최대 속도, 교량 및 터널 높이를 고려하여 트럭 특정 경로를 계산하고 복잡한 기동과 어려운 도로를 피하면서 자동차(운전), 상용 트럭 및 도보 경로의 출발지와 목적지 사이의 이상적인 경로를 반환합니다. Azure Maps 경로 방향 API에서 트럭 라우팅을 받으려면 요청에서 입력 매개 변수에 대한 travelMode 지정합니다.

필수 조건

주요 차이점

  • Bing Maps 트럭 경로 계산은 트럭 라우팅 전용 독립 실행형 API입니다. Azure Maps 경로 방향 API는 요청에 지정된 경우 travelMode=truck 트럭 라우팅 지원을 제공합니다.
  • Bing Maps 트럭 경로 계산 API는 GET 또는 POST 요청을 지원합니다. Azure Maps 경로 방향 API는 POST 요청을 지원합니다.
  • Bing Maps 트럭 경로 계산 API는 XML 및 JSON 응답 형식을 지원합니다. Azure Maps 경로 방향 API는 GeoJSON 응답 형식을 지원합니다.
  • Bing Maps Calculate a Truck Route API는 요청당 최대 25개의 웨이포인트 또는 viaWaypoints를 지원합니다. Azure Maps 경로 방향 API는 요청당 최대 150개의 웨이포인트를 지원하지만 viaWaypoints는 지원하지 않습니다.
  • 엔터프라이즈용 Bing Maps와 달리 Azure Maps는 지리적 범위 지정을 지원하는 글로벌 서비스로, 유럽(EU) 또는 미국(미국) 지리적 영역(지역)에 대한 데이터 보존 제한을 허용합니다. 모든 요청(입력 데이터 포함)은 지정된 지리적 영역에서만 처리됩니다. 자세한 내용은 지리적 범위를 참조하세요.

보안 및 인증

엔터프라이즈용 Bing Maps는 API 키 인증만 지원합니다. Azure Maps는 구독 키, Microsoft Entra ID, SAS(공유 액세스 서명) 토큰 등 API 호출을 인증하는 다양한 방법을 지원합니다. Azure Maps의 보안 및 인증에 대한 자세한 내용은 Azure Maps를 사용한 인증 및 Azure Maps 경로 방향 설명서의 보안 섹션 을 참조하세요.

요청 매개 변수

다음 표에서는 Bing Maps 에서 트럭 경로 요청 매개 변수를 계산 하고 Azure Maps에 해당하는 매개 변수를 나열합니다.

Bing Maps 요청 매개 변수 Bing Maps 요청 매개 변수 별칭 Azure Maps 요청 매개 변수 Azure Maps에 필요 Azure Maps 데이터 형식 설명
피하다 피하다 거짓 문자열 지원되는 경우 Bing Maps에서 Azure Maps 경로 방향 API 회피와 동등한 기능은 다음과 같습니다.

- 통행료: tollRoads
- 페리: 페리들
- borderCrossings: 국경 횡단
- 고속도로: 제한 접근 고속도로
- minimizeDrivingSideTurn: 지원되지 않음
- 운전 측면 전환 최소화: 지원되지 않습니다
- minimizeUTurn: 지원되지 않음
- minimizeTolls: 지원되지 않음
- minimizeHighways: 지원되지 않음
국경 제한 지원되지 않음 지원되지 않음 지원되지 않음 Azure Maps 경로 방향 API에서 avoid=borderCrossings 를 사용하여 국경을 넘어가는 경로를 제한할 수 있지만 국경 제한에 대한 지역 목록을 지정하는 것은 지원되지 않습니다. 
날짜시간 dt departAt 거짓 문자열 Azure Maps 경로 방향 API는 원하는 도착 날짜 및 시간을 지정하는 데 사용되는 매개 변수도 지원 arriveAt 합니다. 와 함께 departAt사용할 수 없습니다. 
dimensionUnit 어둡게 하다 지원되지 않음 지원되지 않음 지원되지 않음 Azure Maps 경로 방향 API에서 트럭 높이, 너비 및 길이 차원의 단위는 미터입니다. 
거리 단위 지원되지 않음 지원되지 않음 지원되지 않음 Azure Maps 경로 방향 API에서 거리 단위는 미터입니다.  
첫 번째 회전 전 거리 dbft 지원되지 않음 지원되지 않음 지원되지 않음
제목 고화질 제목 거짓 정수
최적화 optmz 경로 최적화 거짓 문자열 다음은 Bing Maps 트럭 경로 계산 API를 Azure Maps 경로 방향 API로 변환한 optimizeRoute 등가물입니다.

- 시간: 교통체증 없는 가장 빠른 시간
- 교통 상황 포함 시간: 교통 상황 포함 최단 시간

또한 Azure Maps 경로 방향 API는 가장 짧은 경로를 입력 값으로 지정하여 가장 짧은 경로를 반환하도록 거리별 경로 최적화를 optimizeRoute 지원합니다. 
경로 최적화 optWp 경유지 순서 최적화 거짓 불리언
routeAttributes ra(ra) 경로출력옵션 거짓 문자열 다음은 Azure Maps 경로 방향 API routeOutputOptions 에 해당하는 Bing Maps입니다.

- 경로: routePath
- regionTravelSummary: 지역 여행 요약

Azure Maps 경로 방향 API는 다음과 같은 itineraryrouteSummary추가 값을 지원합니다. 자세한 내용은 RouteOutputOption을 참조하세요. 
공차 tl 지원되지 않음 지원되지 않음 지원되지 않음
viawaypoint.n vwp.n 지원되지 않음 지원되지 않음 지원되지 않음
차량 높이 높이 높이 거짓 숫자
차량폭 너비 너비 거짓 숫자
차량길이 vl 길이 거짓 숫자
차량 무게 무게 무게 거짓 정수
차량축 차축 지원되지 않음 지원되지 않음 지원되지 않음 Azure Maps 경로 방향 API는 매개 변수 axleWeight를 사용하여 지정할 수 있는 축당 가중치 제한을 지원합니다. 
차량용 트레일러 vt 지원되지 않음 지원되지 않음 지원되지 않음 트레일러 길이는 제한 사항으로 간주될 차량 길이에 추가할 수 있습니다. 
vehicleSemi 지원되지 않음 지원되지 않음 지원되지 않음 세미 트럭은 일반적으로 상용 차량 범주에 속합니다. Azure Maps 경로 방향 API는 isVehicleCommercial 세미 트럭에 사용할 수 있는 속성을 지원합니다. 
차량 최대 경사도 vmg 지원되지 않음 지원되지 않음 지원되지 않음
차량최소회전반경 vmtr 지원되지 않음 지원되지 않음 지원되지 않음
차량 위험 물질 vhm 로드 유형 거짓 문자열 Azure Maps 경로 방향 API의 차량 적재 유형에 대해 미국 Hazmat 클래스 1-9를 참조하고, Bing Maps에서 트럭 경로 API 계산 시 위험 물질에 대한 화물 유형의 일반적인 분류를 참조하세요. 
차량위험물허가증 Vhp 지원되지 않음 지원되지 않음 지원되지 않음
waypoint.n wp.n 기능 InputWaypointFeaturesItem[] 진실 GeoJSON 지점
무게 단위 지원되지 않음 지원되지 않음 지원되지 않음 Azure Maps 경로 방향 API에서 무게 단위는 킬로그램(kg)입니다.

Azure Maps 경로 방향 API 요청 매개 변수에 대한 자세한 내용은 URI 매개 변수를 참조하세요.

요청 예제

Bing Maps 는 트럭 경로 API POST 요청을 계산합니다.

https://dev.virtualearth.net/REST/v1/Routes/Truck?key={Your-Bing-Maps-Key}

요청 본문에 포함됩니다.

{
    "waypoints": [{ 
        "latitude": 47.610133,
        "longitude": -122.201478
    },{ 
        "latitude": 47.610096,
        "longitude": -122.192463
    }],
    "vehicleSpec": {
        "vehicleHazardousMaterials": "Flammable"
    }
}

Azure Maps 경로 방향 API POST 요청:

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

요청 본문에 포함됩니다.

{
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "geometry": {
        "coordinates": [
            -122.201478, 47.610133 
        ],
        "type": "Point"
      },
      "properties": {
        "pointIndex": "0",
        "pointType": "waypoint"
      }
    },
    {
      "type": "Feature",
      "geometry": {
        "coordinates": [
            -122.192463, 47.610096
        ],
        "type": "Point"
      },
      "properties": {
        "pointIndex": "1",
        "pointType": "waypoint"
      }
    }
  ],
  "RouteOutputOptions": [
      "itinerary"
  ],
  "travelMode": "truck",
  "vehicleSpec": {
    "loadType": [
        "USHazmatClass3",
        "USHazmatClass4"
        ]
    }
}

응답 필드

다음 표에서는 Bing Maps 트럭 경로 계산 요청을 실행할 때 HTTP 응답에 표시할 수 있는 필드와 해당하는 Azure Maps를 나열합니다.

Bing 지도 필드 Azure Maps 필드 설명
actualEnd Point 기능 개체 type="waypoint"inputIndex = 마지막인 포인트 피처 객체는 라우팅 가능한 끝 위치를 정의합니다.
실제 시작 Point 기능 개체 type="waypoint"inputIndex = 0이 있는 점 기능 개체는 라우팅 가능한 시작 위치를 정의합니다. 
alternateVias 대체 경로 Bing Maps alternateVias 는 별도의 경로를 식별합니다. Azure Maps 경로 방향 API에서 대체 경로는 아래 alternativeRoutes의 새 기능 컬렉션으로 반환됩니다. 
compassDegrees 지원되지 않음
나침반 방향 지원되지 않음
묘사 지원되지 않음
세부 정보 속성 기능 개체의 속성에는 기동 정보가 포함됩니다. 
거리 단위 해당 없음 Azure Maps 경로 방향 API는 기본적으로 거리를 미터 단위로 반환합니다. 
기간 단위 해당 없음 Azure Maps 경로 방향 API는 기간을 초 단위로 반환합니다. 
끝 경로 지수 레인지 Azure Maps 경로 방향 API는 경로의 특정 레그에서 적용되는 시작 및 끝 인덱스를 범위로 반환합니다. 
종료 지점 지원되지 않음 Azure Maps 경로 방향 API 응답에서 엔드 웨이포인트는 type="waypoint"inputIndex = 마지막 인덱스에서 파생될 수 있습니다.
서식이 지정된 텍스트 서식이 지정된 텍스트
힌트 지원되지 않음
힌트 유형 지원되지 않음
아이콘 유형 지원되지 않음
명령 명령
isRealTimeTransit 지원되지 않음
isVia 지원되지 않음 Azure Maps 경로 방향 API는 트럭 경로에 대한 viaWaypoint를 지원하지 않습니다. 
위치 코드 지원되지 않음
위치 식별자 지원되지 않음
기동점 기동점 Azure Maps에서 _type=maneuverPoin_t 기동이 필요한 지점 개체에 대한 것입니다. 
기동 유형 기동 유형
모드 지원되지 않음
이름 이름
실시간 대중교통 지연 지원되지 않음
도로 유형 지원되지 않음
경로 경로 인덱스 routePathPoint
경로 하위 구간 subLegs
sideOfStreet sideOfStreet
시작경로지수 레인지 Azure Maps 경로 방향 API는 경로의 특정 레그에서 적용되는 시작 및 끝 인덱스를 범위로 반환합니다.  
스타트웨이포인트 지원되지 않음 Azure Maps 경로 방향 API 응답에서 시작 웨이포인트는 type="waypoint"inputIndex = 첫 번째 인덱스에서 파생될 수 있습니다.
[도로이름] 방면 [도로이름] 방면
교통 혼잡 지원되지 않음
사용된 트래픽 데이터 사용된 트래픽 데이터
이동 거리 거리(미터)
여행 시간 초 단위 지속 시간
여행 소요 시간 교통 초 단위 교통 지속 시간
이동 모드 이동 모드

Azure Maps 경로 방향 API 응답 필드에 대한 자세한 내용은 정의를 참조하세요.

응답 예제

다음 JSON 샘플은 Bing Maps Calculate a Truck Route 요청을 실행할 때 HTTP 응답 본문에 반환되는 내용을 보여 줍니다.

{
    "authenticationResultCode": "ValidCredentials",
    "brandLogoUri": "https://dev.virtualearth.net/Branding/logo_powered_by.png",
    "copyright": "Copyright © 2024 Microsoft and its suppliers. All rights reserved. This API cannot be accessed and the content and any results may not be used, reproduced or transmitted in any manner without express written permission from Microsoft Corporation.",
    "resourceSets": [
        {
            "estimatedTotal": 1,
            "resources": [
                {
                    "__type": "Route:http://schemas.microsoft.com/search/local/ws/rest/v1",
                    "bbox": [
                        47.610017,
                        -122.201495,
                        47.610133,
                        -122.192518
                    ],
                    "distanceUnit": "Mile",
                    "durationUnit": "Second",
                    "routeLegs": [
                        {
                            "actualEnd": {
                                "type": "Point",
                                "coordinates": [
                                    47.610052,
                                    -122.192518
                                ]
                            },
                            "actualStart": {
                                "type": "Point",
                                "coordinates": [
                                    47.610109,
                                    -122.201495
                                ]
                            },
                            "alternateVias": [],
                            "description": "Main St",
                            "itineraryItems": [
                                {
                                    "compassDirection": "east",
                                    "details": [
                                        {
                                            "compassDegrees": 91,
                                            "endPathIndices": [
                                                1
                                            ],
                                            "locationCodes": [
                                                "114+10725"
                                            ],
                                            "maneuverType": "DepartStart",
                                            "mode": "Driving",
                                            "names": [
                                                "Main St"
                                            ],
                                            "roadType": "Arterial",
                                            "startPathIndices": [
                                                0
                                            ]
                                        }
                                    ],
                                    "iconType": "Auto",
                                    "instruction": {
                                        "formattedText": "<Action>Head</Action> <CmpsDir>east</CmpsDir> on <RoadName>Main St</RoadName> toward <Toward>105th Ave NE</Toward>",
                                        "maneuverType": "DepartStart",
                                        "text": "Head east on Main St toward 105th Ave NE"
                                    },
                                    "isRealTimeTransit": false,
                                    "maneuverPoint": {
                                        "type": "Point",
                                        "coordinates": [
                                            47.610109,
                                            -122.201495
                                        ]
                                    },
                                    "realTimeTransitDelay": 0,
                                    "sideOfStreet": "Unknown",
                                    "towardsRoadName": "105th Ave NE",
                                    "travelDistance": 0.418804,
                                    "travelDuration": 68,
                                    "travelMode": "Driving"
                                },
                                {
                                    "compassDirection": "east", 
                                    "details": [
                                        {
                                            "compassDegrees": 90,
                                            "endPathIndices": [
                                                1
                                            ],
                                            "locationCodes": [
                                                "114+10725"
                                            ],
                                            "maneuverType": "ArriveFinish",
                                            "mode": "Driving",
                                            "names": [
                                                "Main St"
                                            ],
                                            "roadType": "Arterial",
                                            "startPathIndices": [
                                                1
                                            ]
                                        }
                                    ],
                                    "hints": [
                                        {
                                            "hintType": "PreviousIntersection",
                                            "text": "The last intersection before your destination is 110th Pl SE"
                                        }
                                    ],
                                    "iconType": "Auto",
                                    "instruction": {
                                        "formattedText": "<Action>Arrive</Action> at <WaypointName>Stop: Y, X = 47.610096, -122.192463</WaypointName>",
                                        "maneuverType": "ArriveFinish",
                                        "text": "Arrive at Stop: Y, X = 47.610096, -122.192463"
                                    },
                                    "isRealTimeTransit": false,
                                    "maneuverPoint": {
                                        "type": "Point",
                                        "coordinates": [
                                            47.610052,
                                            -122.192518
                                        ]
                                    },
                                    "realTimeTransitDelay": 0,
                                    "sideOfStreet": "Unknown",
                                    "travelDistance": 0,
                                    "travelDuration": 0,
                                    "travelMode": "Driving"
                                }
                            ],
                            "routeSubLegs": [
                                {
                                    "endWaypoint": {
                                        "type": "Point",
                                        "coordinates": [
                                            47.610052,
                                            -122.192518
                                        ],
                                        "description": "Stop: Y, X = 47.610096, -122.192463",
                                        "isVia": false,
                                        "locationIdentifier": "",
                                        "routePathIndex": 1
                                    },
                                    "startWaypoint": {
                                        "type": "Point",
                                        "coordinates": [
                                            47.610109,
                                            -122.201495
                                        ],
                                        "description": "Stop: Y, X = 47.610133, -122.201478",
                                        "isVia": false,
                                        "locationIdentifier": "",
                                        "routePathIndex": 0
                                    },
                                    "travelDistance": 0.418805,
                                    "travelDuration": 68
                                }
                            ],
                            "travelDistance": 0.418805,
                            "travelDuration": 68,
                            "travelMode": "Truck"
                        }
                    ],
                    "trafficCongestion": "Medium",
                    "trafficDataUsed": "None",
                    "travelDistance": 0.418805,
                    "travelDuration": 68,
                    "travelDurationTraffic": 93,
                    "travelMode": "Truck"
                }
            ]
        }
    ],
    "statusCode": 200,
    "statusDescription": "OK",
    "traceId": "bb78d3da62a71f62683cea8e6653806f|MWH0032BED|0.0.0.0|MWH0031C93,Leg0-MWH0031C91"
}

다음 JSON 샘플은 Azure Maps 지도 타일 가져오기 요청을 실행할 때 HTTP 응답 본문에 반환되는 내용을 보여줍니다.

{
    "type": "FeatureCollection",
    "features": [ 
        { 
            "type": "Feature", 
            "geometry": { 
                "type": "Point", 
                "coordinates": [ 
                    -122.2015, 
                    47.61013 
                ] 
            }, 
            "properties": { 
                "durationInSeconds": 0, 
                "distanceInMeters": 3.00, 
                "routePathPoint": { 
                    "legIndex": 0, 
                    "pointIndex": 0
                },
                "travelMode": "truck",
                "instruction": {
                    "formattedText": "Leave from <street>Bellevue Way SE</street>",
                    "maneuverType": "DepartStart",
                    "text": "Leave from Bellevue Way SE"
                },
                "towardsRoadName": "Bellevue Way SE",
                "steps": [
                    {
                        "maneuverType": "DepartStart",
                        "routePathRange": {
                            "legIndex": 0,
                            "range": [
                                0,
                                1
                            ]
                        },
                        "names": [
                            "Bellevue Way SE"
                        ]
                    }
                ],
                "type": "ManeuverPoint"
            }
        },
        {
            "type": "Feature",
            "geometry": {
                "type": "Point",
                "coordinates": [
                    -122.2015,
                    47.61011
                ]
            },
            "properties": {
                "durationInSeconds": 111,
                "distanceInMeters": 724.00,
                "routePathPoint": {
                    "legIndex": 0,
                    "pointIndex": 1
                },
                "travelMode": "other",
                "instruction": {
                    "formattedText": "Turn left onto <street>Main St</street>",
                    "maneuverType": "TurnLeft",
                    "text": "Turn left onto Main St"
                },
                "towardsRoadName": "Main St",
                "steps": [
                    {
                        "maneuverType": "TurnLeft",
                        "routePathRange": {
                            "legIndex": 0,
                            "range": [
                                1,
                                32
                            ]
                        },
                        "names": [
                            "Main St"
                        ]
                    } 
                ],
                "type": "ManeuverPoint"
            }
        },
        {
            "type": "Feature",
            "geometry": {
                "type": "Point",
                "coordinates": [
                    -122.19195,
                    47.61005
                ]
            },
            "properties": {
                "durationInSeconds": 14,
                "distanceInMeters": 7.00,
                "routePathPoint": {
                    "legIndex": 0,
                    "pointIndex": 32
                },
                "travelMode": "truck",
                "instruction": {
                    "formattedText": "Turn left",
                    "maneuverType": "TurnLeft",
                    "text": "Turn left"
                },
                "steps": [
                    {
                        "maneuverType": "TurnLeft",
                        "routePathRange": {
                            "legIndex": 0,
                            "range": [
                                32,
                                33
                            ]
                        }
                    }
                ],
                "type": "ManeuverPoint"
            }
        }, 
        {
            "type": "Feature",
            "geometry": {
                "type": "Point",
                "coordinates": [
                    -122.19195,
                    47.61011
                ]
            },
            "properties": {
                "durationInSeconds": 0,
                "distanceInMeters": 0.00,
                "routePathPoint": {
                    "legIndex": 0,
                    "pointIndex": 33
                },
                "travelMode": "truck",
                "instruction": {
                    "formattedText": "You have arrived. Your destination is on the left",
                    "maneuverType": "ArriveFinish",
                    "text": "You have arrived. Your destination is on the left"
                },
                "sideOfStreet": "Left",
                "steps": [
                    {
                        "maneuverType": "ArriveFinish",
                        "routePathRange": {
                            "legIndex": 0,
                            "range": [
                                33,
                                33
                            ]
                        }
                    }
                ],
                "type": "ManeuverPoint"
            }
        },
        {
            "type": "Feature", 
            "geometry": {
                "type": "MultiLineString",
                "coordinates": []
            },
            "properties": {
                "resourceId": "/ZlIBcVsx0+/BcpEi208gQ==",
                "trafficDataUsed": "FlowAndClosure",
                "distanceInMeters": 734.00,
                "durationInSeconds": 100,
                "departureTime": "2024-04-08T20:20:25+00:00",
                "arrivalTime": "2024-04-08T20:22:30+00:00",
                "type": "RoutePath",
                "legs": []
            }
        }
    ]
}

트랜잭션 사용량

Bing Maps 트럭 경로 API는 API 요청당 세 개의 청구 가능 트랜잭션을 기록합니다. Azure Maps 경로 방향 API는 API 요청당 하나의 청구 가능한 트랜잭션을 기록합니다. Azure Maps 트랜잭션에 대한 자세한 내용은 Azure Maps 트랜잭션 이해를 참조하세요.

추가 정보

  • Post Directions Batch: 단일 동기 요청에서 경로 방향 API에 쿼리 일괄 처리를 보내는 데 사용합니다.

지원