Search code examples
androidiosskmaps

SKMaps annotation jumping while Navigation on Real Mode


When i start navigation in my project my annotation jumped from one latitude & longitude to another instead of smoothly moving.Due to this issue the road loaded with a small jerk.How can i make my navigation smooth like google and waze app. I am using GpsTracker class for gps updates on 1 sec of time and 10 meters of distance.Kindly suggest me some way for smooth navigation.


Solution

  • In Android you should be using the SKPositionPositionProvider instead. To implement the SKPositionPositionProvider you should do:

        SKCurrentPositionProvider positionProvider = new SKCurrentPositionProvider(activity);
        positionProvider.setCurrentPositionListener(new SKCurrentPositionListener(){
    
            @Override
            public void onCurrentPositionUpdate(SKPosition currentPosition) {
                SKPositionerManager.getInstance().reportNewGPSPosition(currentPosition);
    
            }
    
        });
        positionProvider.requestLocationUpdates(true, true, false);