开发者

Add a "mapview" in a webOS app

开发者 https://www.devze.com 2022-12-24 19:07 出处:网络
I\'m not familiar yet with WebOS dev (just started this weekend) but I didn\'t find any \"MapView\" widget in the reference library.

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 d开发者_如何学编程o I have to start the map app from my app ?

Thanx.


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"
    } 
  }  
}); 
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号