This really should be in the Technical Discussion thread redfox007.
Except it shouldn't even be there really...
This has been asked for many times and the answer is always the same.
http://www.3drad.com/forum/index.php?topic=1236.msg15912#msg15912psikoT made this and kindly donated it into the "Little Useful Projects" area of the User Created Samples catagory.
To add - it is really important to know the size of your terrain when working with this. You have to do a little maths to work out the ratio of real world to map so everything displays at the right location.
If the demo in the link isn't enough - check out my Grimball demo for a minimap that tracks 4 cars in a football stadium - it should help.