javaandroidroutestomtomtomtom-android-sdk

How to remove route in tomtom maps sdk?


Is there a way to remove the route without clearing the markers? Using function clear() is really bad.

 tomtomMap.clear();
    route = null;
    origin = null;
    destination = null;

Solution

  • Is there a function clearRoute() that do not clear the markers.

    Take a look at the API reference

    https://d221h2fa9j1k6s.cloudfront.net/downloads/mapssdk/APIReferences/JavaDocMap_2.4.376/index.html

    I was able to test the function in my project and verified that it works.

    tomtomMap.clearRoute() should solve your problem.

    Regards!