Phonegap Geolocalisation application crashes

前端 未结 3 664
野的像风
野的像风 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 });
    
    0 讨论(0)
  • 2021-01-29 00:08

    if you are trying it on android device then altitudeAccuracy property is not support by Android devices, it will always return null.

    0 讨论(0)
  • 2021-01-29 00:19

    I have just tried it on PhoneGap 1.4.1, iOS Simulator 5.0 and it works fine.

    What kind of error are you getting ?

    0 讨论(0)
提交回复
热议问题