如何在iPhone应用程序的UIWebView中加载谷歌街景?
我正在尝试在我的应用程序中使用谷歌地图街景视图,因此我正在尝试在我的 Webview 中加载 html 文件。但需要Flash播放器才能显示街景。
需要 adobe flash 播放器吗?
有人知道如何在我们的 iPhone 应用程序中使用街景吗?
问候,
I am trying to use the google map street view in my app, so i am trying to load the html file in my Webview. but it is need the flash player to show the street view.
Is adobe flash player is required for this?
Anyone know how to use the street view in our iphone app?
Regards,
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
是的,可以在 UIWebView 中加载 Google StreetView。这是加载 Google StreetView 的示例代码示例 -
加载此街景后。 Google 会提醒您该 URL 仅属于 google 地图。要隐藏该警报消息,只需在您的 WebViewDidFinish 方法中添加以下 javascript 查询 -
Yes, it is possible to load Google StreetView in UIWebView. Here is a sample code example to load Google StreetView -
After loading this streetView. Google will give you an alert that this URL is belongs to google map only. To hide that alert message just add this below javascript query in your WebViewDidFinish method -
从技术上来说这是不可能的,但是如果您可以获得特定纬度和经度的全景图像 ID,那么这是可能的。在我之前的回答中,我说这是可能的,因为我知道该特定位置的全景图 ID。使用该代码,您可以在 UIWebview 中打开 steetview,但它会显示警告。通过触摸网络视图中的任何位置,该警告警报将会消失。
Google 引入了 SDK 来在您的 iOS 应用程序中加载街景,而不是离开您的应用程序。您需要做的就是使用 cocoa pods 添加“GoogleMaps”sdk,并运行下面的源代码来显示特定纬度和经度的谷歌街景。
酷啊……感谢 Google 出色的员工。
Well technically it is not possible, but if you can get the panorama image id for that specific latitude and longitude, then it is possible. In my previous answer, I said it is possible as because I know the panorama id for that specific location. Using that code you can open steetview in your UIWebview, but it will show a warning. By touching anywhere in your webview will disappear that warning alert.
Bu Google introduce there SDK to load streetview in your iOS app, instead of leaving your app. All you need to do is add 'GoogleMaps' sdk using cocoa pods and run this below source code to display google Streetview for specific latitude and longitude.
Cool huh...... Thanks goes to Google for their cool staff.