Optional
dest도착지 노드 아이디
모의주행 시 경유하는 전체 층 id 리스트
실제 지도상에 위치하는(단순화된) 노드들의 위치
Optional
navigation네비게이션 목록 데이터. 네비게이션 지점 데이터와 네비게이션 지점으로 카메라를 움직이는 함수 목록을 반환합니다.
// NavigationResponse.navigationList 목록 예제
const naviResponse = mapData.getRoute({
origin: {
// 여자화장실 (2층)
poiId : "PO-bG8eepPeB2502",
floorId: "FL-vf3q07spbmsw8132",
},
destination: {
// 남자화장실 (2층)
poiId : "PO-9InVzIGv20417",
floorId: "FL-vf3q07spbmsw8132",
},
type: "recommendation",
waypoints: [
{
// 플랫폼사업부 회의실 (11층)
poiId : "PO-NMvw3E0pe1690",
floorId: "FL-t4vqgyek3jnb8146",
},
{
// 사업전략부 (11층)
poiId : "PO-WgCv1-qBo8094",
floorId: "FL-t4vqgyek3jnb8146",
}
],
});
console.log(naviResponse.recommendation.navigationList);
// NavigationResponse.navigationList 에는 아래와 같이
// 지점 이름과 해당 지점으로 카메라를 움직이는 함수 목록이 배열 형태로 들어있습니다.
// [
// {poi: IPoi | undefined, floorId: 'FL-vf3q07spbmsw8132', transportation: '걷기', direction: '직진' distance: 3.35, move: ƒ},
// {poi: IPoi | undefined, floorId: 'FL-vf3q07spbmsw8132', transportation: '걷기', direction: '우회전' distance: 8.96, move: ƒ},
// {poi: IPoi | undefined, floorId: 'FL-vf3q07spbmsw8132', transportation: '계단', direction: '' distance: 0, move: ƒ},
// {poi: IPoi | undefined, floorId: 'FL-t4vqgyek3jnb8146', transportation: '걷기', direction: '직진' distance: 13.21, move: ƒ},
// {poi: IPoi | undefined, floorId: 'FL-t4vqgyek3jnb8146', transportation: '걷기', direction: '우회전' distance: 9.15, move: ƒ},
// {poi: IPoi | undefined, floorId: 'FL-t4vqgyek3jnb8146', transportation: '걷기', direction: '유턴' distance: 8.65, move: ƒ},
// {poi: IPoi | undefined, floorId: 'FL-t4vqgyek3jnb8146', transportation: '걷기', direction: '좌회전' distance: 8.65, move: ƒ},
// {poi: IPoi | undefined, floorId: 'FL-t4vqgyek3jnb8146', transportation: '걷기', direction: '유턴' distance: 6.87, move: ƒ},
// {poi: IPoi | undefined, floorId: 'FL-t4vqgyek3jnb8146', transportation: '걷기', direction: '우회전' distance: 8.96, move: ƒ},
// {poi: IPoi | undefined, floorId: 'FL-t4vqgyek3jnb8146', transportation: '걷기', direction: '우회전' distance: 0, move: ƒ},
// {poi: IPoi | undefined, floorId: 'FL-t4vqgyek3jnb8146', transportation: '걷기', direction: '직진' distance: 3.35, move: ƒ},
// {poi: IPoi | undefined, floorId: 'FL-t4vqgyek3jnb8146', transportation: '계단', direction: '' distance: 0, move: ƒ},
// {poi: IPoi | undefined, floorId: 'FL-vf3q07spbmsw8132', transportation: '걷기', direction: '좌회전' distance: 15.24, move: ƒ},
// {poi: IPoi | undefined, floorId: 'FL-vf3q07spbmsw8132', transportation: '걷기', direction: '직진' distance: 0, move: ƒ},
// ]
// NavigationResponse.navigationList 사용방법 예제
const map = await dabeeoMaps.showMap(mapContainer, mapOption, mapData);
const naviResponse = mapData.getRoute({
origin: {
// 여자화장실 (2층)
poiId : "PO-bG8eepPeB2502",
floorId: "FL-vf3q07spbmsw8132",
},
destination: {
// 남자화장실 (2층)
poiId : "PO-9InVzIGv20417",
floorId: "FL-vf3q07spbmsw8132",
},
type: "recommendation",
waypoints: [
{
// 플랫폼사업부 회의실 (11층)
poiId : "PO-NMvw3E0pe1690",
floorId: "FL-t4vqgyek3jnb8146",
},
{
// 사업전략부 (11층)
poiId : "PO-WgCv1-qBo8094",
floorId: "FL-t4vqgyek3jnb8146",
}
],
});
naviResponse.recommendation.navigationList.forEach((item) => {
let poiTitle,
direction,
distance,
transportation,
floorName,
move;
if (item.poi) poiTitle = item.poi.title;
if (item.direction) direction = item.direction;
if (item.distance) distance = item.distance;
if (item.transportation) transportation = item.transportation;
if (item.floorId) {
// 층 id 를 이용해서 해당 지점이 속한 층이름을 가져올 수 있습니다.
const floorData = mapData.dataFloor.getFloors().find((floor) => floor.id === item.floorId);
floorName = floorData?.name[0].text;
}
// NavigationResponse.navigationList 목록에 담긴 move() 함수를 사용하려면,
// dabeeoMaps.showMap() 을 호출하여 반환받는 DabeeoMap 객체를 인자로 전달해줘야 합니다.
if (item.move) move = () => { item.move(map); }
// 각 지점의 데이터를 활용해서 각 지점에 대한 title 을 아래 형식으로 만들 수도 있습니다.
console.log(`${poiTitle}(${floorName})에서 ${direction}하여 ${distance}m 만큼 ${transportation}(으)로 이동`);
});
Optional
origin출발지 층 ID
시작점 노드 아이디
단순화된 경로 노드
총 경유 거리 (cm)
총 경유 시간 (millseconds)
Optional
used실제로 사용한 이동수단
Optional
way경유지 데이터
도착지 층 ID