Thread Tools Display Modes
01-27-24, 03:40 AM   #1
Ssesmar
A Deviate Faerie Dragon
Join Date: Oct 2023
Posts: 15
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?
  Reply With Quote
01-27-24, 07:44 AM   #2
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,879
Closing/Opening would run

Code:
WorldMapFrame:OnHide()
and
Code:
WorldMapFrame:OnShow()
Maybe just running the OnShow() would do what you need?
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.
  Reply With Quote
01-27-24, 03:57 PM   #3
Ssesmar
A Deviate Faerie Dragon
Join Date: Oct 2023
Posts: 15
Originally Posted by Fizzlemizz View Post
Closing/Opening would run

Code:
WorldMapFrame:OnHide()
and
Code:
WorldMapFrame:OnShow()
Maybe just running the OnShow() would do what you need?
No, unfortunately not, because I don't want to open the map I'm currently on, but the map I just opened
  Reply With Quote
01-29-24, 08:47 AM   #4
Czechbig
A Kobold Labourer
Join Date: Jan 2024
Posts: 1
Try running WorldMapFrame:Reload() to refresh the map and see if it displays the changes after enabling or disabling the option in your addon.
  Reply With Quote
01-29-24, 07:40 PM   #5
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,934
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.
__________________


Characters:
Gwynedda - 70 - Demon Warlock
Galaviel - 65 - Resto Druid
Gamaliel - 61 - Disc Priest
Gwynytha - 60 - Survival Hunter
Lienae - 60 - Resto Shaman
Plus several others below level 60

Info Panel IDs : http://www.wowinterface.com/forums/s...818#post136818
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » WorldMapFrame:Refresh() or WorlmapFrame:Reload()


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off