这是全景图的代码,其中柱面全景图与hotspot一起工作,但是如何通过单击它转到下一个全景图,这是我的代码,其中热点是可点击的,但不能移动到下一个全景图,有人能帮我吗?
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();
}`发布于 2016-02-18 11:00:29
您需要重写以下方法
@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();
}https://stackoverflow.com/questions/34245708
复制相似问题