Linking image tiles with JavaScript

I'm trying to use Javascript to recreate something from GoogleMaps. I've successfully created a draggable picture object. Now I'm looking for some clues of how to "glue" two or more image tiles together. And yes, I'll assume that they are all identical square images for ease of use. I believe this could all be handled through JavaScript.