In case if anyone is wondering about this, I found that in the World Map lua file, blizzard uses this function:
Code:
local function GetPOITextureCoords(index)
local worldMapPixelsPerIcon = 18;
local worldMapIconDimension = 16;
local offsetPixelsPerSide = (worldMapPixelsPerIcon - worldMapIconDimension)/2;
local normalizedOffsetPerSide = offsetPixelsPerSide * 1/WORLDMAP_POI_TEXTURE_WIDTH;
local xCoord1, xCoord2, yCoord1, yCoord2;
local coordIncrement = worldMapPixelsPerIcon / WORLDMAP_POI_TEXTURE_WIDTH;
local xOffset = mod(index, NUM_WORLDMAP_POI_COLUMNS);
local yOffset = floor(index / NUM_WORLDMAP_POI_COLUMNS);
xCoord1 = xOffset * coordIncrement + normalizedOffsetPerSide;
xCoord2 = xCoord1 + coordIncrement - normalizedOffsetPerSide;
yCoord1 = yOffset * coordIncrement + normalizedOffsetPerSide;
yCoord2 = yCoord1 + coordIncrement - normalizedOffsetPerSide;
return xCoord1, xCoord2, yCoord1, yCoord2
You simply call this to get the correct coordinates to use for "SetTexCoords".