Hi.
there are many tutorials for the Animator (unity)
and to manipulate the variables on the animator, there are several "Set Animator..." actions
For example when you click on the map, do also a "Set Animator Bool" and set the variable (call it 'walking' for example) to True
Then when the object arrives, do the same "Set Animator Bool" but then set it to false.
So in short in the animator :
Make a Parameter (Bool : 'walking')
Place your walk and idle animations in a state.
Make a transition from idle to walk.
Click the transition.
In the Inspector Click on + in the 'Condition' Part.
Set 'walking' to true.
Then do a transition from walk to idle and do the same, but then set it false.
You might need to do some other things to tweak the transition (for example turn off 'Has exit time' or adjust overlapping)