Search code examples
javascriptreact-nativegeolocation

Geolocation-WatchPosition is not yet implemented


i am using react-native-geolocation-service to get location. getting current location without any issue and my current location is moving updating fine. but watchId is always udefined and show me a warning of "WatchPosition is not yet implemented". neither it is showing any error this is i am doing in componenetDidMount

this.watchID = Geolocation.watchPosition(
      (position) => {      
       console.log("position")       
       },
      (error)=>{
       console.log(error  }            ,
      { enableHighAccuracy: true, timeout: 20000, maximumAge: 0, 
       distanceFilter: 
         3 }    
      );


     Is there any idea to solve it

Solution

  • now i used react native version for getting watchPosition

    navigator.geolocation.watchPosition(   (position) => {
    console.log(position)
    }))
    

    it is working fine for me.