小编Joz*_*han的帖子

尝试使用Google街景API获取位置更改以捕获静态图像

我正在尝试使用Ionic2构建一个应用程序,允许用户通过Google Street View API 加载StreetViewPanorama对象.加载视图后,用户应该能够以他们选择的任何方式操纵街景(远离原始位置,缩放等).完成此任务后,用户将捕获最终街道视图的静态图像.

当我试图拍摄新街景位置的照片时,我的困难就出现了.我正在尝试使用Google的静态图像生成文档来实现这一目标.不幸的是,在创建对象后,我无法引用Panorama对象的属性.我是Javascript的新手,所以请耐心等待.

要生成街景全景图,我运行以下功能(从底部开始initMap()):

 /**
  * Creates the map options for panorama generation. This includes adjusting the coordinate
  * position of a user to the nearest available street view. Following creation of the settings,
  * it generates the street view on a user's device.
  *
  * @param userLocation a JSON object whose keys are 'lat' and 'lng' and whose values are
  *                     the corresponding latitude and longitude respectively
  */
  generatePanorama(userLocation): void …
Run Code Online (Sandbox Code Playgroud)

javascript google-maps ionic-framework

5
推荐指数
1
解决办法
637
查看次数

标签 统计

google-maps ×1

ionic-framework ×1

javascript ×1