I have a game where, based upon the visible tiles in the viewport, I need to retrieve data of items in the visible tiles. I am planning to use Javascript to AJAX request a batch based upon the visible tiles which contain image tags like Google Maps. The item information will be in JSON format.
What is the best approach to fetch the data? I currently have class I wrote in javascript which determines the visible columns/rows and offsets relative to the visible area shown. Each item is also user contributed and will be rendered in canvas or SVG layer .