Can I use external javascript library in application
Hi.
I'm new to Titanium and I want to have a google maps shown on my app. I don't have problems to use it like that :
var webview = Titanium.UI.createWebView({url:'http://maps.google.com/maps?saddr=city1&daddr=city2'});
var window = Titanium.UI.createWindow();
window.add(webview);
window.open();
But my question is "is there a way to include google maps javascript API and use it like it's HTML page" ?
4 Answers
-
The javascripts for maps that google offers are DOM centric. In Ti DOM does not exists so no, you cannot. But you could use native map for a more efficient app :)
-
I need to create routes between points on Google maps, so I guess that native map will not be much helpful for me.
Thanks a lot for explaining me the situation.
-
Hi, you can create a map view with routes, check the KitchenSink example app on Base UI -> Views -> Map View with Routing
-
OK, but what about the documentation here :
http://developer.appcelerator.com/apidoc/mobile/latest/Titanium.Map.MapView-object
addRoute :
add a route. currently only supported on iphoneIsn't it possible to add routes for android ?