添加“地图视图”在 webOS 应用程序中

发布于 2024-08-27 02:45:46 字数 125 浏览 1 评论 0原文

我还不熟悉 WebOS 开发(本周末刚刚开始),但我在参考库中没有找到任何“MapView”小部件。

有没有办法在我的应用程序中包含 WebView 或者我是否必须从我的应用程序启动地图应用程序?

谢谢。

I'm not familiar yet with WebOS dev (just started this weekend) but I didn't find any "MapView" widget in the reference library.

Is there any way to include a WebView in my app or do I have to start the map app from my app ?

Thanx.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

鱼忆七猫命九 2024-09-03 02:45:46

您可以使用 Google Maps V3 API 在您的应用程序中仅包含地图视图。要查看示例,请查看 GitHub 上的 FourSquare 应用程序的源代码。另外,您还可以查看 bchilds.com 上的这篇文章提供了有关如何为其地图 API 高效加载 Google JavaScript 的信息。

如果您想启动单独的 Google 地图应用程序,可以使用对应用程序管理器的 Mojo 服务调用来实现。这是一个例子:

this.controller.serviceRequest('palm://com.palm.applicationManager', { 
  method: 'launch', 
  parameters: { 
    id: 'com.palm.app.maps',
    params: { 
      location: {lat: 37.759568992305134, lng: -122.39842414855957, acc: 1}, 
      query: "Pizza"
    } 
  }  
}); 

You can use the Google Maps V3 API to just include a map view in your application. To see an example, look at the FourSquare application's source code on GitHub. Also, you can check out this article at bchilds.com for info on how to load the Google JavaScript for their maps API efficiently.

If you want to launch the separate Google Maps application, you can do that using a Mojo service call to the application manager. Here's an example:

this.controller.serviceRequest('palm://com.palm.applicationManager', { 
  method: 'launch', 
  parameters: { 
    id: 'com.palm.app.maps',
    params: { 
      location: {lat: 37.759568992305134, lng: -122.39842414855957, acc: 1}, 
      query: "Pizza"
    } 
  }  
}); 
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文