Add a "mapview" in a webOS app
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"
}
}
});
精彩评论