IF the mini-map point WORLD(250,250) matches the virtual-world coordinate point mini(250,250) then it is merely
scale and translation
If all Points in the World-Map [ Wpt(Wx,Wz) ]
are to be mapped to the mini-view [ Mpt(Mx,Mz) ]
Then the mini view is going to be at the ratio of 500/2000 or 0.25
ratio = 500/2000 = 0.25
Mx = ratio * Wx
Mz = ratio * Wz
Note: this will grab only every 4th pixel (horizontally/vertically) or
1/16th of the image. You may want to get the average of the pixels
in the world view before plotting in the mini-view.
Mx now will be in the range -250 to 250. Same for Mz
Translate to the mini-view dead zero:
Mx = Mx + 250 Mx is now in the range 0 to 500
Mz = Mz + 250 Same for Mz
If you want to have the option of placing the mini-map any place on the world-map, then you will need to remove the hard coded values.