> I can't do a check inside my getTileUrl
> function to see if the tile is a purple tile, as they don't follow a pattern
> easy to check (hence the switch statement). Hence my problem.
This is where you need to do some thinking. How would _you_ tell
where to put these tiles? You would consult your 'master map'. You
need some way to get your javascript do something similar.
You might get it to ask your server about each tile as and when they
are requested; efficient but complex to implement. Or you might
provide it with a little look-up table so it can check which tiles
should be available or not.