Is there anyway to find the nearest x, y coordinates

see here: Sarven Treasure Teleporter Positions