This as you can see is a 50 by 50 map. But i firstly want to do the following optimizations:
Work out the max that fits in canvas window (including partial) so it fills the screen.

The problem i have though by imposing the limit the loops will only load that many tiles ( lets say 10 by 10 ) so the map is always 10 by 10 and as i scroll the rest of tiles remain unloaded for obvious reasons.

So i also need to work out how to change the starting position... any ideas =/ ?

Well, I don't exactly know how you have the scrolling set up, so I assumed it was based on the player's coordinates. You will probably have to tweak the code quite a bit to get it to work with what you are trying to accomplish. Hopefully, this should give you at least an idea.
–
tyjkennMar 10 '12 at 7:22