BattlefieldMinimap precise position?

I like precision, so I’m using this kind of macros to move my player, target and focus frames to precise coordinates:

/run PlayerFrame:ClearAllPoints() PlayerFrame:SetPoint(“CENTER”,UIParent,-250,-300)PlayerFrame:SetUserPlaced(true)

And I found this one online that was supposed to work on the Battlefield Minimap (the one that appears with Shift+M):

/run BattlefieldMinimapTab:ClearAllPoints() BattlefieldMinimapTab:SetPoint(‘CENTER’, UIParent)

But it doesn’t work, it does nothing. I tried to tweak it based on my working macros for unit frames but this doesn’t work either:

/run BattlefieldMinimapTab:ClearAllPoints() BattlefieldMinimapTab:SetPoint(“CENTER”,UIParent,10,10)BattlefieldMinimapTab:SetUserPlaced(true)

So is there anything, besides MoveAnything which I don’t use because it causes a few annoying bugs, that would allow me to precisely position my battlefield minimap?

Try using BattlefieldMapFrame instead of BattlefieldMinimapTab

Doesn’t work :confused:

The map has to be shown at least once before you can move it. The SetUserPlaced probably won’t work as the map is Load on Demand.

A small addon to move the map when it loads would probably be your best bet if the macro is too much hassle.

You could paste the following into the website addon.bool.no to create/downoad said addon.

local f = CreateFrame("Frame")
f:RegisterEvent("ADDON_LOADED")
f:SetScript("OnEvent", function(self, event, addon)
	if addon == "Blizzard_BattlefieldMap" then
		self:UnregisterAllEvents()
		hooksecurefunc(BattlefieldMapTab, "SetPoint", function(self)
			if self.OnHook then
				self.OnHook = nil
				return
			end
			self.OnHook = true
			self:ClearAllPoints() 
			self:SetPoint("CENTER", UIParent, -200, 200)
		end)
	end
end)

Adjust the -200, 200 (X, Y) to move the frame relative to the center of the screen.

This will create an addon that moves the minimap ? Is there a way to provide a macro or sliders to ajust the position without leaving the game?

EDIT: Just having a look at the map, you can right click the tab, uncheck the “Lock Zone Map” option, then drag the map where you want it and re-check the option to lock the map in the new position.

Original reply:
The addon is so you A. don 't have to run the macro each time you login and B. don’t have to open the map before you run the macro (it’s all automatic).

If you prefer a macro (that will warn you if you haven’t opened the map first) then

/run if not IsAddOnLoaded("Blizzard_BattlefieldMap") then print("Map Not Loaded!!!|r") return end BattlefieldMapTab:ClearAllPoints() BattlefieldMapTab:SetPoint("CENTER", UIParent, -200, 200)

Again, adjust the -200, 200 (X/ Y) to place the map where you want it.

Sliders would be too much code and the X/Y not saveable for a macro.