MAXVERSE XR SDK
Search
K

POI 설명

Poi(point of interest)를 획득 하는 방법을 설명 합니다.
MaxstSceneManager.cs
public void OnClickGetPOI()
{
poiDatas.Clear();
string accessToken = TrackerManager.GetInstance().GetAccessToken();
if (!XRStudioController.Instance.ARMode)
{
VPSTrackable eachTrackable = vPSTrackablesList[0];
POIController.GetPOI(this, accessToken, eachTrackable.placeId, success: (pois) => {
poiDatas.AddRange(pois);
GameObject poiGameObject = new GameObject();
poiGameObject.name = "POI";
poiGameObject.transform.position = new Vector3(0, 0, 0);
poiGameObject.transform.eulerAngles = new Vector3(0, 0, 0);
poiGameObject.transform.localScale = new Vector3(1, 1, 1);
poiGameObject.transform.parent = arContent.transform;
foreach (POIData eachPOI in pois)
{
GameObject eachPoiGameObject = Instantiate(poiPrefab);
eachPoiGameObject.transform.position = eachPOI.GetVPSPosition();
eachPoiGameObject.transform.parent = poiGameObject.transform;
eachPoiGameObject.name = eachPOI.poi_name_ko;
poiItems.Add(eachPoiGameObject);
}
},
fail: () => {
});
return;
}
if (currentLocalizerPlaceId > 0)
{
POIController.GetPOI(this, accessToken, currentLocalizerPlaceId, success:(pois)=> {
poiDatas.AddRange(pois);
GameObject poiGameObject = new GameObject();
poiGameObject.name = "POI";
poiGameObject.transform.position = new Vector3(0, 0, 0);
poiGameObject.transform.eulerAngles = new Vector3(0, 0, 0);
poiGameObject.transform.localScale = new Vector3(1, 1, 1);
poiGameObject.transform.parent = arContent.transform;
foreach(POIData eachPOI in pois)
{
GameObject eachPoiGameObject = Instantiate(poiPrefab);
eachPoiGameObject.transform.position = eachPOI.GetVPSPosition();
eachPoiGameObject.transform.parent = poiGameObject.transform;
eachPoiGameObject.name = eachPOI.poi_name_ko;
poiItems.Add(eachPoiGameObject);
}
},
fail:()=> {
} );
}
}
  • POI를 호출하는 번호는 Trackable에 포함 되어 있습니다.
  • POI는 placeId를 통해서 획득하게 됩니다.
  • POIController.GetPOI()함수를 통해서 해당 위치의 POI를 획득 할 수 있습니다.
  • 획득한 POI의 좌표를 이용하여 네비게이션에 활용 할수 있습니다.