Added margin option, which is a secure perimeter (in pixel) around the view port where tiles must be loaded.