Originally Posted by Xrystal
I'm guessing then that the pinManager automatically places the co-ords in the correct zone ?
|
the callback is called everytime a different zone is displayed. you have to handle the zone by yourself.
though you have done that already:
Lua Code:
local drawCallback = function(pinManager)
SetMapToPlayerLocation()
local pinZone = GetMapName()
local harvestData = self.Data[pinType][pinZone]
for i,v in pairs(harvestData) do
pinManager:CreatePin(_G[pinType], v.key, v.zone, v.x, v.y, v.radius)
end
end
you only draw the pins in the current zone.
edit:
i think you have to remove SetMapToPlayerLocation().
if the player changes the currently displayed map (eg right click) the drawCallback is called and immediatly sets the map back to the player's position.