WoWInterface - View Single Post - Using the new Map API
View Single Post
07-25-18, 01:04 PM   #5
A Defias Bandit
Join Date: Jul 2018
Posts: 3
Originally Posted by LanceDH View Post
Lua Code:
  1. hooksecurefunc(WorldMapFrame, "OnMapChanged", function()
  2.     local mapID = WorldMapFrame.mapID;
  3. end);
Well, that is indeed one option i will try

Originally Posted by Gello View Post
I'm not comfortably fluent in the new map yet, but you could also create a data provider (which you may already have if you're putting stuff on the map):
-- mixin is at Interface\AddOns\Blizzard_MapCanvas_DataProviderBase.lua
dataProvider = CreateFromMixins(MapCanvasDataProviderMixin)

-- the RefreshAllData() method is called in the default implementation
function dataProvider:OnMapChanged()


I did not even touch the blizz mixins at all, since i simply did not understand them. But it looks kinda easy. I'll give it a shot!

Thanks @ you both!
  Reply With Quote