This could easily be done by using something simmilar to the pokemon's image names, but except a little different:
but the problem is loading it, since you don't know any of the names it can't be read so easily so the best way is creating a small program/script which you
just open the townmap and drag sub-images into it then it saves it into the townmap database. (I'm sorry if this sounds confusing.) This is the easiest way to do so in my opinion.