How to remove route in tomtom maps sdk?

239 Views Asked by At

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;
1

There are 1 best solutions below

1
On BEST ANSWER

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!