Hey everyone. Pretty new to making addons and I hit a bump with one project of mine.
I want to get all taxi node info and then put some pins on flight path map where the player doesn't have the flight path yet.
I got all the nodes with C_TaxiMap. The data comes with a Vector2D object
https://wow.gamepedia.com/Vector2DMixin
I use GetXY() to get the X and Y, but when I then try and put them on the map, I can tell I have the correct shape as seen here:
(For testing, I used the nodes that are Reachable==1 (known) for now).
![](https://www.wowinterface.com/forums/attachment.php?attachmentid=9510&stc=1&d=1603927991)
Top top exclamation is the Argent Tournament, the one off to the left is Warsong Hold, etc.
But the scale is off, and I'm not sure how to expand it properly. I found this code to put a exclamation on the map just to test for now
https://www.wowinterface.com/forums/...93&postcount=4
Code:
local frameT = FlightMapFrame
local pin = CreateFrame("Frame", "MYPIN", frameT)
pin:SetWidth(16)
pin:SetHeight(16)
pin:EnableMouse(true)
pin:SetScript("OnEnter", function(pin)
print("x: " .. x .. " y: " .. y)
end) -- this routine you need to write
pin:SetScript("OnLeave", function()
end) -- this routine you need to write
pin.texture = pin:CreateTexture()
-- You need to set the texture of the pin you want to display. Here is an example
pin.texture:SetTexture("Interface\\MINIMAP\\ObjectIcons.blp")
pin.texture:SetTexCoord(0.125, 0.250, 0.125, 0.250)
pin.texture:SetAllPoints()
-- Make it appear at different levels in the map as desired (other icons can cover it based on what you choose)
pin:SetFrameStrata("TOOLTIP")
pin:SetFrameLevel(frameT:GetFrameLevel() + 1)
pin:SetPoint("CENTER", frameT, "CENTER", x*10, -y*10)
pin:Show()
When I set point on the second-to-last line, is there a formula that correcly scales it up, or is there a better way of doing this altogether? I looked into HereBeDragons but I continued on this way since I think I'm pretty close.
Thanks!