panoramagl热点移动到下一个全景

时间:2015-12-12 22:23:38

标签: java android xml

这里是panoramagl的代码,其中圆柱全景图正在使用热点,但是如何通过点击它来进入下一个全景图是我的代码,其中热点是可点击但不能移动到下一个全景可以任何人帮助我

PLManager plManager;
PLHotspot hotspot;


@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    plManager = new PLManager(this);
    plManager.setContentView(R.layout.activity_main);
    plManager.onCreate();

    PLCylindricalPanorama panorama = new PLCylindricalPanorama();
    panorama.getCamera().lookAt(0.0f, 200.0f);
    panorama.getCamera().setPitchRange(-30.0f, 30.0f);
    panorama.setImage(new PLImage(PLUtils.getBitmap(this, R.raw.z), false));
    plManager.setPanorama(panorama);
    panorama.addHotspot(new PLHotspot(1, new PLImage(PLUtils.getBitmap(this, R.raw.hotspot), false), -10.0f, 180.0f, 1.05f, 1.05f));


    hotspot.getOnClick();


}`

1 个答案:

答案 0 :(得分:3)

您需要覆盖以下方法

@Override
            public void onDidClickHotspot(PLIView view, PLIHotspot hotspot, CGPoint screenPoint,
                    PLPosition scene3DPoint) {

                 Toast.makeText(view.getActivity().getApplicationContext(),
                 String.format("You select the hotspot with ID %d",
                 hotspot.getIdentifier()), Toast.LENGTH_SHORT).show();
            }
相关问题