WorldMapFrame:Refresh() or WorlmapFrame:Reload()
I've now found a way to display my pins via Blizzard pins. When the option is enabled in my addon, I simply remove certain Blizzard pins on the map and replace them with my pins. The problem; When you activate or deactivate the option, the Blizzard Pins on the map do not simply disappear, you first have to reopen/close the map or switch to another map so that the Blizzard Pins are no longer displayed.
Is there a command to refresh the map to show the changes? something like WorldMapFrame:Refresh() or WorlmapFrame:Reload() that works? |
Closing/Opening would run
Code:
WorldMapFrame:OnHide() Code:
WorldMapFrame:OnShow() |
Quote:
|
Try running WorldMapFrame:Reload() to refresh the map and see if it displays the changes after enabling or disabling the option in your addon.
|
Bear in mind I have never dabbled with the world map, let alone the new data provider code. So what I say below may be utter garbage rofl. But just in case it isn't.
Looking at Blizzard_WorldMap addon, I see multiple types of pins, so it might depend on which type of pin you have based your pins on. From: https://www.townlong-yak.com/framexm...taProvider.lua function WorldMap_WorldQuestDataProviderMixin:RefreshAllData(fromOnShow) > This appears to be for the various quest related pins and includes a call to *clear and refresh* the pin data. From: https://www.townlong-yak.com/framexm...taProvider.lua function WorldMap_EventOverlayDataProviderMixin:RefreshAllData(fromOnShow) > This one clears the pins, and then recreates them based on the current events From: https://www.townlong-yak.com/framexm...d_WorldMap.lua function WorldMapMixin:RefreshOverlayFrames() > This one might be useful if your pins are part of your own overlay frame. Hopefully these will offer you some ideas on what might work for you :) Good Luck. |
All times are GMT -6. The time now is 03:09 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI