auto center image in map and make sure the height/width ratio is correct