我想使用Phonegap模拟器来测试使用Kendo UI Mobile的应用程序。当我在真实设备上测试时,Kendo UI被初始化,从未调用Still Geolocation onSuccess方法,但在Phonegap模拟器上我甚至看不到Kendo Ui被初始化。请帮我运行这个应用程序
var MYAPP = MYAPP || {};
MYAPP.onSuccess = (function(position)
{
var myLocation = new google.maps.LatLng(position.coords.latitude, position.coords.longitude);
map = new google.maps.Map(document.getElementById('map_canvas'), {
mapTypeId: google.maps.MapTypeId.ROADMAP,
center: myLocation,
zoom: 15
});
});
MYAPP.onError = (function(error)
{
alert("error initializing map")
});
MYAPP.run = (function() {
// create the Kendo UI Mobile application
alert("kendo initialized");
MYAPP.app = new kendo.mobile.Application(document.body, { transition: "slide" });
navigator.geolocation.getCurrentPosition(MYAPP.onSuccess, MYAPP.onError);
});
MYAPP.show = (function() {
$(document.body).show();
});
(function() {
if (navigator.userAgent.indexOf('Browzr') > -1) {
// blackberry
setTimeout(MYAPP.run, 250)
} else {
// attach to deviceready event, which is fired when phonegap is all good to go.
document.addEventListener('deviceready', MYAPP.run, false);
alert("hello")
}
})();