Muhammad Immad Aamir
Muhammad Immad Aamir

Reputation: 45

panoramagl hotspot to move to next panorama

here is the code of panoramagl in which cylinderical panorama is working with hotspot but how to go to next panorama by clicking on it here is my code in which hotspot is clickable but not move to next panorama can anybody help me

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();


}`

Upvotes: 2

Views: 361

Answers (1)

ask4solutions
ask4solutions

Reputation: 187

you need to override following method

@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();
            }

Upvotes: 3

Related Questions