Ajax call to get nearest image added, DB + calculation still missing