Hi I want to write a small tool which allows users to load a Crawlerbot/Honorbuddy profile and see the coordinates on a map. I am using a PictureBox )in a Scrollcontainer so I am able to load the continent image and scroll/zoom on it.
I am really, really bad in math but I thought the following code should work:
Code:
Private Const TILE_SIZE As Double = 533.0 + (1 / 3)
Function CalcWoWPosToGuiPos(ByVal WoWMapX As Double, ByVal WoWMapY As Double) As Point
Dim relY As Double = (WoWMapX + 32.0 * TILE_SIZE ) / (64 * TILE_SIZE )
Dim relX As Double = (WoWMapY + 32.0 * TILE_SIZE ) / (64 * TILE_SIZE )
CalcWoWPosToGuiPos.X = = PictureBox.Width * relX
CalcWoWPosToGuiPos.Y = PictureBox.Height * relY
End Function
As you see I already googled and learned something about the WoW coordinates.
But this code doesn't work. And I really have no idea how to solve this (really simple?!) problem. Any help would be great!
Edit: here is an picture. yellow is the position I am (3744.927, 5624.042 on the map it should be 117,299) red is the position the function returns: 678,592