如何使用metaio SDK添加自己的POI

时间:2013-11-11 15:20:25

标签: android augmented-reality metaio junaio

我正在尝试将metaio SDK集成到我的增强现实应用程序中。

我已经完成了这个:http://dev.metaio.com/sdk/tutorials/location-based-ar/,但我仍然无法添加自己的POI。

任何集成了metaio SDK的人都能让我知道如何添加自己的POI吗?

1 个答案:

答案 0 :(得分:2)

我在loadContents()方法中添加了poi ..比如下面

      private IRadar mRadar;
private IBillboardGroup mBillBoardGroup;
private ArrayList<GeometryBundle> geometriesList;

IGeometry one = metaioSDK.createGeometryFromImage(createBillboardTexture("Test","http://www.abc.org/150.jpg","0.05 miles"), true);
one.setTranslationLLA(new LLACoordinate(24.463729,54.385650, 0, 5));        
geometriesList.add(new GeometryBundle(one, "http://www.abc.org/151.jpg"));

// create radar
    mRadar = metaioSDK.createRadar();
    mRadar.setBackgroundTexture(AssetsManager.getAssetPath("Tutorial5/Assets5/radar.png"));
    mRadar.setObjectsDefaultTexture(AssetsManager.getAssetPath("Tutorial5/Assets5/yellow.png"));
    mRadar.setRelativeToScreen(IGeometry.ANCHOR_TL);

    mBillBoardGroup = this.metaioSDK.createBillboardGroup();

    for (GeometryBundle test : geometriesList) {
        mRadar.add(test.geometry);
        mBillBoardGroup.addBillboard(test.geometry);
    }

在此之后创建一个类GeometryBundle并使用参数创建构造函数...