Just a lot of math involved and if im correct some base coordinates to work with (i.e. a box of the area with set coordinates for the corners then do the math between) could be wrong though. And if that is the case the ctm program must have been a pain to code.
As already stated somewhere, every area is an offset of the map. Every area has a start offset position and a size in a two dimensional array that form a box. WoWhead / wow map uses a percentage of the size of the map, so if a region has 300yards in the x axis and start in the offset 1500 of the world map, the point 50 of that axis in the map is (offset + ((300*50)/100)) => 1500 + 150 = 1650) so thats the map for the x axis now we need to know the same for the y axis that is inverted. Also for better precision it would be good to have a 3d navigation system, because sometimes you go to the right place but you should have to go underneath that place and you cant find what you are looking for. E.g. Undercity NPC location.