Lua Code:
local CoordText = WorldMapFrameCloseButton:CreateFontString(nil, nil, 'GameFontNormal')
CoordText:SetPoint('RIGHT', WorldMapFrameCloseButton, 'LEFT', -30, 0)
local totalElapsed = 0
WorldMapDetailFrame:HookScript('OnUpdate', function(self, elapsed)
if(totalElapsed > 0.1) then
if(WorldMapScrollFrame:IsMouseOver()) then
local scale = self:GetEffectiveScale()
local centerX, centerY = self:GetCenter()
local width, height = self:GetSize()
local x, y = GetCursorPosition()
x = ((x / scale) - (centerX - (width / 2))) / width
y = (centerY + (height / 2) - (y / scale)) / height
CoordText:SetFormattedText('%.2f, %.2f', x * 100, y * 100)
CoordText:SetTextColor(0, 1, 0)
else
local x, y = GetPlayerMapPosition('player')
CoordText:SetFormattedText('%.2f, %.2f', x * 100, y * 100)
CoordText:SetTextColor(1, 1, 0)
end
totalElapsed = 0
else
totalElapsed = totalElapsed + elapsed
end
end)
What I use, this adds player (or mouse when hovering the map) position to the left of the close button.