Phonegap Geolocalisation application crashes

前端 未结 3 708
野的像风
野的像风 2021-01-28 23:50

I\'m trying to get current localisation using phonegap javascript api. Here is a sample code taken from phonegap website:



        
3条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-01-29 00:08

    If you are seeing the error in Android, you want to add the enableHighAccuracy flag:

    navigator.geolocation.getCurrentPosition(onSuccess, onError, { enableHighAccuracy: true });
    

提交回复
热议问题