Quantcast
ESOUI - View Single Post - Is there a global public function to safely update the map?
View Single Post
01/07/19, 12:19 AM   #3
Hydra9268
 
Hydra9268's Avatar
AddOn Author - Click to view addons
Join Date: May 2018
Posts: 30
Thanks! That's precisely what I'm looking for. Just want to update the pin.

My custom pin is declared in Pointer.lua. Here's the abbreviated file, showing only snippets of code that is relevant here.
lua Code:
  1. local Pointer = {}
  2. ZGV.Pointer = Pointer
  3.  
  4. Pointer.Icons = {
  5.     default =   "ESOdot",
  6.     ESOdot =    { icon=ZGV.DIR.."/Arrows/Stealth/arrow-error.dds", size=40, minisize=25, rotates=false, edgeicon=ZGV.DIR.."\\Skins\\minimaparrow-green-edge", edgesize=60, spinner=true, onminimap=always },
  7. }

The ZGV:SetWaypoint function is found in GuideHandling.lua and responsible for setting the pin on the map when the guide moves to the next or previous steps. I put the following snippet there.
lua Code:
  1. for k,v in pairs(ZGV.Pointer.Icons) do
  2.     if type(v) == "table" then
  3.         if k == "ESOdot" then
  4.             print(k)
  5.             ZO_WorldMap_RefreshCustomPinsOfType(k)
  6.         end
  7.     end
  8. end

The good news is the print statement returns "ESOdot." However, ZO_WorldMap_RefreshCustomPinsOfType(k) doesn't update the pin on the map. For a brief moment the only time I see the pin change locations is when I close the map (or enable ZO_WorldMap_UpdateMap, which I want to move away from).

Is ESOdot not the required pinType?

Any ideas, thoughts, sage advice?

Last edited by Hydra9268 : 01/07/19 at 12:36 AM.
  Reply With Quote