2

我正在尝试开发一个虚拟旅游 android 应用程序。我的本地设备中有 photosphere 图像。我需要打开此图像并允许用户探索。但是图像没有加载到图像视图中。有没有其他方法可以加载此图像并对图像执行一些操作,例如滚动或滑动。

4

1 回答 1

0

您可以使用 Google play 服务中的 Photo Sphere Api。下面是如何使用它的示例 - 并按照下面的链接了解更多信息 - [ http://android-developers.blogspot.in/2012/12/new-google-maps-android-api-now-part-of.html ][1]

// This listener will be called with information about the given panorama.
OnPanoramaInfoLoadedListener infoLoadedListener =
  new OnPanoramaInfoLoadedListener() {
    @Override
    public void onPanoramaInfoLoaded(ConnectionResult result,
                                     Intent viewerIntent) {
        if (result.isSuccess()) {
            // If the intent is not null, the image can be shown as a
            // panorama.
            if (viewerIntent != null) {
                // Use the given intent to start the panorama viewer.
                startActivity(viewerIntent);
            }
        }
    }
 // If viewerIntent is null, the image is not a viewable panorama.
};

创建客户端实例并连接到它。连接到客户端后,启动异步检查图像是否为可视全景图。 client.loadPanoramaInfo(infoLoadedListener, panoramaUri);

于 2015-06-28T11:23:09.117 回答