警报提示中的Iphone应用程序URL而不是应用程序名称

时间:2014-01-23 03:54:55

标签: iphone jquery-mobile

我正在使用HTML5,jQuery mobile,CSS和Xcode创建iPhone应用程序。我想在Google地图上显示用户当前位置。当我使用这个功能时

navigator.geolocation.getCurrentPosition

在确认提示中显示应用网址而非应用名称。

请指导我如何在提示中显示应用名称。

1 个答案:

答案 0 :(得分:0)

它使用应用名称在ios警报中工作。

$(document).ready(function(){                      

   $(function(){
        document.addEventListener("deviceready", onDeviceReady, false);
   })

   function onDeviceReady() {       
        navigator.geolocation.getCurrentPosition(onSuccess, onError);       
   }               
});