World map automatically change to new zone when crossing from previous zone

my world map used to change to a new zone automatically as i traveled from one zone to another. some time ago it stopped doing that. i thought there was an api script command i could use to toggle that, but i can’t locate it, even after lots of googling. does the ability to automatically change the world map zone when crossing from one zone to another still exist, and, if so, what’s the command to enable it? thanks!

In my experience, when traveling between zones with the map open, the map will remain on the zone you were in when you initially opened it. If you close it and re-open it, it will show your current zone.

2 Likes

still… ability to auto change zone used to exist, wondering if it still exists, and, if so, what the command is to enable it.

I’m not sure it did. I don’t recall it ever behaving that way for me.

so, i know for a fact that there was a way to toggle that ability on/off with an api script command. i acknowledge that you (Teufelgott) are not aware of it, but i’d still like to know if the ability still exists, and, if so, what the command is.

i’d be happy to hear from someone who does recall this ability. thanks!

You might have better luck in the UI and Macros forum.

1 Like

Since patch 8.0.1 addons don’t need to call SetMapToCurrentZone() anymore in order to get the current map. This is probably the reason why it stopped happening for you

There is probably an addon out there that already does this, otherwise you can turn this snippet into an addon with https://addon.bool.no/

local function OnEvent(self, event)
	if WorldMapFrame:IsShown() then
		local uiMapID = C_Map.GetBestMapForUnit("player")
		WorldMapFrame:SetMapID(uiMapID)
	end
end

local f = CreateFrame("Frame")
f:RegisterEvent("ZONE_CHANGED_NEW_AREA")
f:SetScript("OnEvent", OnEvent)
1 Like

Titan Panel has a setting that automatically switches maps when entering a new zone. Took me forever to figure out what was doing it because I hated it.

I am sure it was an addon you stopped using.

1 Like

thank you very, very much, Ketho – great answer!!

Gnitwit, I appreciate your answer too, but for some reason the Forum is blocking me from responding to a second individual posting with this follow-up question: Do you happen to recall where in Titan Panel that setting is? I just looked through all settings I could find, but didn’t see anything regarding map zones.

If I recall, I right clicked on the location and coordinance listed on on the titan panel bar and it was just a check mark to click.

It has been a while but I think that was right

You may also want to add these, as they may lead to another output of C_Map.GetBestMapForUnit("player"):

f:RegisterEvent("ZONE_CHANGED")
f:RegisterEvent("ZONE_CHANGED_INDOORS")
1 Like