Need help with WorldMapDataProvider
3 Attachment(s)
Hi, I am trying to extend my AddOn with Icons on the Zone Maps, but... when I last did this Kind of stuff (around BC times), the WorldMap was a simple Frame like any other and Nothing with data Providers and all this.
So I tried to figure it out but it doesn't Show me any Icon. Can anyone push me the Right way? Here is the sample code I wrote to understand how all this works: WorldmapSample.xml: Code:
<Ui xmlns="http://www.blizzard.com/wow/ui/"> Code:
local Me=CreateFrame("Frame","WorldmapSampleFrame") What happens is: I see the debug message telling me "added pin at 50/50 to map <id>" So the OnAcquired function gets called. But I don't see the Icon on the Zone map. Can anyone tell me what I'm doing wrong? |
Either straight up use HereBeDragons or check out its code to see how it is done: https://www.wowace.com/projects/herebedragons
|
Thanks for this hint, I checked HBD but... it has its own Management of minimap and worldmap Pins that would collide with my own management. My minimap Management is already working and deeply integrated in all my other Code. Wouldn't like to throw that all away.
I also tried to get through the HBD Code and understand how it is working… but down to the essentials (which is: just put one pin to the current map), I only found one difference and inserted this (I tried to display the Icon directly using the pin instead of adding a Frame to the pin). but it still doesn't show up on the map. I must misunderstand something, but I don't get it... |
Hi, got it now… the only error on my Code was to use x/y coordinates from 0 to 100 instead of 0 to 1.
So, where I placed at 50/50, I should have placed at 0.5/0.5. |
I studied your code for a solid 15 minutes, comparing it to mine to spot the difference. I never thought to check the x/y coord. lol
|
All times are GMT -6. The time now is 09:13 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI